Closed developerNovo closed 10 months ago
CQL defines contexts that facilitate authoring logic from different perspectives in the data model. The most common one (and best supported one) so far is the Patient context. It is up to the evaluation environment to provide the patient context to the engine, and if population level evaluation for patient context logic is needed, to run the logic for each patient in the source data. For example measures are written in Patient context, and the evaluation environment typically runs the measure logic for each patient in the source data. See the measure evaluation logic in the evaluator for an example of this, but the upshot is that the evaluating environment is responsible for ranging over the patients in the source data and running the evaluation for each one.
Patient information is provided via the "context" to the engine: https://github.com/cqframework/clinical_quality_language/blob/master/Src/java/engine/src/main/java/org/opencds/cqf/cql/engine/execution/Context.java
So part of setting up the engine evaluation is establishing the context where you provide the id of the current patient.
Closed due to lack of activity
Hi,
I am new in the cql technology, I am trying to understand how to use QDM data model to send patient data in the cql engine. I am not trying to do anything with the FHIR part, my usecase is to set a data model with multiple patient data and then send that to the engine to retrive matched patients. It seems I can not understand how I can achive that. Till now I am able to generate the elm json file successfully and then initialize the Library with the elm json file. Next I am trying to understand how to set the patient data and send that in to the cql engine. I have already went over the engine testcases and was able to run them successfully, but If I am missing anything, can you please point me to a direction that can help me take the next step.
Thank you for your time !
@brynrhodes : I went over some of your answers, very good details. If you can help me with the above question or any direction will really help !