Open hmayenve opened 3 years ago
I think that the primary issue is likely that you're using cql-exec-fhir
, which supports the FHIR
data model, but the CQL is written using the QUICK
data model. To get this working, you would either need to provide a different implementation of a PatientSource
that supports QUICK
or you would need to convert your libraries to use the standard FHIR
data model.
It looks like maybe you are just testing with an example from the spec? If so, and if this is for example purposes only, then it's probably best just to convert the logic to the FHIR data model. It looks like it is already pretty close and the main differences will be how you reference the choice elements (e.g., onsetDateTime
vs onset as dateTime
) -- which changed from FHIR 1.0.2 to FHIR 3.x and 4.x.
Hello, First of all, thank you for working on this repo and taking the time to look into this issue.
For context: I'm using V2 (the JS version of cql-execution) along with cql-exec-fhir to execute the JSON-ELM produced.
We currently have a couple of
.cql
files with very similar logic expressions. We want to make a library of the common logic expressions to share among the files. It seem as though the common expressions being called from the files are returningnull
.For example: If for
CMS153_Common.cql
we haveand we want to use the expressions in
CMS153_Common.cql
forCMS153.cql
:The issue is that
Common.ResultsPresentForChlamydiaScreening
orCommon.LaboratoryTestsIndicatingSexualActivity
for example would returnnull
whenever used in theCMS153.cql
file. It might be the case that somehow the expressions in theCMS153_Common.cql
file are not visible in theCMS153.cql
file.For the JS portion: We follow the same process for
CMS153_Common.cql
as you said in this issue #154 about providing the ELM JSON forFHIRHelpers
and then include it as a dependency when you execute the CQL as well as adding it to yourjson-elm
folder then I adding the require statement at the top.Do you have any ideas why this might be happening?
Thank you and I hope to hear back from you soon.