A Python tool for the structured analysis of clinical trial eligibility criteria by extracting and organizing atomic criteria into logical structures.
ClearMatch processes clinical trial data from ClinicalTrials.gov, extracting structured information about eligibility criteria. It performs three key steps:
AND
, OR
, NOT
, XOR
, CONDITIONAL
).1οΈβ£ Clone the repository
gh repo clone judacas/Clinical-Trial-Prompts
```
_This uses [GitHub CLI](https://cli.github.com/). If you donβt have it, use:_
```sh
git clone https://github.com/judacas/Clinical-Trial-Prompts.git
```
make sure to then cd into the root directory
```sh
cd Clinical-Trial-Prompts
2οΈβ£ **Set up a virtual environment (Optional but Recommended) **
python -m venv .venv
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows
3οΈβ£ Install dependencies
pip install -r requirements.txt
4οΈβ£ Set up environment variables
Copy the example sample.env
file and rename it to proper .env
naming convention:
cp src/sample.env src/.env # macOS/Linux
copy src\sample.env src\.env # Windows
To edit the .env
file in the terminal, use:
nano src/.env # Linux/macOS
notepad src\.env # Windows
Then, add your OpenAI API key:
OPENAI_API_KEY="your-api-key-here"
π Note: The .env
file is ignored by Git to prevent accidental key exposure.
Run ClearMatch using:
python -m src.main
Follow the command-line instructions to process and structure clinical trial data.
AND
, OR
, etc.).output/
subdirectory for further use.Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.