cqframework / clinical_quality_language

Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
https://confluence.hl7.org/display/CDS/Clinical+Quality+Language
Apache License 2.0
253 stars 121 forks source link

Request CQL translator to accept UCUM definite-duration units #605

Open pjiangtjc opened 3 years ago

pjiangtjc commented 3 years ago

For below eCQM PC measures' logic, CQL uses calendar duration keywords “weeks”, while the data source QRDA I, uses UCOM unit “wk”. It’s expected that the implementers follow CQL Specification Author's Guide and map the “weeks’ to “wk” to ensure proper eCQM evaluation.

/ Define “Single Live Birth Encounter With Gestational Age 37 Weeks or More” “Single Live birth Encounter” SingleLiveBirthEncounter With [“Assessment, Performed”: “Gestational age—at birth”] GestationaAlge Such that GestationalAge.result >= 37 weeks And Global.”Earliestof” (GestationalAge.relevantDatetime, GestationalAge.relevantPerfiod ) during SingleLiveVirthEncounter.relevantPeriod /

We like to request if possible, for CQL Translator, which is used by data receivers in their QRDA processing engines, to accept these UCUM units in patient data. This helps to avoid inconsistency and confusion among various QRDA data receivers. Also it helps measure developers to be able to use the CQL expressions and units in their CQL logics.

An ONC JIRA ticket is created: [https://oncprojectracking.healthit.gov/support/browse/CQLIT-260]

brynrhodes commented 3 years ago

FYI, transferred this to the CQL translator as it is an issue with the translator capability, not the formatting and usage wiki.

brynrhodes commented 3 years ago

This would effectively be a "Normalize calendar duration units where possible" option in the translator.

cmoesel commented 3 years ago

Is this proposal to:

  1. Convert data to CQL units where necessary? (e.g., GestationalAge.result >= 37 weeks becomes ConvertQuantity(GestationalAge.result, 'week') >= 37 weeks)
  2. Convert CQL literal units where necessary? (e.g., GestationalAge.result >= 37 weeks becomes GestationalAge.result >= 37 'wk')
  3. Or either, as appropriate?