FHIR Chat · Message content for CDS Hooks card · cql

Stream: cql

Topic: Message content for CDS Hooks card


view this post on Zulip Adam Rodriguez (Nov 20 2018 at 06:16):

Hello - Looking for proper method to enter content that could potentially be used for a CDS Hooks notification card. For example, I may want to store a title, body text, URL, etc. that would be based on the result of my CQL retrieves.

In the author's guide (https://cql.hl7.org/02-authorsguide.html), it looks like I could possibly define a structured value (see section 4.3) to accomplish this, but unsure if this is the most appropriate strategy.

Any guidance would be appreciated.

view this post on Zulip Chris Moesel (Nov 21 2018 at 19:51):

There are several potential approaches to integrating CQL with CDS Hooks. In regard to how to supply information that goes into the card, I'll call out three potential approaches that I'm aware of:

1) As you noted, you could put card information into a CQL Tuple -- allowing the CQL logic to define the title, body, text, etc. While the proximity to the logic is nice, one downside is that it could get unwieldy when you need large sections of text or markup. In addition, the code actually invoking the CQL (as part of a CDS Hooks API) would obviously need to know what expression contains the custom Tuple and how the custom Tuple maps to the components of a card.

2) You could store some (or potentially all) of the card-based text information in FHIR Clinical Reasoning resources that are linked to the CQL. In this case, the text might be hard-coded into the Clinical Reasoning resources or it might refer to specific expressions in the CQL. Then the code that implements the CDS Hooks API would need to be aware of how the FHIR Clinical Reasoning resources map to the CDS Hooks cards. This is the approach that @Bryn Rhodes, @Kensaku Kawamoto, and their team used for the CDC Opioid Prescribing IG. You can find more details (and examples) of this approach in the IG here: http://build.fhir.org/ig/cqframework/opioid-cds/documentation.html

3) Similar to #2 above, the CDS Connect team (of which I am apart), built a simple prototype framework for exposing CQL via CDS Hooks. In this framework, we defined a very simple configuration file format to map CQL to components in a card -- allowing for a mix of hard coded strings, values from CQL expressions, and string interpolation. This is described in the README for the project on GitHub: https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-CQL-SERVICES#adding-cql-hooks

I'm not sure if any of these have emerged as the way to do it. The approach you choose will likely depend on your own requirements and the capabilities of your system. I expect that as both CDS Hooks and CQL gain adoption (and maturity) we may see some best practices emerge. I look forward to that.

view this post on Zulip Bryn Rhodes (Nov 21 2018 at 23:15):

@Chris Moesel that's fantastic! In the Opioid IG, we used specific names for each expression within a library to allow the same infrastructure to evaluate different plan definitions. We're currently working on profiles to make those patterns explicit.


Last updated: Apr 12 2022 at 19:14 UTC