Skip to content

Cooking with CQL Q&A Index All Categories

csschlegel edited this page Dec 29, 2022 · 86 revisions

Index By Category

Please click on any of the following categories to be taken to Cooking with CQL Q&As within that category.

Get a start with CQL by visiting the CQL FAQs page (https://ecqi.healthit.gov/cql?qt-tabs_cql=2) to review common questions and answers.

The table below contains all the questions within a category.

Category Question Session # and Date
Tooling for CQL and IG Authors Does the Quality Measure Implementation Guide support testing to provide the expected value of the initial population in the numerator? 56 - 7/29/21
Tooling for CQL and IG Authors With regards to generation of the narrative by the measure resource, are expressions in shared libraries included, or is it only expressions in the primary library for the measure? 56 - 7/29/21
Tooling for CQL and IG Authors When building the IG, if you fork the GitHub repository, and build on the fork, where does the resulting IG publish? 56 - 7/29/21
Tooling for CQL and IG Authors When generating a narrative during the library resource refresh tooling process, is the process automated in the refresh, or is it a separate step to run the publisher? 56 - 7/29/21
Tooling for CQL and IG Authors When refreshing content during the IG refresh process, during the step of posting to the build site, does the bundled content have to go to the build site? 56 - 7/29/21
Date and Time Calculations In calculating the overall expected duration (days) of a medication request in Fast Healthcare Interoperability Resources® (FHIR)®, would the logic expression used for variable frequency and periodUnit still apply if the prescription is an absolute order, such as one dosage a day or one dosage every 12 hours? For a prescription that is an absolute order, such as that described, does the logic of using a variable frequency and periodUnit still apply? 51 - 2/25/2021
Date and Time Calculations When calculating the cumulative period or start date for a single medication request in Fast Healthcare Interoperability Resources® (FHIR)®, which would be best to use within the code, the start of validityPeriod or authoredOn? 51 - 2/25/2021
Date and Time Calculations In the example test expressions for collapse with null ending boundary, if you define a third test as successor maximum, would that throw an error? 50 - 1/21/2021
Date and Time Calculations In the Lab Tests Every Six Weeks Revisited example where lab tests need to happen every six weeks or LESS while the therapy is ongoing, why have you chosen to use days instead of weeks? 48 - 10/29/2020
Date and Time Calculations In the Lab Tests Every Six Weeks Revisited example where lab tests need to be performed every six weeks or LESS while the therapy is ongoing, how do you indicate that you are only concerned with the 1st 12 months of testing if the therapy starts prior to the testing measurement period? 48 - 10/29/2020
Date and Time Calculations When discussing the normalizeInterval function, if the period is not known and the period only contains low with high as null flavor, will this function use the low to populate both periods? 48 - 10/29/2020
Date and Time Calculations When utilizing the normalizeInterval guidance, how do you clearly convey to the person retrieving the information how they should calculate the timing criteria? 48 - 10/29/2020
Date and Time Calculations The 2021 HL7 and CMS QRDA Implementation Guides are not using the normalizeInterval function, but are using relevantPeriod and the period could be a dateTime or a period. If the QRDA file only includes a period, but the criteria is looking for a point of time, should we always pick the start of the period, end of the period, or consult the measure author to see which one is the intent of the measure? 48 - 10/29/2020
Date and Time Calculations For interval boundary access, what is the rationale for defining the Latest function? And what will this Latest normalizeInterval function return? 48 - 10/29/2020
Date and Time Calculations For interval boundary access, are both the Latest and normalizeInterval functions applicable for the 2021 Annual Measure updates when we have six or seven data elements each of which have relevantDatetime and relevantPeriod? 48 - 10/29/2020
Date and Time Calculations When interpreting time phrases in Clinical Quality Language (CQL), what is the subtraction of one hour when there is a leap second? 46 - 7/30/2020
Date and Time Calculations When interpreting time phrases in Clinical Quality Language (CQL), for example, an encounter started at midnight on 1/1/2020 and the diagnosis also started at midnight on 1/1/2020. In this case, did the diagnosis start during the encounter? 46 - 7/30/2020
Date and Time Calculations Referring to CMS52v7, does the laboratory test always have a relevant period? 35 - 5/23/19
Date and Time Calculations With regard to the QDM attribute author dateTime, if that’s the time it’s entered into the clinical software then what happens when someone goes back to edit it? Is it the last modified time or the original creation time and do we have a way of handling that? 35 - 5/23/19
Date and Time Calculation CQL logic calculates an interval using both days and months. The specific line of code in question refers to: FirstIndexAssessment.authorDatetime where we can use a combination of months and days. For this line of code, are leap years accounted for if you use 14 months? 34 - 4/25/19
Date and Time Calculation In the example of the QDM documentation illustrating the Cumulative Medication Duration calculation, if the second date is prior to the first date, does that always get to negative? Does this uncertainty play into that calculation? 34 - 4/25/19
Date and Time Calculation In the example of the QDM documentation illustrating the Cumulative Medication Duration calculation, what if the first date is only at the day level but the second level precision is at the time level, do you still end up with an indecision? 34 - 4/25/19
Date and Time Calculation For the interval function of the example of the QDM documentation illustrating the Cumulative Medication Duration calculation, is it required that the first parameter has to be less than or equal to the second parameter? 34 - 4/25/19
Date and Time Calculation Using the DifferenceInDays example below: is this the same as calendar days? Would the DurationInDays give you the uncertainty result or would it be different in this situation? 34 - 4/25/19
Date and Time Calculation Regarding estimated due date definition – how can we be sure it"s the last physical exam we"re interested in. Mothers can have multiple babies over a period of time so how do we know which baby it is associated with on the mother"s record? For example, if a mother has 3 pregnancies but we want to reference the 2nd pregnancy, how do we link this last due date in the second pregnancy to the mother"s record? 33 - 3/28/19
Date and Time Calculation In the Coalesce expression, if the patient record has an order performed date of 12/12 but the performed author DateTime is 12/07 what is the result? 31 - 1/31/19
Date and Time Calculation For Coalesce, each argument is considered in order, and the first one with a value is returned. The use of "first" in this description is referring to the list of arguments to the Coalesce function. So in the example of a performed date of 12/12 and an author date of 12/07, since the performed date (start of relevantPeriod) is first in the list of arguments and has a value, that will be returned as the result. 31 - 1/31/19
Date and Time Calculation For the glucocorticoid dosage expression, is using Date appropriate in place of DateTime? 31 - 1/31/19
eCQM Specifications and CQL Are the value set functions described in the Fast Healthcare Interoperability Resources® (FHIR®) Clinical Quality Language (CQL) 1.5 library applicable for the 2023 electronic clinical quality measures (eCQMs) for the Health and Human Services measure reporting programs and when is the release date for the errata to the FHIR CQL 1.5 library? 60 - 1/27/22
eCQM Specifications and CQL If a measure developer chooses to use profile authoring, would they be able to use a specific Fast Healthcare Interoperability Resources® (FHIR®) resource in addition to the profile? 60 - 1/27/22
eCQM Specifications and CQL Will the Measure Authoring Development Integrated Environment (MADiE) support profile authoring? 60 - 1/27/22
eCQM Specifications and CQL For the follow-up HIV visit logic, explain why the not equivalent comparison is not needed and when it could be needed. 32 - 2/28/19
eCQM Specifications and CQL Can the age-based risk factors example be plugged into the Measure Authoring Tool or tested with Bonnie? The way CQL is structured, the "defines" are listed programmatically. 32 - 2/28/19
eCQM Specifications and CQL Is flattening part of CQL? 32 - 2/28/19
Functions in CQL In the Quality Improvement (QI)-Core 5.0 release, is there a function to capture principal diagnosis? 66 - 7/28/22
Functions in CQL When using the Visual Studio Code (VS Code) CQL plugin, with regard to value sets, can the expand operator be used to expand a value set? 65 - 6/23/22
Functions in CQL When using Global Common Functions in Fast Healthcare Interoperability Resources® (FHIR®) 4.0, would an execution error result in ATOM if an electronic clinical quality measure (eCQM) was run against the eCQM-content-r4-2022 repository? 64 - 5/26/22
Functions in CQL When writing a measure using Quality Improvement (QI)-Core, can the electronic clinical quality measure reference the Global Common Function library in Fast Healthcare Interoperability Resources® (FHIR®) 4.0? 64 - 5/26/22
Functions in CQL How is a measure run using Quality Improvement (QI)-Core? 64 - 5/26/22
Functions in CQL When using Global Common Functions in Fast Healthcare Interoperability Resources® (FHIR®) 4.0, where are the 2022 electronic clinical quality measures (eCQMs) located? 64 - 5/26/22
Functions in CQL In the Clinical Quality Language, library 1.5, is the AgeInYearsAt function in this expression example going to return yes or no without having operator access present? 63 - 4/28/22
Functions in CQL Regarding aggregate functions in Clinical Quality Language (CQL) using Fast Healthcare Interoperability Resources® (FHIR®) v4.0.1, what is the difference between the CountOfListOfNulls function versus the LengthOfListOfNulls function? 61 - 2/24/22
Functions in CQL With regard to aggregate functions in Clinical Quality Language (CQL) using Fast Healthcare Interoperability Resources® (FHIR®) v4.0.1, considering the expression define EmpyList: List { }, why does this definition include List, where the previous one does not? 61 - 2/24/22
Functions in CQL What are the differences between the functions "GetBaseExtensions", "GetExtensions", and "GetExtension" in the current Global Common Library? 55 - 6/24/21
Functions in CQL Does Clinical Quality Language (CQL) support a mechanism for randomly picking an item from a list? 37 - 7/25/19
Functions in CQL Encounters do not end in the Electronic Health Record (EHR) until closed. Completion of documentation could occur 3 days after the patient has left even though they were only there for 20 minutes. Most implementers figure out how to say the encounter has ended. They either say Departure Time and apply that to the ended encounter or they automatically end all encounters for the measure calculation at the end of the day. While Fast Healthcare Interoperability Resource (FHIR) or Quality Data Model (QDM) allows you say the end, that is not really where the EHR sees it as an end. The implementer has to figure that out and it can get a little complicated. Would it be reasonable to say the beginning of the encounter starts on that day, if you are talking ambulatory, because you’re looking for the number that started that day? Is that significantly different? I am asking that question to decrease implementer variability. 43 - 4/23/20
Functions in CQL How is hospital arrival time defined? 32 - 2/28/19
Functions in CQL There is significant logic involved with looking at dosages and number of doses per day. Is that part of the global library yet? 32 - 2/28/19
General CQL In the current Quality Data Model (QDM) measures for the Annual Update, direct reference codes are not used in the negation expression. Can you use direct reference codes for the negation expression in the QDM measure? 67 - 9/29/22
General CQL If measuring a negation using Quality Improvement-Core, is it a requirement to use one code in the value set as a direct reference code? 67 - 9/29/22
General CQL Will there be updates to the use of negation in future updates of Fast Healthcare Interoperability Resources®? 67 - 9/29/22
General CQL At the September 2022 Connectathon, when testing negation in Quality Improvement-Core (QI-Core), did measure developers install a new plug-in resulting in a change in logic and test cases? 67 - 9/29/22
General CQL Where is the status information on negation in Quality Improvement Core (QI-Core) to understand the details and nuances of the functionality? 67 - 9/29/22
General CQL Can we use the Quality Improvement (QI)-Core 5.0 release in the September 2022 Connectathon? 66 - 7/28/22
General CQL For the September 2022 Connectathon, is it acceptable to build measures for testing using the Quality Improvement (QI)-Core 2022 repository? 66 - 7/28/22
General CQL In a JAVA implementation, when a retrieve expression is performed on a Fast Healthcare Interoperability Resources® (FHIR®) encounter, does the retrieve expression return a FHIR object, or is the object transformed into a tuple, and is the alias a tuple type? 63 - 4/28/22
General CQL In the Clinical Quality Language 1.5 library, if you use double quotes for identifiers, can you pull in a value set using double quotes? 63 - 4/28/22
General CQL Where can I locate the example used in the discussion of $cql operation and test case representation/packaging? 57 - 9/16/21
General CQL In the IG Refresh tooling, when tracking patients that are inpatients in the hospital and have outpatient visits, can a quality measure reference data that would be expected to be present in different systems across both those visits? 56 - 7/29/21
General CQL Is the structure of Clinical Quality Language (CQL) in a similar format to the Fast Healthcare Interoperability Resources® (FHIR®) 4.0 nested structure? 53 - 4/22/21
General CQL How do we actually use CQL against a database to generate results? Is this just another way to express measure functions, or does it run somewhere? 25 - 5/31/18
Hospitalization Where can I find the hospitalization library? 31 - 1.31.19
Measure Logic in CQL Value sets allow us to share concepts within electronic Clinical Quality Measures (eCQMs,) as well as reuse the value set definition within Clinical Quality Language (CQL.) The library example is a set of value set definitions. Where are the value set links pulled from? 69 - 12/01/22
Measure Logic in CQL In this code, what does the abbreviation Cs mean? 69 - 12/01/22
Measure Logic in CQL In this Clinical Quality Language (CQL) statement, is 'most recent' used as a CQL expression? Why is 'most recent' used instead of 'last'? 69 - 12/01/22
Measure Logic in CQL When running Clinical Quality Language (CQL) for clinical decision support, does the evaluation service remember the calculation, like a RESTful server? 69 - 12/01/22
Measure Logic in CQL When using the operation for unit conversion in Clinical Quality Language, in the example, does the operational logic perform the math as well as change the unit? 68 - 10/27/22
Measure Logic in CQL When casting with choice statements in Clinical Quality Language, in the if-then statement, the if statement value is set to a quantity, why is there a redundant statement to express the quantity as an integer function? 68 - 10/27/22
Measure Logic in CQL When using choice types in Clinical Quality Language, why is a unit of '1' used instead of a Unified Code for Units of Measure (UCUM) annotation? 68 - 10/27/22
Measure Logic in CQL In this Quality Improvement-Core negation example, is the reference to D.code in “Venous Foot Pumps (VFP)” referencing a value set, or is it referencing a direct reference code? 67 - 9/29/22
Measure Logic in CQL When querying for instances of negation using Quality Improvement-Core, why is the negation not included in a value set? If a value set has logic that says it should be accepted or excluded, what is the condition by which a value set or a certain value is not performed? 67 - 9/29/22
Measure Logic in CQL Using this Quality Improvement-Core negation example, what is the difference in the meaning between the two General Not Done defining statements? 67 - 9/29/22
Measure Logic in CQL Regarding negation in Quality Improvement-Core and Specific Not Done, is a direct reference code allowed in negation? 67 - 9/29/22
Measure Logic in CQL In the Cumulative Medication Duration expression (collapse Interval per day), does the per day need to be declared? 59 - 12/09/21
Measure Logic in CQL When calculating the Cumulative Medication Duration using Medication Dispense data, are the functions all executed using the Atom plug-in for CQL? Do you tell the Atom plug-in what version of CQL or execution engine to run? 59 - 12/09/21
Measure Logic in CQL The MedicationRequestPeriod function in the cumulative medication duration CQL library is using Fast Healthcare Interoperability Resource (FHIR®) 4.0.1 but not US Core 4.0.0, is this correct? 59 - 12/09/21
Measure Logic in CQL Is the data model used to create the MedicationRequestPeriod function in the cumulative medication duration Fast Healthcare Interoperability Resource (FHIR®) 4.0.1 CQL library part of US Core profile? 59 - 12/09/21
Measure Logic in CQL When calculating age and evaluating it against two integers using CumulativeMedicationsDuration version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6, can we use a closed bracket instead of an open parenthesis? 57 - 9/16/21
Measure Logic in CQL Does the Quality Data Model (QDM) version 5.6 allow for combined or split doses when calculating CumulativeMedicationsDuration version ‘0.3.000’ library logic? 57 - 9/16/21
Measure Logic in CQL When calculating CumulativeMedicationsDuration using version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6, should we use metric dosing (mg/dose) instead of tablets or capsules? 57 - 9/16/21
Measure Logic in CQL How does the CumulativeMedicationsDuration version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6 work with tapering medications? 57 - 9/16/21
Measure Logic in CQL In the CumulativeMedicationsDuration version ‘0.3.000’ library, is it important to return date/time as opposed to just date? 57 - 9/16/21
Measure Logic in CQL If using the date instead of date/time when calculating CumulativeMedicationsDuration version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6, do you still have to add a quantity or can just the integer be used in the calculation? 57 - 9/16/21
Measure Logic in CQL When calculating a CumulativeMedicationsDuration version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6, is the authorDatetime function the same as the date the provider writes the prescription? 57 - 9/16/21
Measure Logic in CQL How does the MedicationOrderPeriod differ from the MedicationDispensePeriod when calculating CumulativeMedicationsDuration version ‘0.3.000’ library in the Quality Data Model (QDM) version 5.6? 57 - 9/16/21
Measure Logic in CQL In the MedicationOrderPeriod function in Clinical Quality Language (CQL), how does day versus days differ in the code? 57 - 9/16/21
Measure Logic in CQL The expectation is for a stratifier to be a complete and disjoint partitioning of the population. For implementations that perform case-at-a-time processing, the calculation and collection of the stratifiers may be part of processing each time, whereas for implementations that evaluate at the population level, there may be independent calculation of the stratifiers. If the logic applies stratifiers to each set of population criteria by default, what is the advantage of applying a stratifier only within a numerator? What is a use case for which that scenario would come up? 54 - 5/27/21
Measure Logic in CQL With the stratifications being somewhat independent of the measure logic itself, it would be interesting to put the stratifiers in a stratifier library, but if you do, how do you reference outside that measure to the library in Fast Healthcare Interoperability Resources® (FHIR)? This would effectively have a library referencing another library resource. 54 - 5/27/21
Measure Logic in CQL Using Quality Data Model (QDM) 5.5 and encounter-based logic, we are looking for encounters where bleeding events occur during both the encounter and within 5 days following an anticoagulant medication administration. If we use the 'from' and 'let' query, does that eliminate an occurrence issue to ensure that all three things (qualifying encounter, anticoagulant medication administration, and bleeding event diagnosis) occurred on the one encounter? There could be multiple qualifying encounters and some of these could happen across encounters but not all occurring on the same exact encounter. 52 - 3/25/21
Measure Logic in CQL We are attempting to determine the most appropriate composite measure scoring type to use for a performance measure we are considering. We are considering two options, 1) Linear combination, and 2) Any-or-none. However, given the fact that the measures are component measures, then we cannot go with option 1 because it only applies to individual measure components. Is that correct? 47 - 10/01/20
Measure Logic in CQL Regarding the denominator exclusions in the patient-based linear combination formula, are the cases in the component individual numerators mutually exclusive? 47 - 10/01/20
Measure Logic in CQL When calculating the combined numerators for the linear combination options, does that mean one patient could be counted in two or more events depending on exclusions? Is that what this composite measure is looking for? 47 - 10/1/20
Measure Logic in CQL Regarding the Troponin Continuous Variable measure (which refers to critical value reporting timeliness) and the use of the CQL calculated sort order within the logic expression where the relatedTo events appear first, will this function calculate the combination that has the minimum or least number of minutes between the two? 45 - 6/25/20
Measure Logic in CQL With respect to the Troponin Continuous Variable measure (which refers to critical value reporting timeliness) and the logic expression defining the function of “Minutes between results and communication by id THEN timing”, should the relatedTo in the expression actually be written as C.relatedTo for sorting purposes? 45 - 6/25/20
Measure Logic in CQL With respect to the Troponin Continuous Variable measure (which refers to critical value reporting timeliness) and the logic expression defining the function of “Minutes between results and communication by id THEN timing”, what is the measure intent and what is the highlighted portion (not exists (C.relatedTo) of the expression looking for? 45 - 6/25/20
Measure Logic in CQL The Troponin Continuous Variable measure is a pathology-driven quality measure under development that relates to critical value reporting and is seeking the time interval in minutes from the time the results for troponin tests are determined and when the laboratory communicates the critical troponin levels to the responsible provider using the electronic health record (EHR) as the source of the data. The measure observation evaluates only the first troponin test followed by a communication (e.g., email, fax) during the encounter. The communication should be completed after the test and should be related to the test for which it is attributed. The issue is in trying to create the logic to relate the communication about a specific test when there are multiple troponin tests during an encounter. As an example, during an encounter we have two troponin tests and one communication: The first troponin test result date time: 2/12/2019 1100; The second troponin test result date time: 2/12/2019 1205; The first communication sent date time: 2/12/2019 1305. The measure should be comparing the communication to test result to which it corresponds. The current logic relates the communication to the first troponin test in the example. How can one address a scenario in which there are multiple toponin tests and related each communication to its respective test result? 44 - 5/28/20
Measure Logic in CQL The Troponin Continuous Variable measure expression provided is looking for minutes between results and communication by id or timing. The expression related to timing makes sense, but the highlighted line says “not exists” so would not that untie the id? 44 - 5/28/20
Measure Logic in CQL In the example below, N (line 8) is the alias of Ambulatory Numerator. Does that definition return a list of the dates? 43 - 4/22/20
Measure Logic in CQL When using the Quality Data Model (QDM) 5.5 as shown in the example, does this return a date? 43 - 4/22/20
Measure Logic in CQL CMS826v0 - Hospital Harm - Pressure Injury – How would you express an encounter with a new harmful pressure injury? 40 - 12.5.19
Measure Logic in CQL For the measure CMS646, Bladder Cancer (https://oncprojectracking.healthit.gov/support/browse/CQLIT-206), how do you express specific references for bladder cancer and combine several definitions into one? 40 - 12.5.19
Measure Logic in CQL For measure CMS111, Median Admit Decision Time to ED Departure Time for Admitted Patients (https://oncprojectracking.healthit.gov/support/browse/CQLIT-207), we are having a measure observation calculation issue, where some duration calculation results are based on the ending interval (end time of encounter). If the emergency department (ED) encounter does not include the facility location, it should not calculate a "Visit" encounter for the measure observation time. If the ED facility location departure time is missing, a measure observation time should not be calculated, but in Bonnie this does occur. Is this due to the logic below? Should we add a null clause in the Initial Population to indicate if there is no ED facility location departure time the encounter will not be included? 40 - 12.5.19
Measure Logic in CQL What is the best way to specify in Clinical Quality Language (CQL) that a medication was present on admission for an inpatient encounter? There have been conversations recently about a "presentOnAdmissionIndicator" for diagnoses in Quality Data Model (QDM) 5.5, but not something equivalent for medications. 37 - 7.25.19
Measure Logic in CQL How do you represent Structured Query Language (SQL) joins in Clinical Quality Language (CQL)? 37 - 7.25.19
Measure Logic in CQL In discussing CLONE Hospital Harm – Pressure Injury Draft 0.00, the measure assesses the proportion of inpatient encounters for patients 18 years and older upon admission and the presence of stage 2, 3, or 4 deep tissue pressure injury or unstageable deep tissue pressure injury. This measure documents deep tissue pressure injury upon arrival or 24 hours after admission. (May be a need to create value sets for anatomical sites to support this measure.) 36 - 6.27.19
Measure Logic in CQL In the example measure on Pressure Injury, how would the code for diagnosis display the information if the diagnosis appears in both the Encounter diagnosis and in the Present on Admission indicator and a diagnosis record? It seems that you would say there is a diagnosis record and it has the same code as the diagnosis code in the encounter diagnosis. 36 - 6.27.19
Measure Logic in CQL If you have overlapping depression periods with no end-date in the measurement period, do you get a query with all the diagnoses? 30 - 12.6.18
Measure Logic in CQL What value is returned in risk adjustment? Is it different between EP measures vs. EH measures? 30 - 12.6.18
Measure Logic in CQL For the calculate age in years expression, do we have to add the date from patient birth time and the date from start of measurement period? 29 - 10.5.18
Measure Logic in CQL Which is recommended; use patient directly or patient.birthdatetime? 29 - 10.5.18
Measure Logic in CQL Is blood pressure identified as an observation or as a component of an observation? 28 - 9.27.18
Measure Logic in CQL In calculating methods for determining doses per day using the QDM medication elements, can active medications be used instead of ordered, assuming the patient is taking the medication as directed? 28 - 9.27.18
Measure Logic in CQL In the ED encounter observation expression, can the union be used with both option 1 (use of an Encounter code to model observation) and option 2 (use of an Encounter facility location to model observation)? 27 - 7.26.18
Measure Logic in CQL Does the logic shown cover a scenario where the patient goes from outpatient status directly to inpatient? 27 - 7.26.18
Measure Logic in CQL Can the "define function" pattern be used to customize measures where an outpatient visit is not to be considered as an episode of care? 27 - 7.26.18
Measure Logic in CQL "Most or Moderately Effective Contraception Provided" Contraception

Return Contraception.code

This will return different types of contraceptives including counseling. Do they need to be listed independently or can a definition be used in the supplemental element?
26 - 6.28.18
Measure Logic in CQL I see there is an attribute result. How does this differ from the attribute component? 25 - 5.31.18
Measure Logic in CQL In the specifications, is it necessary to specify that the boundary is closed or open? 24 - 4.26.18
Measure Logic in CQL When the "where" clause is used in the example; does it mean that the "let…" statement can only be assigned one line of code? 24 - 4.26.18
Measure Logic in CQL Is the statement, "The denominator is always a subset of the initial population, so the criteria entered to define "Initial Population" does not have to be duplicated for define "Denominator"" only true for patient-based measures? 24 - 4.26.18
Measure Logic in CQL Did you have to use Coalesce since you are using two different data types or are the attributes the same? 23 - 2.22.18
Measure Logic in CQL Is there a preferred pattern to use if not using Coalesce? 23 - 2.22.18
Measure Logic in CQL Is the Hepatitis B immunizations procedure a value set or definition? 23 - 2.22.18
Queries in CQL Considering Clinical Quality Language (CQL) aggregate functions using Fast Healthcare Interoperability Resources® (FHIR®) v4.0.1 and calculating the number of each kind of observation a patient has, can the query use the GROUP BY clause? 61 - 2/24/22
Queries in CQL When using Global Common Library v5 to calculate age, the FHIRHelpers.ToDate(Patient.birthDate) function must be explicitly used by the measure developer within the logic expression. However, in the Global Common Library v6, the FHIRHelpers.ToDate(Patient.birthDate) function does not have to be written in the logic expression to generate the equivalent result. Does Global Common Library v6 use FHIRHelpers.ToDate(Patient.birthDate) function in a tooling layer in the code? 55 - 6/24/21
Queries in CQL In the Influenza Vaccine measure (CMS 147), when following the negation rationale pattern for Immunization Not Done queries in Clinical Quality Language (CQL), if more than one criterion is returned in the query, does the expression stop after the first criterion is met and returned? 55 - 6/24/21
Queries in CQL For patients receiving immune checkpoint inhibitor (ICI) therapy for the treatment of cancer, and need thyroid-stimulating hormone (TSH) testing every eight weeks, how do you write an expression to capture appropriate TSH testing during ICI therapy administration where the first ICI treatment period starts within the measurement period? An ICI treatment period is defined as consecutive ICI administrations no more than eight weeks apart. 53 - 4/22/21
Queries in CQL When writing an expression to capture thyroid-stimulating hormone (TSH) lab tests at the start of an 8-week course of immune checkpoint inhibitor (ICI) therapy, specifically dates that are in between measurement periods and you do not want to duplicate administration dates captured in a previous measurement period, is the statement where Therapy.relevantPeriod starts 1 year or less before start of "Measurement Period" in the logic expression redundant since this statement is the timing for the ICI therapy definition? 53 - 4/22/21
Queries in CQL When defining the immune checkpoint inhibitor (ICI) therapy Bins, the expand operator was used to create a list. Since the return point from X will return an integer, are we able to subtract since it is an integer and not a list anymore? 53 - 4/22/21
Queries in CQL When using a library to illustrate patterns for accessing related Fast Healthcare Interoperability Resources® (FHIR®) through references, what does the highlighted term Medication refer to in the line of code below? 53 - 4/22/21
Queries in CQL How do you write an expression to return all immune check inhibitor (ICI) therapies, over a 12-month period, where the ICI administration dates are eight weeks or less between administration? 52 - 3/25/21
Queries in CQL When working with a measure that is looking for patients for whom thyroid stimulating hormone (TSH or T4) testing is performed at least once every 8 weeks while receiving immune check inhibitor (ICI) therapy for a maximum duration of 1 year from the start of ICI therapy, how can the data be sorted into relevant bins while looking for an abnormal TSH or T4 result? 52 - 3/25/21
Queries in CQL When setting up relationships between multiple sources of data at the same time, what should you expect to see as the return with multi-source queries without specifying a return statement? For example, in CMS144v7: Consecutive Heart Rates less than 50 Inpatients, what would you expect to see as the return if not using a return statement? 35 - 5.23.19
Queries in CQL In multi-source queries, if an attribute is not mentioned specifically in the query, like the "method" attribute, will it still be included in the return? 35 - 5.23.19
Queries in CQL In multi-source queries, is it feasible to specify the type of attributes we want returned? 35 - 5.23.19
Queries in CQL How should we express the criteria that a Substance Use Disorder (SUD) encounter in the "identification period" (6 months before through the first 6 months of the measurement period) is considered new if there are no other SUD encounters in the 60 days prior to the encounter, and that for each new SUD encounter, there is a baseline Quality of Life (QOL) assessment in the 14 days on or before the new SUD encounter, and a corresponding follow up QOL using the same assessment tool within 3 to 6 months of the new SUD encounter, and having a SUD encounter within 60 days of the follow up QOL assessment? 34 - 4.25.19
Queries in CQL Looking at the solution for the connection of the mother and baby, is the capability for a cross-context query for a related person new to CQL? 33 - 3.28.19
Queries in CQL Is the related person query included in the FHIR Quality Measure Implementation Guide? 33 - 3.28.19
Queries in CQL Is "from" required when setting up a relationship between more than two sources and "with" when setting up a relationship with only two sources? 32 - 2.28.19
Queries in CQL I am new to CQL, how do we run CQL queries - is it against C-CDA documents? 31 - 1.31.19
Using Fast Healthcare Interoperability Resources (FHIR) In Fast Healthcare Interoperability Resources® 4.0.1, when writing a calculation that requires complex arithmetic, would it be best to use the fluent function to make the logic more readable to the measure implementer? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) In the Fast Healthcare Interoperability Resources®-based Global Common library, is the “Normalize Interval” an example of a fluent function in Clinical Quality Language using syntactic sugar*? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) In Fast Healthcare Interoperability Resources® 4.0.1, the creation of US Core Elements library v3.1.1 and Quality Improvement (QI)-Core Elements library v4.1.0 were to define functions to expose extensions as fluent functions in Clinical Quality Language (CQL). How would the use of these fluent functions appear in the Measuring Authoring Tool (MAT) human readable format for a user? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) Are fluent functions only feasible in Fast Healthcare Interoperability Resources (FHIR®) and not in a Quality Data Model (QDM) specification? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) In Fast Healthcare Interoperability Resources® 4.0.1, is there a difference in the use of fluent functions if you define the fluent function in a shared library instead of the code? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) When using fluent functions in Fast Healthcare Interoperability Resources® 4.0.1, do you need to use the prefix if you define the intervals in different files? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) In Fast Healthcare Interoperability Resources® 4.0.1, when using fluent functions, where do the data requirements display for the end user? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) When using fluent functions in Fast Healthcare Interoperability Resources (FHIR®) 4.0.1, how does FHIR resolve the conflict if two libraries have fluent functions with the same name? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) Do fluent functions support overloading? 58 - 10/28/21
Using Fast Healthcare Interoperability Resources (FHIR) Is there a group that is working to harmonize the National Council for Prescription Drug Programs (NCDCP) and Fast Healthcare Interoperability Resources® (FHIR)? 57 - 9/16/21
Using Fast Healthcare Interoperability Resources (FHIR) Regarding resource patterns in Fast Healthcare Interoperability Resources (FHIR®) version 4.0.1, could both the reference and the identifier fields be populated with different values? 56 - 7/29/21
Using Fast Healthcare Interoperability Resources (FHIR) Using Fast Healthcare Interoperability Resources® (FHIR®) version 4.0.1 resources, is there information on how to resolve references within bundles? 56 - 7/29/21
Using Fast Healthcare Interoperability Resources (FHIR) When calculating Cumulative Medication Duration in Fast Healthcare Interoperability Resources (FHIR®), are refills considered in a medication dispense for individual prescription refills? 54 - 5/27/21
Using Fast Healthcare Interoperability Resources (FHIR) Regarding Cumulative Medication Duration in FHIR, what logic expression should the measure developer use for a prescription specifying a number of tablets and uses a semantic clinical drug (SCD) concept that specifies the tablet strength (e.g., lisinopril 10 mg tablet, administer two tablets)? 54 - 5/27/21
Using Fast Healthcare Interoperability Resources (FHIR) Regarding Cumulative Medication Duration in Fast Healthcare Interoperability Resources (FHIR®), within the define function of the MedicationDispensePeriod logic expression, when would a measure developer use the start of boundsPeriod compared to D.whenPrepared? The structure of the Coalesce line of code is written in a way that suggests start of boundsPeriod is the preferential timing attribute for the MedicationDispensePeriod logic expression in all cases. 54 - 5/27/21
Using Fast Healthcare Interoperability Resources (FHIR) Within the Cumulative Medication Duration in Fast Healthcare Interoperability Resources (FHIR®), is there a calculation that works well with adjacent intervals and the collapse function? 54 - 5/27/21
Using Fast Healthcare Interoperability Resources (FHIR) In Cumulative Medication Duration using the Fast Healthcare Interoperability Resources (FHIR®) standard, what logic expression should the measure developer use to accommodate an early refill on a medication dispense? 54 - 5/27/21
Using Fast Healthcare Interoperability Resources (FHIR) When using Clinical Quality Language (CQL) with Fast Healthcare Interoperability Resource (FHIR), FHIR has some things called Extensions and Slices. What’s the difference between them? In which scenario should we use them? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) For the current Fast Healthcare Interoperability Resource (FHIR) resource version, implementers created an extension due to some missing information that was required for Quality Improvement Core (QI-Core). For the next FHIR version, will this extension be replaced by a formal element? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Regarding Slices in Quality Improvement Core (QI-Core) version 4.0.0, how do you get the blood pressure profile in the example? Is it using the name or the code? Because it is not really defined with the condition we are going to follow. Right? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Where can I find the using statement that references Quality Improvement Core (QI-Core) 4.0.0? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Is the Quality Information and Clinical Knowledge (QUICK) data model Extensible Markup Language (XML) using Fast Healthcare Interoperability Resources (FHIR) Helpers? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Does the Quality Improvement Core (QI-Core) model info 4.0.0 Extensible Markup Language (XML) use Fast Healthcare Interoperability Resources (FHIR) Helpers? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Which model should measure developers use while coding within Fast Healthcare Interoperability Resources (FHIR)? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Over the last year, there have been changes to CQL. Is the version of CQL that was used to build the Expression Logical Model (ELM) available? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Once Quality Improvement Core (QI-Core) becomes stable, will HL7 publish an update to include the new model information and replace the Quality Information and Clinical Knowledge (QUICK) model tab? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) In regard to Slices in Quality Improvement Core (QI-Core), where do you find the naming to define a new QI-Core profile more directly? How do you define values that you need to put in? For example, how is the “observation-bp” defined and applied? 43 - 4/23/20
Using Fast Healthcare Interoperability Resources (FHIR) Can you provide some resources for using Clinical Quality Language (CQL) in Fast Healthcare Interoperability Resources (FHIR)? 42 - 2.27.20
Using Fast Healthcare Interoperability Resources (FHIR) In the example on AllergyIntolerance, why are some Quality Improvement (QI)-Core Patterns, such as "allergy-active" and "allergy-confirmed," represented in the Global Common Library? (the rest of the question is in the answer) 42 - 2.27.20
Using Fast Healthcare Interoperability Resources (FHIR) Regarding the measure Device Indicating Frailty, when considering Fast Healthcare Interoperability Resources (FHIR)-based Clinical Quality Language (CQL) Quality Improvement (QI)-Core Patterns within the DeviceRequest.intent comparison, is there a way to ask whether the code is "like "%order"", similar to the what is supported by some database query languages? (the rest of the question is in the answer) 42 - 2.27.20
Using Fast Healthcare Interoperability Resources (FHIR) Based on EXM130 – consider the Procedure.performed element - In the Fast Healthcare Interoperability Resources (FHIR) Standard for Trial Use (STU) 3, it is defined as a choice of dateTime Period and in R4, it is defined as a choice of dateTime
Using Fast Healthcare Interoperability Resources (FHIR) Based on the EXM130 expression below, can you explain the "Message" function and each component of it? 41 - 1.16.20
Using Fast Healthcare Interoperability Resources (FHIR) Based on the EXM130 expression below, why does the message only happen to the timing, instance, and string? Does it not apply for all resources? 41 - 1.16.20
Using Fast Healthcare Interoperability Resources (FHIR) In the EXM130 expression below, would it be better to move the FHIR.Timing and the FHIR.string to the bottom of the list if one were to prioritize the list? 41 - 1.16.20
Using Fast Healthcare Interoperability Resources (FHIR) The measure EXM135 is an example of ConditionOnsetAbatementPrevalencePeriod where we determine the Onset/Abatement and Prevalence Period for a condition. This makes sense for Pregnancy, but could you also use the procedure "Delivery" to say that it ended? 41 - 1.16.20
Using Fast Healthcare Interoperability Resources (FHIR) For the measure EXM135, is there a reason you exclude the timepoint of the abatement time by using parentheses ")" instead of brackets "]"? 41 - 1.16.20
Using Fast Healthcare Interoperability Resources (FHIR) From a performance perspective of a Quality Data Model (QDM) approach vs. a Fast Healthcare Interoperability Resource (FHIR) approach, you might be able to have a pretty efficient database access with QDM. With the FHIR measure doing one patient at time, you"re going to be making a lot of FHIR application programming interface (API) calls. One option might be to use a FHIR bulk export, which would return a large Newline-Delimited JavaScript Object Notation (ND JSON) file (the file format used for bulk data transfer in FHIR), that might be a way to get a lot of information at one time. Is there some thought to using a bulk concept to frontload the data? 39 - 10.24.19
Using Fast Healthcare Interoperability Resources (FHIR) Once the Quality Improvement (QI)-Core QUICK model is fully mature and supported, will that be the expected mechanism to write a Fast Healthcare Interoperability Resources (FHIR)-based measure? 39 - 10.24.19
Using Fast Healthcare Interoperability Resources (FHIR) In the draft of the Exclusive Breast Milk Feeding Measure - PC-05 (snippet from EXM9_FHIR4 version 8.1.000), there are some specific changes on how to represent some of the concepts used in this measure within Fast Healthcare Interoperability Resources (FHIR). Specifically, there are some changes around representation of total parenteral nutrition and nutrition intake resource that are planned for R5. When looking at a single newborn with no parenteral nutrition given, generally does status matter if it"s a negation? 39 - 10.24.19
Using Fast Healthcare Interoperability Resources (FHIR) With the Exclusive Breast Milk Feeding Measure - PC-05 (snippet from EXM9_FHIR4 version 8.1.001), currently Breast Milk is a value set with a substance code. In order to use the Procedure resource, can we create a new value set containing all the Procedure codes for Breast Milk? If we have that value set, can we just say procedure breast milk? 39 - 10.24.19
Using Fast Healthcare Interoperability Resources (FHIR) How would some of the most commonly used datatypes in Quality Data Model (QDM) be expressed in a Fast Healthcare Interoperability Resource (FHIR)-based measure? 37 - 7.25.19
Using Quality Data Model (QDM) In the QDM (Quality Data Model) library related to medication dispense period, is a relevant date and time allowed to be used as a starting point when other data points are absent? 59 - 12/09/2021
Using Quality Data Model (QDM) Using Quality Data Model (QDM) 5.5 and the RatioExample library, we want to calculate the number of inpatient falls with major injury per 1,000 patient days. We can represent the measure as an encounter-based ratio measure, but there is not a mechanism in the current Clinical Quality Language (CQL)-based Health Quality Measure Format (HQMF) to specify that the ratio should be “per 1,000 days.” How can we build this in CQL so we can express in the Measure Authoring Tool (MAT)? 50 - 1/21/2021
Using Quality Data Model (QDM) The example as seen below relates to Specifying an Individual Actor is a Member of an Organization. The expression defines an Organization as the Quality Data Model (QDM) Entity used for the encounter participant. Further, it indicates that the individual who orders an eye examination (Intervention, Order) using the QDM Entity Practitioner and that the practitioner identifier is within the organization identified as the performer of the qualifying encounter. The expression also assures the individual who performs the eye examination (Intervention, Performed) is also a practitioner whose identifier is within the organization identified as the performer of the qualifying encounter. Note that this is a hypothetical example. All the actor identification requirements are optional at the discretion of the measure developer and all require validation that seeking such detail is feasible for implementation. In this example, will the expression work in Bonnie? 50 - 1/21/2021
Using Quality Data Model (QDM) When using the Quality Data Model (QDM) v.5.5 attributes for organizations, does this example make sense? 46 - 7/30/2020
Using Quality Data Model (QDM) In the Quality Data Model (QDM) 5.5, what does the expand operator do? Can it be used to make a list of each day in the measurement period? 43 - 4/23/20
Using Quality Data Model (QDM) In QDM 5.5, we have reduced ability to talk about entity types and these are attributes that are patients, persons, or practitioners. In the examples we"ve used to illustrate these is using the "is" operator in CQL by saying participant is an organization. However, there is an issue with Bonnie that it doesn"t support the "is" operator, but it does support the "as" operator. How do we work around this issue? 40 - 12.5.19
Using Quality Data Model (QDM) QDMs are not really used for interoperability like FHIR is, it defines the type of metadata that we call attributes. Is it true that EHRs have been implemented to be able to export the full QDM set of attributes every time you ask for something? That"s the ideal. 35 - 5.23.19
Using Quality Data Model (QDM) Does the new Related Person QDM datatype allow an eCQM specification to reference information about a related person that is already present in the patient"s record? As an example, instead of a direct context query, maternal information may be shared in a C-CDA and incorporated into an infant"s record. 33 - 3.28.19
Using Quality Data Model (QDM) Is the type of coverage, e.g., commercial, Medicare, Medicaid considered in the QDM participation logic? 32 - 2.28.19
Using Quality Data Model (QDM) Is it accurate that if the glucocorticoid dosage expression was used for dispensed to ordered, results would be different because all the attributes are not available? 31 - 1.31.19
Value Sets and CQL What is the importance of being able to query for a negation when using Quality Improvement-Core? 67 - 9/29/22
Value Sets and CQL In the library ImmunizationNotDoneExample, using Fast Healthcare Interoperability Resources® (FHIR®) version 4.0.1, does the measure developer need to specify the define “Influenza Vaccine Not Administered” in the measure since the code is happening in the background? 55 - 6/24/21
Value Sets and CQL What is the definition of "mother"? Is this a new value set to represent the mother relationship? I expect the new value set to represent the mother relationship 33 - 3/28/19

Wiki Index

Home

Authoring Patterns - QICore v4.1.1

Authoring Patterns - QICore v5.0.0

Authoring Patterns - QICore v6.0.0

Authoring Measures in CQL

Composite Measure Development

Cooking with CQL Examples

Cooking with CQL Q&A All Categories
Additional Q&A Examples

CQL 1.3 Impact Guidance

CQL Error Messages

Developers Introduction to CQL

Discussion Items

Example Measures

Formatting and Usage Topics

Formatting Conventions

Library Versioning

Negation in QDM

QDM Known Issues

Specific Occurrences

Specifying Population Criteria

Supplemental Data Elements

Terminology in CQL

Translator Options For Measure Development

Unions in CQL

Clone this wiki locally