Diff of /README.md [000000] .. [96a5a0]

Switch to unified view

a b/README.md
1
# ClearMatch
2
3
A Python tool for the structured analysis of clinical trial eligibility criteria by extracting and organizing atomic criteria into logical structures.
4
5
## πŸš€ Overview
6
7
ClearMatch processes clinical trial data from **ClinicalTrials.gov**, extracting structured information about eligibility criteria. It performs three key steps:
8
9
1. **Identification** – Extracts atomic criteria from raw text.
10
2. **Logical Structuring** – Organizes these criteria using logical relationships (`AND`, `OR`, `NOT`, `XOR`, `CONDITIONAL`).
11
3. **Matching Patients to Oncological Clinical Trials** – _(Planned but not yet implemented)._
12
13
### **βœ… Features**
14
- βœ… Fetches clinical trial data from the **ClinicalTrials.gov API**.
15
- βœ… Extracts and structures **eligibility criteria** into logical expressions.
16
- βœ… Persists processed data as **JSON files** for further analysis.
17
- 🚧 **Upcoming:** Automated patient matching system.
18
- 🚧 **Upcoming:** UI.
19
20
---
21
22
## **πŸ“‹ Requirements**
23
- **Python 3.13+**
24
- **OpenAI API key** (for GPT-4o access)
25
  πŸ“Œ **Get your API key here:** [OpenAI API Keys](https://platform.openai.com/api-keys)
26
27
---
28
29
## **πŸ’Ύ Installation**
30
31
1️⃣ **Clone the repository**
32
```sh
33
   gh repo clone judacas/Clinical-Trial-Prompts
34
   ```
35
36
   _This uses [GitHub CLI](https://cli.github.com/). If you don’t have it, use:_
37
38
   ```sh
39
   git clone https://github.com/judacas/Clinical-Trial-Prompts.git
40
   ```
41
make sure to then cd into the root directory
42
```sh
43
cd Clinical-Trial-Prompts
44
```
45
46
2️⃣ **Set up a virtual environment _(Optional but Recommended)_ **
47
```sh
48
python -m venv .venv
49
source .venv/bin/activate  # macOS/Linux
50
.venv\Scripts\activate     # Windows
51
```
52
53
3️⃣ **Install dependencies**
54
```sh
55
pip install -r requirements.txt
56
```
57
58
4️⃣ **Set up environment variables**
59
Copy the example [`sample.env`](src/sample.env) file and rename it to proper `.env` naming convention:
60
```sh
61
cp src/sample.env src/.env  # macOS/Linux
62
copy src\sample.env src\.env  # Windows
63
```
64
65
To edit the `.env` file in the terminal, use:
66
```sh
67
nano src/.env  # Linux/macOS
68
notepad src\.env  # Windows
69
```
70
Then, add your OpenAI API key:
71
```sh
72
OPENAI_API_KEY="your-api-key-here"
73
```
74
75
πŸ“Œ **Note:** The `.env` file is ignored by Git to prevent accidental key exposure.
76
77
---
78
79
## **πŸ›  Usage**
80
Run ClearMatch using:
81
```sh
82
python -m src.main
83
```
84
Follow the command-line instructions to process and structure clinical trial data.
85
86
---
87
88
## **πŸ“Š Data Flow**
89
1. **Fetch raw trial data** from **ClinicalTrials.gov**.
90
2. [**Identify**](src/services/identifier.py) the atomic eligibility criteria in the selected trials.
91
3. [**Structure criteria**](src/services/logical_structurizer.py) using logical operators (`AND`, `OR`, etc.).
92
4. **Store results** as structured **JSON files** in [`output/`](output/) subdirectory for further use.
93
94
---
95
96
## **πŸ’‘ Future Plans**
97
- πŸ”Ή Add **automated patient-trial matching**.
98
- πŸ”Ή Implement **an API** to allow external applications to query structured trial data.
99
- πŸ”Ή Optimize **logical structuring** for better accuracy.
100
101
---
102
103
## **🀝 Contributions**
104
Contributions are welcome! Please open an issue or submit a pull request.
105
106
---
107
108
## **πŸ“œ License**
109
This project is licensed under the **MIT License**.
110
111
---