-
Notifications
You must be signed in to change notification settings - Fork 27
Cooking with CQL Examples Sessions 1 50
This page contains the examples from Cooking with CQL sessions 21 through 50, in reverse chronological order. Sessions 1 through 20 (2016 and 2017) are on the Archived Cooking with CQL Sessions page. See Cooking with CQL Examples for the complete session index and the most recent sessions, and Cooking with CQL Examples - Sessions 51-100 for later sessions.
| Session | Date | Topics |
|---|---|---|
| 50 | 2021-01-21 | Collapse with null ending boundary; medication coverage; falls per 1000 patient days; QDM 5.6 entities |
| 49 | 2020-12-03 | Cumulative medication duration; Connectathon 26 review |
| 48 | 2020-10-29 | Lab tests every six weeks redux; QDM timings; interval boundary access |
| 47 | 2020-10-01 | Lab tests every six weeks; inpatient stay 48 hours or more; composite measure calculation |
| 46 | 2020-07-30 | QDM organization attributes; with vs. from; CQL timing phrases |
| 45 | 2020-06-25 | Coalesce review; high risk medications; advanced illness; troponin measure followup |
| 44 | 2020-05-28 | CQL basics and resources; query return types; collapse and expand; troponin continuous variable measure |
| 43 | 2020-04-23 | Encounters per day; FHIR, CQL, and QI-Core |
| 42 | 2020-02-27 | QI-Core usage patterns |
| 41 | 2020-01-16 | Medications not documented; choice-element timing; condition prevalence period; blood pressure components |
| 40 | 2019-12-06 | CMS826 pressure injury redux; bladder cancer measure; measure observation calculation; is vs. as
|
| 39 | 2019-10-24 | CMS130 colorectal cancer screening (QDM and FHIR); EXM9 exclusive breast milk feeding |
| 38 | 2019-09-26 | Using FHIR to specify eCQMs |
| 37 | 2019-07-25 | Medications present on admission; representing SQL joins in CQL; QDM-to-FHIR side-by-side |
| 36 | 2019-06-27 | Nested definitions; hospitalization with observation; QDM vs. CQL timing phrases; pressure injury measure |
| 35 | 2019-05-23 | Multi-source query examples; QDM 5.5 timing attributes |
| 34 | 2019-04-25 | Issue tracker examples: multi-source queries, equal vs. equivalent, durations, multiple encounters |
| 33 | 2019-03-28 | QDM 5.5 change review; CQL 1.4 ballot review; negation rationale; related context retrieves |
| 32 | 2019-02-28 | Common patterns: age calculation, most recent lab result, comparing and sequential events, determining coverage |
| 31 | 2019-01-31 | Singleton results; lowest most recent blood pressure; same or after semantics; default temporal precision; coalesce; glucocorticoid dosage |
| 30 | 2018-12-06 | Hypoglycemia risk; anti-MRSA antibiotics; positive depression screening; ACO38 risk standardized readmission rates |
| 29 | 2018-10-25 | Terminology usage and VSAC; hospitalization admission source; age calculation; Boolean naming conventions |
| 28 | 2018-09-27 | Continuous variable ratio measure; blood transfusion; averaged blood pressures; conception date; user-defined functions |
| 27 | 2018-07-26 | Observation status and its impact on hospitalization functions |
| 26 | 2018-06-28 | Stratification; supplemental data; risk adjustment variables; common error messages |
| 25 | 2018-05-31 | Calculation differences between QDM logic and CQL; negation redux; QDM 5.4 changes |
| 24 | 2018-04-26 | Overlaps operator; claim query in FHIR; regional anesthesia; contraceptive provision; radiology report |
| 23 | 2018-03-29 | QDM specific occurrences in CQL; CMS105 walkthrough |
| 22 | 2018-02-22 | Encounter diagnoses; ED encounters; consecutive heart rates; allergy to eggs; smoking cessation |
| 21 | 2018-01-18 | 2nd Tylenol administration during an encounter; NCQA vaccination example; opioid MME calculation |
Topics:
- Collapse with null ending boundary
- Medication Coverage (rolling out intervals)
- Falls per 1000 patient days (QDM and FHIR Ratio Measure)
- QDM 5.6 Entities
- Examples
-
Cooking with CQL Q&A
- Date and Time Calculation - Third test as successor maximum for test expressions for collapse with null ending boundary
- Using Quality Data Model - Number of inpatient falls with major injury per 1,000 patient days
- Using Quality Data Model - Specifying an Individual Actor is a Member of an Organization expression
Topics:
- Connectathon 26 Review
- Cumulative Medication Duration
- Examples
- There were no Q&As for this session
Topics:
- Lab Tests Every Six Weeks Redux
- QDM Timings
- Interval Boundary Access
- Examples
-
Cooking with CQL Q&A
- Date and Time Calculation - Lab Tests Every Six Weeks Revisited
- Date and Time Calculation - normalizeInterval function
Topics:
- Lab Tests Every Six Weeks
- Inpatient Stay 48 Hours Or More
- Composite Measure Calculation
- Examples
-
Cooking with CQL Q&A
- Composite Measure Scoring
- Linear Combination Options
- QDM Organization Attributes
- What value to use for namingSystem for NPI or other formal identifiers for organizations
- Check that the organization associated with a blood pressure is the same as the encounter
- Using
withvsfrom - CQL Timing Phrases
- Examples
-
Cooking with CQL Q&A
- Quality Data Model (QDM) v.5.5 attributes for organizations
- Date & Time Calculations - subtraction of one hour when there is a leap second
- Interpreting Time Phrases in CQL
Topics:
- Connectathon Announcement
- Feedback Request on CDS Connect Authoring Tool
- Coalesce Review
- High Risk Medications
- Advanced Illness
- Troponin Measure Followup
- Examples
-
Cooking with CQL Q&A
- Troponin Continuous Variable measure - CQL calculated sort order
- Troponin Continuous Variable measure - Minutes between results and communication by id THEN timing
Topics covered:
- CQL Basics and Resources Review
- Query Return Types
- Using Collapse and Expand
- Troponin Continuous Variable Measure
- Examples
-
Cooking with CQL Q&A
- Troponin Continuous Variable Measure - multiple Toponin tests and communication
- Troponin Continuous Variable Measure - minutes between results and communication by id or timing
In this session we reviewed:
- EncountersPerDay - Returning a single encounter per day during a given time period
- FHIR, CQL, and QICore
- Examples
-
Cooking with CQL Q&A
- Ambulatory Numerator
- Beginning of Encounter
- CQL Version for ELM
- Expand Operator
- Extensions
- Extensions vs Slices
- FHIR Helpers
In this session we reviewed:
- QI Core Usage Patterns
- Examples
-
Cooking with CQL Q&A
- Resources for CQL in FHIR
- Allergy Intolerance
- Use of DeviceRequest
- QI-Core Patterns
In this session we reviewed:
- Before and after assessments
- Continued discussion of EXM105
- A pattern for Medications Not Documented in FHIR3/4
- A pattern for Timing with Choice Elements (dateTime|Period)
- Expanding the pattern for Observation timing (dateTime|Period|Timing|instant)
- Expanding the pattern for Procedure performance timing (dateTime|Period|string|Age|Range)
- A pattern for Condition onset/abatement/prevalence period
- Blood pressure components
- Examples
-
Cooking with CQL Q&A
- Normalize Interval function in EXM 130
- Timing, instance, and string in EXM 130
- Condition Onset Abatement Prevalence Period in EXM 135
In this session we covered:
- CMS826 - Pressure Injury Redux
- CQLIT-206 - Bladder Cancer Measure
- CQLIT-207 - Measure Observation Calculation Issue
- Is vs As for Entity Examples
- Examples
-
Cooking with CQL Q&A
- CMS 826v0 Pressure Injury Redux
- CQLIT-206 Bladder Cancer Measure (CMS646)
- CQLIT-207 Measure Observation Calculation Issue - Median Admit Decision Time to ED Departure Time for Admitted Patients in CMS 111
- Is vs As for Entity Examples
In this session we covered:
- CMS130 - Colorectal Cancer Screening, QDM and FHIR Walkthrough
- EXM9 - FHIR Draft of Exclusive Breast Milk Feeding
- Examples
-
Cooking with CQL Q&A
- CMS 130 Measure walkthrough – QDM and FHIR
- EXM9 – Exclusive Breast Milk Feeding
In this session, we reviewed the use of FHIR to specify eCQMs.
In this session we reviewed:
- Medications present on admission
- Representing SQL joins in CQL
- JIRA Issue Tracker Questions
- QDM-to-FHIR Side-by-Side
- Examples
-
Cooking with CQL Q&A
- Medications Present on Admission
- SQL Joins in CQL
- CQLIT-171 Randomly pick an element from a list
- QDM to FHIR side by side:
- Diagnosis in CMS72v8
- Encounter, Performed using the example from MATGlobalCommonFunctions
- Medication, Order using the example from VTE-1
- Procedure, Performed using the example from VTE-1
In this session we reviewed:
- Criteria with nested definitions
- Hospitalization with observation function
- QDM versus CQL timing phrases and interpretation
- Pressure Injury Measure
- Examples
-
Cooking with CQL Q&A
- Pressure Injury Measure
In this session we reviewed:
- Multi-source Query Examples
- Timing Considerations given new QDM 5.5 timing attributes
- Examples
-
Cooking with CQL Q&A
- Multi-source Query Examples
- Timing Examples – Considerations for the new QDM 5.5 timing options
In this session we reviewed examples from questions and issues that have been submitted through the CQL Issues tracker:
- Examples
-
Cooking with CQL Q&A
- Multi-source Queries (CQLIT-158)
- Equal vs Equivalent (CQLIT-157)
- Duration in Days (CQM-3552)
- Duration with Partials (QDM-229)
- Multiple Encounters (CQLIT-165)
In this session we reviewed the following:
-
QDM 5.5 Change Review
-
CQL 1.4 Ballot Review
-
Negation Rationale Examples
-
Related Context Retrieves
-
- Related Persons QDM datatype
- Mother-Baby related context queries
- Pregnancy due date definition
In this session we will review common patterns from across all the measures:
- Age Calculation
- Most Recent Lab Result
- Comparing Pairs of Events
- Sequential Events
- Age Based Risk Factors
- Followup Timeframe
- Intermediate Results
- Maximum Value
- Determining Coverage
- Examples
-
Cooking with CQL Q&A
- Multi-source Query vs Single-source Query – use of from vs with
- Hospital Arrival Time definition
- Dosages and number of dosages per day
- Use of not equivalent comparison
- Age Based Risk Factors
- Determining Coverage
In this session, we reviewed and discussed:
- Singleton Results
- Lowest Most Recent Blood Pressure
- Same Or After Semantics
- Default Temporal Precision
- Blood Pressure Exam Without Inpatient Stay
- Coalesce Semantics
- Glucocorticoid Dosage
- Examples
-
Cooking with CQL Q&A
- Coalesce Semantics
- Glucocorticoid Dosage – Date vs DateTime
- Using QDM - Dispensed to Ordered
In this session, we reviewed and discussed:
- Characterization of Hypoglycemia Risk
- Appropriate use of anti-MRSA Antibiotics
- Positive Depression Screening
- ACO38 - "Risk Standardized Readmission Rates" - Part I (Diagnosis Counts)
- ACO38 - "Risk Standardized Readmission Rates" - Part II (Risk Adjustment Variables)
- Examples
-
Cooking with CQL Q&A
- Positive Depression Screening
- "Risk Standardized Readmission Rates" - Part II (Risk Adjustment Variables)
In this session we reviewed:
- Measure Terminology Usage and the Value Set Authority Center
- Hospitalization Admission Source CQLIT-136
- Calculate Age Discussion
- Calendar Age for Immunization Question
- Naming conventions for Boolean-valued expressions
- Examples
-
Cooking with CQL Q&A
- Calculate Age Discussion
- MATGlobalCommunFunctions - patient.birthdatetime
In this session we reviewed:
- A Continuous Variable Ratio Measure (Hypoglycemia)
- First occurrence of a blood transfusion
- Blood pressure readings as an average
- Calculating conception date using gestational age assessments
- Reviewed user-defined functions in CQL
- Indicators of adverse events following a blood transfusion
- Calculation methods for determining doses per day using QDM medication elements
- Examples
-
Cooking with CQL Q&A
- Blood pressure readings as an average instead of most recent
- Calculation methods for determining doses per day using QDM medication elements
In this session we reviewed the concept of "Observation Status" and its impact on the definition of an Episode-of-Care. We then looked at how that would impact the existing Hospitalization functions and proposed new Hospitalization with Observation and Hospitalization with Outpatient functions to allow observation to be considered as part of an episode-of-care within a measure.
- Examples
-
Cooking with CQL Q&A
- Impact of incorporating Observation status into the Hospitalization functions
- ED encounter observation expression
- outpatient to inpatient logic expression
- ‘define function’ pattern
- Impact of incorporating Observation status into the Hospitalization functions
In this session we reviewed:
- Stratification
- Supplemental Data
- Risk Adjustment Variables
- Common Error Messages
For Stratifiers, Supplemental Data Elements, and Risk Adjustment Variables, we used a draft contraceptive measure to illustrate building these components. The draft measure is included in the examples for this session here.
For CQL Validation Messages, we've developed a new topic on the CQL Formatting and Usage wiki that provides CQL authors with an overview of how validation is performed on CQL, the kinds of messages that it will produce, and a catalog of validation messages that may be encountered when authoring CQL in tools like the Measure Authoring tool.
The new page is available in the CQL Error Messages topic.
- Examples
-
Cooking with CQL Q&A
- Contraceptive Measure - Stratifiers, Supplemental Data Elements, and Risk Adjustment Variables
In this session we reviewed the following:
- Calculation Differences between QDM Logic and CQL
- Negation Redux
- QDM 5.4 Upcoming Changes Review
- Examples
-
Cooking with CQL Q&A
- Using CQL against a database to generate results?
- Attribute result vs component (see session 18 for another example)
In this session we reviewed the following:
- Detailed Review of the Overlaps operator
- A Claim query in FHIR
- Regional Anesthesia Measure Question
- Review of Contraceptive Provision Measure
- Radiology Report Measure Discussion
- Examples
-
Cooking with CQL Q&A
- Boundary – open vs closed
- RegionalAnesthesia - “where” clause in let procedure statement
- Denominator statement clarification
In this session we reviewed the following:
- Representation of QDM specific occurrences in CQL
- Walkthrough of CQL representation of CMS 105
- Examples
-
Cooking with CQL Q&A
- Computation of measures
- Using specific codes from an existing value set
- Creating a new value set
In this session we reviewed the following:
- Encounter diagnoses
- ED Encounters
- Consecutive Heart Rates
- Allergy to Eggs
- Smoking Cessation
- Examples
-
Cooking with CQL Q&A
- Hepatitis B immunizations procedure - value set or definition
- authorDatetime and relevantPeriod;
In this session we reviewed the following:
- 2nd Tylenol Administration During an Encounter
- Vaccination Example from NCQA
- Opioid Overuse Potential Quality Measure Utilizing Decision Support Logic for MME Calculation
Authoring Patterns - QICore v4.1.1
Authoring Patterns - QICore v5.0.0
Authoring Patterns - QICore v6.0.0
Cooking with CQL Q&A All Categories
Additional Q&A Examples
Developers Introduction to CQL
Specifying Population Criteria