Stream: cql
Topic: Components in Observations
Dan Gottlieb (Jan 16 2020 at 18:08):
I'm just getting started with CQL and am struggling to understand how to handle components in observations. For example, how would I find patients who's most recent BP observation occurred in the last year and has a systolic component that's greater than 140 or a diastolic component that's greater than 80? The first part of this seems straight forward - "Last" of an Observation with a BP code and effectiveDate of last year, but then I need to do a "where" type of test on each component of that observation to see if it has a code of SBP and a value > 140 or a code of DBP and a value of > 80. I've found a number of examples of BP measures, but they seem to assume that there aren't components even though components are part of both the QUICK and FHIR observation models.
Bryn Rhodes (Jan 16 2020 at 18:58):
Hi @Dan Gottlieb , coincidentally, I'll be considering this as an example on a Cooking with CQL Session in a few hours. Here's an example measure that does pretty much exactly that:
Bryn Rhodes (Jan 16 2020 at 18:58):
https://github.com/DBCG/connectathon/blob/master/fhir4/cql/EXM165_FHIR4-8.5.000.cql#L58
Bryn Rhodes (Jan 16 2020 at 18:59):
Note that due to measure intent, it doesn't require the systolic and diastolic readings to be from the same measurement.
Dan Gottlieb (Jan 16 2020 at 19:23):
Thanks @Bryn Rhodes - that's a super helpful example! I have a conflict for part of the session this afternoon, but will dial in for the first half.
Jeffrey Taylor (Jan 16 2020 at 20:05):
@Bryn Rhodes Is this Cooking with CQL Session available to anyone? If so, where I can I find more information on how to join the call or watch previous webinars? I couldn't find solid information through quick google search.
Bryn Rhodes (Jan 16 2020 at 20:16):
Yes, open to anyone, the event page is here: https://ecqi.healthit.gov/cooking-cql-or-how-express-ecqms-using-cql-qdm-and-fhir%C2%AE-webinar-0
Bryn Rhodes (Jan 16 2020 at 20:16):
And examples for all previous sessions can be found here: https://github.com/esacinc/CQL-Formatting-and-Usage-Wiki/wiki/Cooking-with-CQL-Examples
Jeffrey Taylor (Jan 16 2020 at 20:17):
Thank you!
Last updated: Apr 12 2022 at 19:14 UTC