Skip to content

Cooking with CQL Examples

Bryn Rhodes edited this page Apr 25, 2024 · 214 revisions

This page provides an index to the examples developed as part of the Cooking with CQL Series of Webinars in reverse chronological order. Cooking with CQL examples are collected from various sources including participant submissions. Please feel free to submit examples to ecqm@icf.com.

Cooking with CQL - Session 82 - 2024-04-25

Agenda:

  1. Test on ART - Community Question
  2. HIV Assay - Community Question
  3. HIV Measure - Community Question

Cooking with CQL - Session 81 - 2024-03-28

Agenda:

  1. Aggregate Functions in CQL
  • Examples
  • Recording
    • 4:05 – Introduction to Aggregates in CQL
    • 6:46 – Aggregate Capabilities
      • 6:55 – Count
      • 7:06 – AllTrue/AnyTrue
      • 7:41 – Sum
      • 7:57 – Min
      • 8:16 – Max
      • 8:27 – Average
      • 9:02 – Median/Mode
      • 9:45 – Product
      • 10:02 – GeometricMean
      • 10:10 – Standard Deviation/Variance/Population Deviation/Population Variance
    • 10:50 – Review of Observation Resource in FHIR
    • Questions regarding Aggregate Queries:
      • 12:33 – How many observations does this patient have?
      • 13:55 – How many observations have an encounter?
      • 14:06 – How many different kinds of observations does this patient have?
      • 14:50 – Question: How will a duplicate observation kind type be counted?
      • 17:07 – How many of each kind of observation does this patient have?
      • 18:43 – Which kinds of observations have more than one observation?
      • 20:12 – How many kinds of observations have more than one observation?
      • 21:09 – For each kind of observation with more than one observation, what is the date and result of the most recent observation?
    • 22:23 – Execute/Results – Aggregate Answers

Cooking with CQL - Session 80 - 2024-02-22

Agenda:

  1. US Commons IG Review
  2. Using CQL With FHIR IG Review
  3. CQL Next Steps Review
  • Examples
  • Recording
    • 5:25 – US Commons IG Review
      • 9:20 – USCoreElements Library
        • 11:21 – Examples for building out forms
          • 11:32 – Humana Uniform Pharmacy Prior Authorization Request
          • 16:04 – Genetic Molecular Testing Prior Authorization Request
          • 17:27 – Medical Benefit Outpatient Drug Authorization Form
        • 19:28 – Testing the Questionnaire Content
          • 19:51 – Unit Testing – Patient Examples for Use Cases
          • 20:42 – Integration Testing – Postman API Testing Tool
    • 25:05 – Using CQL with FHIR IG
      • 27:24 – Conformance Criteria and Best Practice
      • 28:47 – CQL-related Profiles
      • 30:51 – CQL-related Operations
        • 30:55 – Library/$evaluate
        • 31:52 – $cql
        • 32:36 – CQL Evaluation Service
      • 33:26 – CQL ModelInfo
    • 35:13 – Proposed CQL Changes/CQL-Next

Cooking with CQL - Session 79 - 2024-01-25

Agenda - Review FHIRHelpers and examples of recently submitted issues

  • Examples
  • Recording
    • 4:14 – Agenda
    • 4:56 – FHIR Helpers: Markdown file
    • 5:40 – FHIR Helpers: FHIR and CQL
    • 7:46 – FHIR Helpers: Library Declarations
    • 8:11 – FHIR Helpers: ToInterval(FHIR.Period)
    • 8:44 – FHIR Helpers: ToCalendarUnit
    • 8:58 – FHIR Helpers: ToQuantity
    • 10:00 – FHIR Helpers: ToQuantityIgnoringComparator
    • 10:22 – FHIR Helpers: ToInterval(FHIR.Quantity)
    • 10:46 – FHIR Helpers: ToRatio
    • 10:53 – FHIR Helpers: ToInterval(FHIR.Range)
    • 10:58 – FHIR Helpers: ToCode
    • 11:07 – FHIR Helpers: ToConcept
    • 11:23 – FHIR Helpers: ToValueSet
    • 11:36 – FHIR Helpers: Conversion of Choice
    • 12:38 – FHIR Helpers: Resolving References and FHIR Path Support
    • 13:13 – FHIR Helpers: Slicing/Modifiers/Terminology Functions
    • 13:40 – FHIR Helpers: ToString
    • 15:31 – CQLIT-423: Day precision without expression containing 'date less than 1 day before date'
    • 17:54 – CQLIT-422: Bonnie unexpected coverage 99% QDM NCQA
    • 19:31 – CQLIT 421: Guidance in correcting the statement “Encounter with First Systolic Blood Pressure”
    • 21:23 – Library ThreeConditions

Cooking with CQL - Session 78 - 2023-11-30

Agenda - Review examples of recently submitted issues

  • Examples
  • Recording
    • 5:08 – PC-07 – Numerator reporting
      • 6:18 – Background: Numerator
      • 7:49 – Assessment
      • 8:16 – Recommendations for Approaches
      • 12:45 – Question: Operator Case Approach
      • 15:41 – Questions: Is “EncounterCondition” considered a function?
      • 16:58 – Discussion: Will multiple conditions and procedures be returned?
      • 30:44 – Question: Are these supplemental data elements?
      • 34:15 – Question: Return all encounter diagnoses that are not POA?
      • 37:15 – Question: What does the return result look like?
    • 43:20 – Discussion on CMS1218 Hospital Harm-Postoperative Respiratory Failure, Occurrence Issue with Numerator-Jira Ticket CQLIT-424

Cooking with CQL - Session 77 - 2023-09-28

Agenda - Review of the VS Code CQL Plugin User Guide

  • Examples
  • Recording
    • 4:26 - VS Code CQL Plugin User Guide (User Guide · cqframework/vscode-cql Wiki · GitHub)
    • 4:35 - Installing Visual Studio (VS) Code (Link to install VS Code)
    • 5:03 – Installing CQFramework Clinical Quality Language Extension
    • 7:01 - Features
      • 8:43 – Executing CQL
      • 10:59 - Viewing ELM
      • 12:17 – CQL Project Structure
    • 14:20 – CQL Options
    • 15:30 - Cloning a Repository
    • 19:11 – Making Changes to a Library
    • 20:38 - Committing Changes to a Library
    • 23:15 - Pulling Changes from the Repository
    • 24:57 - Using Terminology
    • 29:49 - Adding Test Data
    • 33:16 - Running Test Cases

Cooking with CQL - Session 76 - 2023-07-27

Agenda - Accessing Encounters with Direct-reference codes and MedicationRequests with Medication references

  • Examples
  • Recording
    • 4:09 – Set up
    • 5:02 – Direct Reference Code Encounters in QI-Core
    • 10:40 – QI-Core Primary Code Path Discussion
    • 18:50 – DRC approaches for QI-Core Encounter
    • 40:12 – QI-Core Medication Request Medication Element

Please refer to updated information on the QI-Core 4.1.1 patterns page for the latest guidance for medication requests.

Cooking with CQL - Session 75 - 2023-06-22

Agenda - Deep Dive - Intervals and Lists

  • Examples
  • Recording
    • 4:01 – Interval Values
    • 14:07 – List Values
    • 18:58 – Aggregates (List of Values)
    • 20:30 – Lists of Strings
    • 21:05 – Lists of Lists
    • 22:15 – List of Intervals
    • 25:05 – CQL IT Tracker Questions
    • 30:59 – Question Regarding Search Paths

Cooking with CQL - Session 74 - 2023-05-25

Agenda - Fluent Functions

  • Examples
  • Recording
    • 4:20 - Deep Dive on Fluent Functions
    • 12:32 - Using Fluent Functions using expressions with common patterns
    • 16:53 – US Core Tests in CQL
      • 18:54 – US Core Elements - Allergy and Intolerance Profile
      • 31:00 – US Core Elements – Conditions
      • 33:45 – US Core Elements – Laboratory Results
      • 34:42 – US Core Elements – Medication Request
      • 41:08 – US Core Elements – Smoking Status

Cooking with CQL - Session 73 - 2023-04-27

Agenda - Troubleshooting CQL Expressions

  • Examples
  • Recording
    • 4:05 – Medication Request Example
      • 7:45 – Inpatient Criteria Testing
      • 12:41 – Qualifying Encounters
      • 36:23 – Message Operator
    • 45:53 – Announcement: Session 67 Recording is now available on GitHub
    • 46:56 – General Questions

Cooking with CQL - Session 72 - 2023-03-23

Agenda - Deep Dive - Queries

  • Examples
  • Recording
    • 4:19 – Query intro and setup
    • 5:09 – Retrieves
    • 9:30 – Query definition
    • 10:40- Query Clauses
    • 13:21 – With and Without clause
    • 16:22 – Sort clause
    • 18:08 – From clause
    • 23:18 – Sub-clauses
    • 28:53 – Let clause
    • 33:07 – Singleton queries
    • 38:36 – Questions and Answers

Cooking with CQL - Session 71 - 2023-02-23

Agenda - Deep Dive - Operators and Functions

  • Examples
  • Recording
    • 4:15 – Operators and Functions in CQL
    • 5:58 – Comparison Operators
    • 7:14 – Equality vs Equivalence
    • 9:06 – Arithmetic
    • 10:28 – Rounding and Exponents
    • 11:26 – String Manipulation
    • 14:14 – Date and Time Comparison
    • 15:07 – Date and Time Arithmetic
    • 16:50 – Calendar Durations vs UCUM Units
    • 17:10 – Duration and Difference
    • 18:15 – Conditionals
    • 20:24 – Operator Precedence
    • 24:16 – Types of UCUM – Basic, Extended, and Arbitrary

Cooking with CQL - Session 70 - 2023-01-26

Agenda - Authoring Patterns

  • Examples
  • Recording
    • 4:00 – Authoring Patterns Wiki Page
    • 8:16 – Patient expression logic
    • 14:01 – Encounters expression logic
    • 16:21 – Conditions expression logic
    • 25:23 – Observations expression logic
    • 27:53 – Medications expression logic
    • 33:47 – Procedures expression logic
    • 34:07 – Devices expression logic
    • 35:02 – Allergies expression logic
    • 35:34 – Immunization examples

Cooking with CQL - Session 69 - 2022-12-01

Agenda - Building Shareable CQL - Colorectal Cancer Screening Example

  • Examples
  • Cooking with CQL Q&A
    • Value set links in Clinical Quality Language
    • Abbreviation 'Cs' as an alias
    • 'Most recent' versus 'last' in Clinical Quality Language
    • Clinical Quality Language evaluation service
  • Recording
    • 5:50 - Colorectal Cancer Screening Example
    • 9:54 - Flexible Sigmoidoscopy
    • 13:28 - Value Set Links in CQL
    • 14:48 - Abbreviation 'Cs' as an alias
    • 19:37 - Constructing a Rationale
    • 20:23 - Use of 'Most recent' versus 'last' in CQL
    • 26:21 - Review 2021 Update of Colorectal Cancer: Screening Recommendation
    • 32:55 - Applying 2021 Update of Colorectal Cancer: Screening Recommendation in CQL
    • 37:00 - CQL Evaluation Service

Cooking with CQL - Session 68 - 2022-10-27

Agenda - Deep Dive on Types, Values, and Choices

  • Examples
  • Cooking with CQL Q&A
    • Operational logic in Clinical Quality Language
    • Casting with choice statements in Clinical Quality Language
    • Using choice types in Clinical Quality Language

Cooking with CQL - Session 67 - 2022-09-29

Negation in QI Core

  • Examples
  • Cooking with CQL Q&A
    • D.code reference in "Venous Foot Pumps (VFP)"
    • Querying for Instances of negation using QI-Core
    • Difference in meaning between two General Not Done defining statements
    • Direct reference code in negation
    • Importance of being able to query using QI-Core
    • Use of direct reference codes for the negation expression in QDM measure
    • Measuring negation using QI-Core
    • Use of negation in future FHIR updates
    • Testing negation in QI-Core at the September 2022 Connectathon
    • Status information on negation in QI-Core
  • Recording
    • 4:00 – Types of Negation
    • 5:18 – Documentation of Events Not Done (What, When, Why, Negation)
    • 7:26 – What did not occur element
    • 8:35 – Negation Modeled in QI Core
    • 10:49 – Two Main Types of Criteria for Negation
    • 11:36 – General Not Done
    • 14:59 – Q & A regarding General Not Done, value sets and reference codes
    • 24:40 – Specific Not Done (direct reference code)
    • 36:50 – Q & A regarding General Not done DeviceNotRequested
    • 37:44 – New Quality Improvement Artifact Approach: Enforcing a profile on a retrieve
    • 40:09 – Q & A regarding New Quality Improvement Artifact Approach
    • 49:33 – Q & A regarding Profile Informed Authoring release

Cooking with CQL - Session 66 - 2022-07-28

Review QICore Profile Elements and Patterns

  • Examples
  • Cooking with CQL Q&A
    • Capturing principal diagnosis in the Quality Improvement (QI)-Core 5.0 release
    • September 2022 Connectathon testing
    • Building measures for testing for the September 2022 Connectathon

Cooking with CQL - Session 65 - 2022-06-23

This session will review CQL authoring using the VS Code plugin

Cooking with CQL - Session 64 - 2022-05-26

This session will review the current proposed translations of shared libraries from the AU 2022 QDM publication

See the ecqm-content-r4-2022 repository for content for this session

  • Examples
  • Cooking with CQL Q&A
    • Execution error using Global Common Functions in Fast Interoperability Resources® (FHIR®) 4.0
    • Writing a measure using Quality Improvement (QI)-Core in Fast Interoperability Resources® (FHIR®) 4.0
    • Measure run using Quality Improvement (QI)-Core
    • Locating 2022 electronic clinical quality measures (eCQMs)

Cooking with CQL - Session 63 - 2022-04-28

Based on requests from participants, this session will be a beginner's introduction to CQL

  1. Beginning CQL
  • Examples
  • Cooking with CQL Q&A
    • Fast Healthcare Interoperability Resources® (FHIR®) encounter in a JAVA implementation
    • Double quotes in Clinical Quality Language 1.5 Library
    • AgeInYearsAt function in the Clinical Quality Language 1.5 Library

Cooking with CQL - Session 62 - 2022-03-24

Topics:

  1. Community Acquired Pneumonia (CAP) Severity Scores (CURB-65 and CRB-65)
  • Examples
  • No Cooking with CQL Q&As from the 2022-03-24 session

Cooking with CQL - Session 61 - 2022-02-24

Topics:

  1. Aggregates, Grouping, and Having
  2. Cooking with CQL Wiki and Feedback Request
  • Examples
  • Cooking with CQL Q&A
    • CountOfListOfNulls vs. LengthOfListOfNulls functions
    • List Type specifiers in CQL
    • Use of the group by clause in CQL

Cooking with CQL - Session 60 - 2022-01-27

Topics:

  1. CQL Errata Review
  2. QICore Authoring Review
  • Examples
  • Cooking with CQL Q&A
    • Value Set functions in CQL Library v1.5
    • Profile Authoring in FHIR resources
    • Measure Authoring Development Integrated Environment (MADiE) support profile authoring

Cooking with CQL - Session 59 - 2021-12-02

Topics:

  1. Cumulative Medication Duration in FHIR
  • Examples
  • Cooking with CQL Q&A
    • CumulativeMedicationsDuration data model
    • CumulativeMedicationsDuration - MedicationRequestPeriod function
    • CumulativeMedicationsDuration - Atom plug-in for Medication Dispense Data
    • CumulativeMedicationsDuration - Collapse Interval per day
    • MedicationDispensePeriod - Dispense.relevantdatetime

Cooking with CQL - Session 58 - 2021-10-28

Topics:

  1. Focused on gathering community and stakeholder feedback on the concept of a shared CQL library repository
  2. Fluent Functions
  • Examples
  • Cooking with CQL Q&A
    • Fluent function - arithmetic operators
    • Fluent function - normalize interval
    • Fluent function - extensions in MAT
    • Fluent function - QDM specification
    • Fluent function - shared library
    • Fluent function - defining intervals
    • Fluent function - data requirements
    • Fluent function - libraries with the same name
    • Fluent function - overloading

Cooking with CQL - Session 57 - 2021-09-16

Topics:

  1. Age Calculations in QDM and FHIR
  2. Cumulative Medication Duration Calculations in QDM
    • fix for durationInDays as a Quantity
    • fix for authorDatetime if start boundary is unspecified
  3. UCUM Best Practice
  • Examples
  • Cooking with CQL Q&A
    • CumulativeMedicationsDuration - calculating age and evaluating it against two integers
    • CumulativeMedicationsDuration - combined and split doses
    • CumulativeMedicationsDuration - metric dosing (mg/dose) instead of tablets or capsules
    • CumulativeMedicationsDuration - tapering medications
    • CumulativeMedicationsDuration - date/time vs just date
    • CumulativeMedicationsDuration - authorDatetime vs just date
    • MedicationOrderPeriod vs MedicationDispensePeriod when calculating CumulativeMedicationsDuration
    • $cql operation and test case representation/packaging
    • Pharmacy Workgroup - harmonizing NCDCP and FHIR

Cooking with CQL - Session 56 - 2021-07-29

Topics:

  1. HL7/CMS Connectathon Review/Connectathon 28 CFP
  2. FHIR References Overview/Examples
  3. Open Source Tooling Stack Review
  4. Using Library/$evaluate and $cql Operations
  • Examples
  • Cooking with CQL Q&A
    • Library resource refresh tooling process
    • IG refresh process
    • Testing support for the Quality Measure IG
    • Reference and the identifier resource patterns
    • Resolving references within bundles

Cooking with CQL - Session 55 - 2021-06-24

Topics:

  1. Blood Pressure Example
  2. Age Calculation Example
  3. Immunization Not Done Example
  • Examples
  • Cooking with CQL Q&A
    • FHIRHelpers.ToDate(Patient.birthDate) - Global Common Library v5.0 to calculate age
    • Influenza Vaccine measure (CMS 147) - negation rationale pattern for Immunization Not Done queries
    • ImmunizationNotDoneExample - define “Influenza Vaccine Not Administered”
    • Difference between "GetBaseExtensions", "GetExtensions", and "GetExtension"

Cooking with CQL - Session 54 - 2021-05-27

Topics:

  1. Cumulative Medication Duration in FHIR
  2. Patterns and Practices
  3. Stratification
  • Examples
  • Cooking with CQL Q&A
    • Using FHIR - Cumulative Medication Duration
    • Using FHIR - Cumulative Medication Duration within the define function of the MedicationDispensePeriod
    • Using FHIR - Cumulative Medication Duration with a RolloutIntervals function
    • Measure Logic in CQL - Stratification

Cooking with CQL - Session 53 - 2021-04-22

Topics:

  1. TSH Testing Monitoring
  2. Expand Interval Examples
  3. Resolving and Tracing FHIR References in CQL
  4. CQL Exercises
  • Examples
  • Cooking with CQL Q&A
    • Queries in CQL - Immune Check Inhibitor (ICI) therapy with Thyroid Stimulating Hormone (TSH) testing in overlapping measurement periods
    • Queries in CQL - Therapy.relevantPeriod
    • Queries in CQL - Immune Check Inhibitor (ICI) therapy Bins - expand operator
    • Queries in CQL - library to illustrate patterns for accessing FHIR through references
    • General CQL - CQL vs FHIRv4.0 nested structure

Cooking with CQL - Session 52 - 2021-03-24

Topics:

  1. TSH Testing Every 8 Weeks
  2. Bleeding Events
  3. Composite Measure Calculation with mixed-basis components
  • Examples
  • Cooking with CQL Q&A
    • Queries in CQL - Immune Check Inhibitor (ICI) therapies Expressions
    • Queries in CQL - TST Testing very 8 Weeks
    • Measure Logic in CQL - Bleeding Events Encounters

Cooking with CQL - Session 51 - 2021-02-25

Topics:

  1. Cumulative Medication Duration in FHIR
  2. Calculating Months
  3. Week or wk?
  • Examples
  • Cooking with CQL Q&A
    • Date and Time Calculation - Calculating the overall expected duration (days) of a medication request in FHIR (periodUnit)
    • Date and Time Calculation - Calculating the cumulative period or start date for a single medication request in FHIR (validityPeriod or authoredOn)

Cooking with CQL - Session 50 - 2021-01-21

Topics:

  1. Collapse with null ending boundary
  2. Medication Coverage (rolling out intervals)
  3. Falls per 1000 patient days (QDM and FHIR Ratio Measure)
  4. 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

Cooking with CQL - Session 49 - 2020-12-03

Topics:

  1. Connectathon 26 Review
  2. Cumulative Medication Duration
  • Examples
  • There were no Q&As for this session

Cooking with CQL - Session 48 - 2020-10-29

Topics:

  1. Lab Tests Every Six Weeks Redux
  2. QDM Timings
  3. 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

Cooking with CQL - Session 47 - 2020-10-01

Topics:

  1. Lab Tests Every Six Weeks
  2. Inpatient Stay 48 Hours Or More
  3. Composite Measure Calculation

Cooking with CQL - Session 46 - 2020-07-30

  1. QDM Organization Attributes
    1. What value to use for namingSystem for NPI or other formal identifiers for organizations
    2. Check that the organization associated with a blood pressure is the same as the encounter
  2. Using with vs from
  3. 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

Cooking with CQL - Session 45 - 2020-06-25

Topics:

  1. Connectathon Announcement
  2. Feedback Request on CDS Connect Authoring Tool
  3. Coalesce Review
  4. High Risk Medications
  5. Advanced Illness
  6. 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

Cooking with CQL - Session 44 - 2020-05-28

Topics covered:

  1. CQL Basics and Resources Review
  2. Query Return Types
  3. Using Collapse and Expand
  4. 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

Cooking with CQL - Session 43 - 2020-04-23

In this session we reviewed:

  1. EncountersPerDay - Returning a single encounter per day during a given time period
  2. 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

Cooking with CQL - Session 42 - 2020-02-27

In this session we reviewed:

  1. QI Core Usage Patterns

Cooking with CQL - Session 41 - 2020-01-16

In this session we reviewed:

  1. Before and after assessments
  2. Continued discussion of EXM105
  3. A pattern for Medications Not Documented in FHIR3/4
  4. A pattern for Timing with Choice Elements (dateTime|Period)
  5. Expanding the pattern for Observation timing (dateTime|Period|Timing|instant)
  6. Expanding the pattern for Procedure performance timing (dateTime|Period|string|Age|Range)
  7. A pattern for Condition onset/abatement/prevalence period
  8. 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

Cooking with CQL - Session 40 - 2019-12-06

In this session we covered:

  1. CMS826 - Pressure Injury Redux
  2. CQLIT-206 - Bladder Cancer Measure
  3. CQLIT-207 - Measure Observation Calculation Issue
  4. 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

Cooking with CQL - Session 39 - 2019-10-24

In this session we covered:

  1. CMS130 - Colorectal Cancer Screening, QDM and FHIR Walkthrough
  2. EXM9 - FHIR Draft of Exclusive Breast Milk Feeding

Cooking with CQL - Session 38 - 2019-09-26

In this session, we reviewed the use of FHIR to specify eCQMs.

Cooking with CQL - Session 37 - 2019-07-25

In this session we reviewed:

  1. Medications present on admission
  2. Representing SQL joins in CQL
  3. JIRA Issue Tracker Questions
  4. 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

Cooking with CQL - Session 36 - 2019-06-27

In this session we reviewed:

  1. Criteria with nested definitions
  2. Hospitalization with observation function
  3. QDM versus CQL timing phrases and interpretation
  4. Pressure Injury Measure

Cooking with CQL - Session 35 - 2019-05-23

In this session we reviewed:

  1. Multi-source Query Examples
  2. Timing Considerations given new QDM 5.5 timing attributes

Cooking with CQL - Session 34 - 2019-04-25

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)

Cooking with CQL - Session 33 - 2019-03-28

In this session we reviewed the following:

  • QDM 5.5 Change Review

  • CQL 1.4 Ballot Review

  • Negation Rationale Examples

  • Related Context Retrieves

  • Examples

  • Cooking with CQL Q&A

    • Related Persons QDM datatype
    • Mother-Baby related context queries
    • Pregnancy due date definition

Cooking with CQL - Session 32 - 2019-02-28

In this session we will review common patterns from across all the measures:

  1. Age Calculation
  2. Most Recent Lab Result
  3. Comparing Pairs of Events
  4. Sequential Events
  5. Age Based Risk Factors
  6. Followup Timeframe
  7. Intermediate Results
  8. Maximum Value
  9. 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

Cooking with CQL - Session 31 - 2019-01-31

In this session, we reviewed and discussed:

  1. Singleton Results
  2. Lowest Most Recent Blood Pressure
  3. Same Or After Semantics
  4. Default Temporal Precision
  5. Blood Pressure Exam Without Inpatient Stay
  6. Coalesce Semantics
  7. Glucocorticoid Dosage

Cooking with CQL - Session 30 - 2018-12-06

In this session, we reviewed and discussed:

  1. Characterization of Hypoglycemia Risk
  2. Appropriate use of anti-MRSA Antibiotics
  3. Positive Depression Screening
  4. ACO38 - "Risk Standardized Readmission Rates" - Part I (Diagnosis Counts)
  5. ACO38 - "Risk Standardized Readmission Rates" - Part II (Risk Adjustment Variables)

Cooking with CQL - Session 29 - 2018-10-25

In this session we reviewed:

  1. Measure Terminology Usage and the Value Set Authority Center
  2. Hospitalization Admission Source CQLIT-136
  3. Calculate Age Discussion
  4. Calendar Age for Immunization Question
  5. Naming conventions for Boolean-valued expressions

Cooking with CQL - Session 28 - 2018-09-27

In this session we reviewed:

  1. A Continuous Variable Ratio Measure (Hypoglycemia)
  2. First occurrence of a blood transfusion
  3. Blood pressure readings as an average
  4. Calculating conception date using gestational age assessments
  5. Reviewed user-defined functions in CQL
  6. Indicators of adverse events following a blood transfusion
  7. 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

Cooking with CQL - Session 27 - 2018-07-26

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

Cooking with CQL - Session 26 - 2018-06-28

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.

Cooking with CQL - Session 25 - 2018-05-31

In this session we reviewed the following:

  1. Calculation Differences between QDM Logic and CQL
  2. Negation Redux
  3. 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)

Cooking with CQL - Session 24 - 2018-04-26

In this session we reviewed the following:

  1. Detailed Review of the Overlaps operator
  2. A Claim query in FHIR
  3. Regional Anesthesia Measure Question
  4. Review of Contraceptive Provision Measure
  5. Radiology Report Measure Discussion
  • Examples
  • Cooking with CQL Q&A
    • Boundary – open vs closed
    • RegionalAnesthesia - “where” clause in let procedure statement
    • Denominator statement clarification

Cooking with CQL - Session 23 - 2018-03-29

In this session we reviewed the following:

  1. Representation of QDM specific occurrences in CQL
  2. Walkthrough of CQL representation of CMS 105

Cooking with CQL - Session 22 - 2018-02-22

In this session we reviewed the following:

  1. Encounter diagnoses
  2. ED Encounters
  3. Consecutive Heart Rates
  4. Allergy to Eggs
  5. Smoking Cessation

Cooking with CQL - Session 21 - 2018-01-18

In this session we reviewed the following:

  1. 2nd Tylenol Administration During an Encounter
  2. Vaccination Example from NCQA
  3. Opioid Overuse Potential Quality Measure Utilizing Decision Support Logic for MME Calculation

Wiki Index

Home

Authoring Patterns - QICore v4.1.1

Authoring Patterns - QICore v5.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