FHIR Chat · Measure CQL Expressions · implementers

Stream: implementers

Topic: Measure CQL Expressions


view this post on Zulip Alexander Kiel (Jun 21 2019 at 13:29):

In the Measure resource, one can specify criteria via the Expression type. In that Expression type one can use text/cql as language and there is an expression data element.

In all examples I saw, for CQL, the expression data element always used expression names to reference named expressions from the Library resource referenced by the Measure.

I like to use Measure together with $evaluate-measure to evaluate ad-hoc queries. So I would like to put real expressions like AgeInYearsAt(@2013-01-01) >= 16 and AgeInYearsAt(@2013-01-01) < 24 in the expression data element. Otherwise I would have to create a separate Library for each ad-hoc query. I would still use a basic Library with some common functions and expression definitions, but I like to be able to evaluate expressions on top of that basic library.

Currently I work on my own implementation. So I can implement support for real expressions. But I wonder whether other implementations would also support real expressions or only references to named expressions.

view this post on Zulip Bryn Rhodes (Jun 21 2019 at 16:47):

We had restricted this in STU3 on the grounds that implementations wouldn't have to deal with in-line expressions, they could always just expect that the criteria was a reference to a named expression in the library for the measure. But in R4, we're actively seeking feedback on this. For our implementation, it is still easier to be able to assume the criteria is a reference to an expression in the library, but we are still in the process of updating to R4, so we might change that as we upgrade, especially if it facilitates more ad-hoc measure usage like you are describing.


Last updated: Apr 12 2022 at 19:14 UTC