Stream: cql
Topic: Newbie Question
Brian Bruns (Mar 22 2022 at 13:46):
Hi all, I'm interested in running CQL queries against a set of QRDA I files. What is the best way to do this? I've been looking at cql-ruler. Is the best way to load/interface the files via FHIR or is there anyway to directly execute against QRDA files?
JP (Mar 25 2022 at 14:36):
There is not a way to run QRDA directly with the cqf-ruler.
Tatyana Lepilova (Apr 07 2022 at 21:43):
va5:09 PM
Hello, i am going over https://github.com/cqframework/clinical_quality_language and https://github.com/cqframework/cql-execution. cloned both to my local machine. from clinical_quality_language/Src/java i am attempting execute (as it is in README.md) ./cql-to-elm/build/install/cql-to-elm/bin/cql-to-elm --format=JSON --input ../../Examples/ChlamydiaScreening_CQM.cql. getting error: Error:[51:1, 51:18] Could not resolve context name Population in model QUICK.. what i am missing?
Paul Denning (Apr 08 2022 at 13:57):
That CQL file has "using QUICK"
Line 51 has "context Population", which was a "context" name which was not used much.
The current version of CQL does not define "Population" as a context; see https://cql.hl7.org/02-authorsguide.html#context
The README should probably be changed to refer to a better example CQL file, one that works with the latest CQL-to-ELM translator.
QUICK was once envisioned as an alternative data model, but it never really panned out.
Suggest using a CQL example that has "using FHIR version '4.0.1'"
Paul Denning (Apr 08 2022 at 14:04):
There is an old issue to fix use of context Population
Tatyana Lepilova (Apr 08 2022 at 15:52):
Thank you, Paul.
Tatyana Lepilova (Apr 08 2022 at 20:57):
trying to execute java % ./cql-to-elm/build/install/cql-to-elm/bin/cql-to-elm --input ../../../cql-execution/examples/node/age.cql
(from clinical_quality_language/Src/java). getting errors: Error:[5:1, 5:28] Could not resolve model info provider for model Simple, version 1.0.0.
Error:[9:1, 9:15] Could not resolve context name Patient in model System.
Error:[12:5, 12:44] Could not resolve identifier Patient in the current library.
. please let me know what should i change in order to be able to run the latest.
Tatyana Lepilova (Apr 08 2022 at 21:03):
i have updated age.cql to have using FHIR version '4.0.1'
-- and ths worked!!!!! continue...
Tatyana Lepilova (Apr 11 2022 at 12:26):
trying to run (as in README) `const cql = require('../lib/cql');
const measure = require('./age.json');
const lib = new cql.Library(measure);
const executor = new cql.Executor(lib);
const psource = new cql.PatientSource([ {
'id' : '1',
'recordType' : 'Patient',
'name': 'John Smith',
'gender': 'M',
'birthDate' : '1980-02-17T06:15'
}, {
'id' : '2',
'recordType' : 'Patient',
'name': 'Sally Smith',
'gender': 'F',
'birthDate' : '2007-08-02T11:47'
} ]);
const result = executor.exec(psource);
console.log(JSON.stringify(result, undefined, 2));`
the very first line hit the error: Error: Cannot find module '../lib/cql'/
how to get this fixed?
Last updated: Apr 12 2022 at 19:14 UTC