Library to access to the data offered by the 'Registro Español de Estudios Clínicos'
Project description
reecapi
This package provides a list of functions to facilitate access to the data offered by Registro Español de Estudios Clínicos in its REST API.
REEC does not offer any support for this library, which has been developed individually by the author from the documentation shown by REEC on its web site.
Installation
You can install the latest version of reecapi from Pypi with the following command.
# Install the PyPI version of the library
pip install reecapi
Usage
The library has 4 functions to access the records of REEC:
-
get_trials_list(from_date, to_date = None, format = "json") :Extract all the trials published in REec or those that meet the criteria defined in the search parameters with the function:
- from_date(str): Date from which you want to start downloading data. Correct format: "dd-MM-yyyy"
- to_date (str, Optional): Date to which you want to download data. Correct format: "dd-MM-yyyy"
- format (str, Optional): Type of response: "xml" or "json". Only "json" is implemented. Defaults to "json".
# Get Clinical Trial Records from "01-01-2020" to "30-01-2020" get_trials_list(from_date = "01-01-2020", to_date = "30-01-2020") # Get Clinical Trial Records from "01-01-2020" until today. get_trials_list(from_date = "01-01-2020")
-
get_trial_details(trial_id, format = "json") :Extract all the trials published in REec or those that meet the criteria defined in the search parameters with the function:
- trial_id (str): Code that identifies the clinical trial from REec.
- format (str, Optional): Type of response: "xml" or "json". Only "json" is implemented. Defaults to "json".
# Get the Clinical Trial Record with id "2013-000491-14" get_trial_details(trial_id ="2013-000491-14")
-
get_hospital_list(hospital_id = None, format = "json") :Extract all the trials published in REec or those that meet the criteria defined in the search parameters with the function:
- hospital_id (numeric, Optional): Hospital code. Defaults to None.
- format (str, Optional): Type of response: "xml" or "json". Only "json" is implemented. Defaults to "json".
# Get the whole list of hospitals registered in the Ministry dictionary. get_hospital_list() # Get the list of hospitals registered in the Ministry dictionary with the hospital_id="25812" get_hospital_list(hospital_id=25812)
-
get_primary_care_list(center_id = None, format = "json") :Extract all the trials published in REec or those that meet the criteria defined in the search parameters with the function:
- center_id (numeric, optional): Primary primary care center code. Defaults to None.
- format (str, Optional): Type of response: "xml" or "json". Only "json" is implemented. Defaults to "json".
# Get the whole list of primary care centers registered in the Ministry dictionary. get_primary_care_list() # Get the list of primary care centers registered in the Ministry dictionary with the center_id="25812" get_primary_care_list(center_id=25812)
License
MIT License
You may also like…
- Noytext - A web-based platform for annotating short-text documents to be used in applied text-mining based research.
- ropenskyr - R library to get data from OpenSky Network API.
luisgasco.es · GitHub: @luisgasco · Twitter: @luisgasco · Facebook: Luis Gascó Sánchez page
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.