- When generating schema, we want to query around 1000-5000 trials. This might differ from the num_trials specified by the user.
- Don't insert study if it already exists.
- Modify
_create_table
algorithm. Right now, it doesn't work with PostgreSQL because we cannot define foreign relations before tables are created.
If poetry is not installed,
pip install pipx
pipx install poetry
git clone https://github.com/clinical-trials-research/literature-review.git
cd literature-review
poetry install
-
ClinicalTrials(*, num_studies=1000, connection=None, schema_directory="schema.json")
- CreatesClinicalTrials
object which provides an interface for database management.-
num_studies
- Number of studies to retrieve in each call toupdate_database
orget_studies
. -
connection
- Database connection. If not specified, creates new one. -
schema_directory
- Schema to use. If not specified, creates a schema.from litreview import ClinicalTrials trials = ClinicalTrials()
-
-
ClinicalTrials.query(*fields)
- Query the database for the specified fieldstrials.query("NCTId", "BriefDescription")
-
ClinicalTrials.update_database()
- Update the database withnum_studies
number of studies.trials.update_database()
-
ClinicalTrials.get_studies()
- Retrievenum_studies
number of studies in a list.studies = trials.get_studies()