This project is a demonstrator of the usage of the profiled FHIR BBMRI.it consent resource. It provides a series of sample resources, including Consent, that can be loaded into a FHIR server and then queried via CQL.
The following examples of resources are provided in the examples/ folder:
- Person
- Organization (for Biobanks and Collections)
- Condition
- Specimen
- Consent
- Install and run the Samply FHIR server (via docker compose)
- Install the blazectl command line tool and set the related blazectl command in the path
- Python 3.x
- Python packages: requests
First, load the fhir resources, launcing the .sh script;
./load_examples.shThen, run the cql query, launching the python script:
python3 run_cql_query.pyYou can modufy the variables in the script:
- CCEs: can be edited by adding or removing one or more conditions of use
- CQL_QUERY_CONTEXT: if set to Patient, then the query provides the count or the detail of the Patients whose samples satisfy the CCEs; if set to Specimen, then the query provides the count or the detail of the Specimens that satisfy the CCEs.
- CQL_QUERY_GRANULARITY: can be set to RESOURCE or COUNT, depending on whether you want the detail of the resources or just their count.