CTWizard is a Python-based tool designed to empower medical researchers by streamlining the search, retrieval, and processing of clinical trial data from ClinicalTrials.gov. With this tool, users can quickly generate comprehensive reports summarizing clinical trials related to specific diseases, conditions, or treatments across the globe.
- Rapid Insights: Save hours of manual research by automating the retrieval of clinical trial data.
- Structured Reporting: Generate detailed reports, including trial summaries, statuses, and participant details.
- Narrative Synthesis: Use large language models to synthesize search results into a cohesive narrative report.
Users can specify:
- Query Condition: Search for conditions (e.g., "lung cancer", "COVID-19").
- Country: Search by country of interest.
- Result Count: Define how many clinical trial records to retrieve.
Seamlessly connects to the ClinicalTrials.gov API to fetch clinical trial data, utilizing user-defined parameters for tailored results.
The retrieved trials are presented with key details:
- NCT ID: A unique identifier for each trial.
- Title: Brief trial title.
- Status: Current recruitment status.
- Enrollment: Expected number of participants.
- Summary: Brief trial description.
- URL: Direct link to the trial details on ClinicalTrials.gov.
Uses Huggingface's GPT-based model to generate an enhanced narrative report, summarizing the search results for ease of interpretation and presentation.
Automatically saves the generated report to a local file (Enhanced_ClinicalTrials_Report.txt
) and provides a direct download link.
pip install requests transformers
-
Clone this repository:
git clone https://github.com/your_username/CTWizard.git cd CTWizard
-
Run the script:
python CTWizard.py
-
Enter the following inputs when prompted:
- Clinical trials search query: e.g.,
lung cancer
- Country: e.g.,
United States
- Number of results to fetch: e.g.,
10
- Clinical trials search query: e.g.,
-
The generated report will be available as
Enhanced_ClinicalTrials_Report.txt
and can be downloaded directly.
A sample clinical trial summary in the report includes:
**Title:** Phase II Study on Immunotherapy for Lung Cancer
**Status:** Recruiting
**Enrollment:** 500 patients
**NCT ID:** NCT12345678
**URL:** https://clinicaltrials.gov/ct2/show/NCT12345678
**Summary:** This study investigates the effectiveness of immunotherapy in treating non-small cell lung cancer patients...
- Step 1: User inputs are used to query the ClinicalTrials.gov API.
- Step 2: Relevant trial data is retrieved and structured.
- Step 3: A GPT-based language model synthesizes the data into an enhanced narrative report.
- Step 4: The report is saved and made available for download.
- Python 3.7+
requests
librarytransformers
library
This project is licensed under the MIT License. See the LICENSE file for details.