Stream: cql
Topic: CDS tool
rekha (Feb 14 2019 at 10:51):
Hi All,
In search of CQL tools , We have came across AHRQ CDS Authoring Tool .Is it helpful in creation of cql's? Can anyone suggest me??
Thanks in advance.
Bryn Rhodes (Feb 15 2019 at 23:09):
Hi @rekha, yes, the AHRQ CDS Authoring Tool is helpful for authoring CQL libraries. There are links to other tools available in the Reference Implementations appendix of the specification. In particular, there is an atom package for CQL highlighting, and there is an ad-hoc execution environment here.
rekha (Feb 18 2019 at 06:19):
Thank you @Bryn Rhodes ,We are having different fields to define, among them in CDS Tool we are having dropdown for different fields but it doesn't contain some of the representations like Diagnostic report,initialpopulation,numerator,denominator and so on and can we create our valuesets apart from VSAC?
Chris Moesel (Feb 18 2019 at 14:00):
Hi @rekha. If your last comment is talking about the CDS Authoring Tool, I can answer some of those questions...
The CDS Authoring Tool does not currently support every FHIR resource type -- but does support the ones that we've found to be most common. I'll make a note to consider adding DiagnosticReport.
InitialPopulation, Numerator, and Denominator are terms more often seen in electronic Clinical Quality Measures (eCQM). That said, the CDS Authoring Tool does have some similar concepts. In the workspace, there are tabs for "Inclusions", "Exclusions", and "Subpopulations" (among other things).
Currently the CDS Authoring Tool only supports value sets from the VSAC -- but we hope to support other value set sources in the coming months.
If the CDS Authoring Tool does not fully meet your needs, you should consider some of the other options that Bryn linked to above. You could also consider using the CDS Authoring Tool to get a good head start on the CQL. Then you could export the CQL and modify or extend it in another tool.
rekha (Feb 19 2019 at 11:47):
Thank you @ Chris Moesel.Can we use this tool for creating Measures and as well as CDS HOOKS?
For creating which CQLthis tool is more useful??
Chris Moesel (Feb 19 2019 at 15:09):
Hi @rekha. The CDS Authoring Tool is designed for creating CDS logic and exporting it as CQL. It would require modification to support measures.
Since the CQL represents only the CDS logic, there are still additional steps needed to integrate it into an EHR. One approach is to expose the CQL logic using CDS Hooks. The CDS Connect project has an open source project called CQL Services to support this type of integration: https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-CQL-SERVICES
rekha (Feb 20 2019 at 10:27):
Thank you @ Chris Moesel. I am able to create valuesets and codesystems but How to declare expressions in define statements?? like this
**define OnDialysis:
Exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "Dialysis services"]), 1 week))
or Exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "Vascular access for dialysis"]), 1 week))
or Exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "ESRD monthly outpatient services"]), 1 week))**
and whether Node.js and Yarn required for creating CQL's.
Chris Moesel (Feb 20 2019 at 20:07):
To create a statement on its own, outside the context of Inclusion or Exclusion, you can use the "Base Elements" tab. Since your statement is a set of ORs, you want to start with a list operation of OR.
- In the element choose, pick "List Operations", then choose "Or"
- Name the BaseElement "OnDialysis"
- In the first sub-element, choose "Procedure"
- Associate it w/ the "Dialysis Services" ValueSet
- Add the expressions to get "Completed", the 1-week lookback, and exists
- Now add the second and third sub-elements the same way
- When you export the CQL, you should have an "OnDialysis" statement that is equivalent to your CQL above (but it will use variables for the different parts).
Chris Moesel (Feb 20 2019 at 20:11):
Here is a screenshot of what it looks like when I build it:
OnDialysis_Screenshot.jpg
Chris Moesel (Feb 20 2019 at 20:13):
And the relevant part of the CQL that it produced:
define "Dialysis Services": exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "Dialysis Services VS"]), 1 week)) define "Vascular Access for Dialysis": exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "Vascular Access for Dialysis VS"]), 1 week)) define "ESRD Monthly Outpatient Services": exists(C3F.ProcedureLookBack(C3F.Completed([Procedure: "ESRD Monthly Outpatient Services VS"]), 1 week)) define "OnDialysis": "Dialysis Services" or "Vascular Access for Dialysis" or "ESRD Monthly Outpatient Services"
rekha (Feb 21 2019 at 09:52):
Thank you@Chris Moesel. The information you have given for declaring expressions is very helpful.Iam able to create them but Iam not able to get the structure like this
**define HDLTests:
[Observation] O
where O.code in "HDL-C Laboratory Test" or O.code in "High Density Lipoprotein (HDL)"**.
Can you please provide a demo for creating a CQL. How to use all the tabs in CDS Authoring Tool??
Chris Moesel (Mar 05 2019 at 14:11):
Hi @rekha. To get something semantically equivalent to:
define HDLTests: [Observation] O where O.code in "HDL-C Laboratory Test" or O.code in "High Density Lipoprotein (HDL)"
you would do something like the following:
- Choose the "Base Elements" tab if this isn't specific to inclusion/exclusion criteria
- Use the element picker to choose "Observation"
- "Authenticate VSAC" (if not already authenticated)
- Add ValueSet for the first one ("HDL-C Laboratory Test")
- Add ValueSet again for the second one ("High Density Lipoprotein")
If I recall, this won't create CQL exactly like you stated above, but it will create CQL that is semantically equivalent. I think it does two separate queries (one for each value set) and then unions them together.
If you're really interested in having complete control over the CQL, and you understand CQL (or are willing to learn), then you may be better off writing the CQL by hand.
rekha (Apr 20 2019 at 05:36):
Hi All,
In CDS Authoring Tool after creation of cql ,In testing section which type of json file we need to upload. Can anyone suggest me?
Lloyd McKenzie (Apr 20 2019 at 15:33):
Which tool are you using?
rekha (Apr 22 2019 at 04:29):
AHRQ CDS Authoring tool
Lloyd McKenzie (Apr 22 2019 at 14:09):
@Bryn Rhodes ?
Bryn Rhodes (Apr 22 2019 at 17:11):
I'm not very familiar with the CDS Authoring tool, @Chris Moesel ?
Bryn Rhodes (Apr 22 2019 at 17:12):
If you have the content packaged as a Library and PlanDefinition, then you can run it in a CQF Ruler.
Chris Moesel (Apr 22 2019 at 17:18):
@rekha - The AHRQ CDS Authoring Tool testing capability expects you to upload synthetic patient data as FHIR bundles. Since the AT supports FHIR DSTU2 and STU3, you can upload bundles of either type. Each bundle should contain a Patient resource (representing the synthetic test patient) and any other resources representing the patient's data.
Chris Moesel (Apr 22 2019 at 17:20):
If you need a jump start, Synthea generates synthetic patients as FHIR bundles. Note that you'll need to modify the config file to indicate you want DSTU2 and/or STU3 output.
rekha (Apr 23 2019 at 04:36):
Thank you @ Chris Moesel
Ashmit Pyakurel (May 10 2021 at 13:49):
Hi,
I am not sure if this is the right forum to ask questions related to CDS authoring tool. (please guide me, if it is not).
Could you please share how one would configure "missing information" on CDS authoring tool? For instance, I want to check to see if there are any "observations" in general, and if there is no observation, return a "missing information". Right now, it seems like on CDS tool, I have to select a particular "code" exists -- and I cannot do the "exists" check at the observation level. Help?
Chris Moesel (May 11 2021 at 14:43):
Hi @Ashmit Pyakurel. If I understand correctly, you want to do a query for ALL Observations and then check if the result is empty. This is difficult in the CDS Authoring Tool because it always wants you to choose a Value Set or Concept to apply to the query (instead of allowing an open Observation query). Do I have that right?
If so, there is a workaround you can do. If you create an Observation element and associate it with a Value Set, you can then delete the value set from the element -- and that will leave it as an open query on Observation. Then you can apply the "Exists" and "Not" modifiers as appropriate. I've put a few screenshots below to demonstrate this:
Chris Moesel (May 11 2021 at 14:45):
Note, however, that an open query on Observation might be a performance issue for FHIR servers, as some patients may have many observations, and CQL doesn't define any type of paging mechanism to limit the query to a certain number of results.
Ashmit Pyakurel (May 11 2021 at 14:47):
You, my sir, get a Big cookie! Thank you so much!! This is exactly what I wanted. The intent is to gradually move away from CDS into CQL -- this is is a tool that would enable us to scale much quickly for the prototype
John Silva (May 11 2021 at 18:08):
FYI, I was just made aware of this online CQL tool that might be helpful: https://cql-runner.dataphoria.org/
Tien Thai (Mar 31 2022 at 15:43):
Hello,
We used the CDS Authoring Tool (CDSAT) to develop a CDS artifact which incorporates an external CQL library to returns a simple recommendation if the patient meets the Inclusion criteria. We then downloaded the CDS artifact and re-defined the Recommendation with some additional elements defined in the included external CQL library. Please note that we could not add those elements to the Recommendation in the CDSAT and that is why we modified the CQL artifact outside of the CDSAT. How do we get the updated CDS artifact back to the CDSAT? Your help is appreciated. Thank you very much for your help.
Chris Moesel (Mar 31 2022 at 16:07):
Hi @Tien Thai -- the AHRQ CDS Authoring Tool does not support re-uploading a library for continued editing. Once you make manual modifications to the CQL, you need to continue any further modifications manually. We're looking into adding capabilities to support more flexible definitions of recommendations, which might have helped you -- but that won't be ready for a while.
The CDS AT does allow you to upload CQL libraries to it (as I think you already discovered), but they can only be referenced from your artifact. You cannot use the AT to edit uploaded libraries. Depending on what you need to do, there may be some creative workarounds using this capability. Or, if you wish to continue editing the artifact in the CDS AT, you may need to make your edits as usual and then re-apply the recommendation changes after every time you download a new version from the AT.
Last updated: Apr 12 2022 at 19:14 UTC