Stream: cql
Topic: Getting Started
Ashmit Pyakurel (Apr 21 2021 at 16:33):
Hi CQL stream! First time posting here, and first time getting exposed to CQLs. I have a very fundamental question -- How do I call a library or "Using" portion of the library.
I am trying to prototype some quick Clinical Decision Support tool, and I was trying to leverage "Quick". However, I am not sure how to get started. Anyone has any guidance on getting started with a CDS CQL?
Thank you in Advance!
Bryn Rhodes (Apr 22 2021 at 18:34):
Hi @Ashmit Pyakurel , one way to get started is to use the Atom CQL Language Plugin, the readme on that project has instructions for getting started. CQL can be used with any data model that it has a "description" of, and the tooling out-of-the-box understands QUICK as a conceptual model, so when the CQL has a declaration of using QUICK
that means that retrieves within that library can access the data described by the QUICK model. The most well-supported models at this point are QDM (in the MAT and Bonnie measure authoring tooling) and FHIR (in the CDS Connect Authoring tooling, the Atom plugin, and many of the open source evaluation stacks).
Bryn Rhodes (Apr 22 2021 at 18:34):
For a Quick Start on CQL, you might consider walking through the CQL Exercises.
Bryn Rhodes (Apr 22 2021 at 18:36):
There's also the Author's Guide in the specification itself, and a Developer's Introduction to CQL in the CQL Formatting and Usage Wiki.
Ashmit Pyakurel (Apr 23 2021 at 22:07):
Hi Bryn,
Sorry for the trouble, but perhaps I am missing something. I tried to follow the steps exactly articulated in the Atom's documentation, and get the following error:
*Running tests.
No tests found at /Users/ashmitpyakurel/Documents/Atom/input/tests. Evaluation may fail if data is required.
No terminology found at /Users/ashmitpyakurel/Documents/Atom/input/vocabulary/valueset. Evaluation may fail if terminology is required.
The following errors were encountered during evaluation:
org.cqframework.cql.cql2elm.CqlTranslatorIncludeException: Could not load source for library test, version null.
*
For context, I was trying to run the first exercise, which doesn't even leverage any FHIR data or reference that library
Bryn Rhodes (Apr 23 2021 at 22:15):
Did you clone the cqf-exercises repository locally and open the Atom editor on the root of that repository? So your Project window in Atom looks like this:
image.png
Bryn Rhodes (Apr 23 2021 at 22:16):
From the messages you're getting it seems like the Atom editor isn't open on the project.
Vasyl Herman (Apr 24 2021 at 13:10):
Hi!
I have my project file structure like the following:
|-- measures
|-- helpers
|-- FHIRHelpers-4.0.1.cql
|-- FHIRHelpers-4.0.001.cql
|-- [any other helper].cql
|-- DiabeticFootExam-1.0.0.cql
|-- BCS_Logic-0.9.001.cql
|-- BCS_Logic-0.9.002.cql
|-- [any other measure].cql
Is there a way to configure Atom or the plugin to search helpers in helpers
folder?
Thanks!
-VH
Ashmit Pyakurel (Apr 26 2021 at 15:26):
Thank you!
JP (Apr 26 2021 at 22:05):
Hi Vasil,
Currently it's not possible to configure the plugin that way. It expects all the included Libraries to be in the same directory as the one you're executing.
Alex Goel (Jul 29 2021 at 14:39):
Hi, we're trying to get tests running in atom,
and we keep getting the following error when trying to run the tests. It says it can't find the library, but we have the CQL in input/cql and tests in input/tests/[libraryname] like other IGs we've seen, like CQF-Exercises and ANC, and are able to run tests in those. Any idea why we're getting this error?
Running tests.
Data path: /Users/alex/Documents/GitHub/Ontario-Lung-Cancer-Screening-CCG/input/tests/LungCancerScreening
No terminology found at /Users/alex/Documents/GitHub/Ontario-Lung-Cancer-Screening-CCG/input/vocabulary/valueset. Evaluation may fail if terminology is required.
The following errors were encountered during evaluation:
org.cqframework.cql.cql2elm.CqlTranslatorIncludeException: Could not load source for library LungCancerScreening, version null.
@Paul Puscas
JP (Jul 29 2021 at 16:04):
Is the CQL file named 'LungCancerScreening.cql'? It's also important to save the file prior to execution if you've not done that.
Alex Goel (Jul 29 2021 at 16:11):
@JP Yes it is LungCancerScreening - we're trying an Ontario Lung Cancer Screening example - plus the CQF-Exercises had a good example of the US one :)
We have saved the file prior to execution and put in test observations
JP (Jul 29 2021 at 16:12):
Any way you could send me the directory or link me to the repo?
Alex Goel (Jul 29 2021 at 16:15):
https://github.com/PuraJuniper/Ontario-Lung-Cancer-Screening-CCG
JP (Jul 29 2021 at 16:33):
library "LungCancerScreening" version '1.0.0' ->
library LungCancerScreening version '1.0.0'
I'll file an issue for that.
Alex Goel (Jul 29 2021 at 17:19):
Thanks @JP that worked
Alex Goel (Jul 29 2021 at 17:23):
@Chris Moesel we originally generated this CQL from the AHRQ authoring tool. When we downloaded the CQL to edit it by hand (couldn't figure out how to convert units from days to years in AHRQ tool: packs per day smoked to packs years) it returned library "LungCancerScreening" version '1.0.0'
JP (Jul 29 2021 at 17:28):
“LungCancerScreening” is valid. It’s the Atom plug-in that has a problem.
Alex Goel (Jul 29 2021 at 17:36):
Gotcha!
Paul Denning (Jul 30 2021 at 19:48):
https://cql.hl7.org/19-l-cqlsyntaxdiagrams.html#library is a clickable diagram of the grammar, which sometimes helps
Last updated: Apr 12 2022 at 19:14 UTC