-
Notifications
You must be signed in to change notification settings - Fork 24
Cooking with CQL Examples
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.
- CQL Errata Update
- Identifying Acute Kidney Injury
- Deep Dive on Stratifiers
- Equality, Equivalence, and Nulls in CQL
- Consecutive SPO2 Readings
- Terminology in CQL
- Medication Daily Dose
- Comment Period on Public Draft FHIR-based eCQMs for EH
- CMS Connectathon
- CQL Cheat Sheet
- Deep Dive on Sub-Queries
- Allergy/Intolerance Category Filter
- Aggregates with Empty Lists
- Aggregate Clause Question
- CQLIT-447 - Medication Ordered pattern and doNotPerform
- CQLIT-448 - Condition bodysite
- CQLIT-449 - Medication-related resources primary code path usage in retrieves
- CQLIT-450 - QICore Primary Code Path
- CQLIT-460 - Overlaps before clarification
- Quantity Comparison Question
- Examples
-
Recording
- 4:38 - Medication Ordered pattern and doNotPerform
- 6:48 - CQLIT-448 - Condition bodysite
- 11:50 - CQLIT-449 - Medication-related resources primary code path usage in retrieve?
- 19:15 - CQLIT-450 - QICore Primary Code Path
-
21:49 - CQLIT-460 - Overlaps before clarification
- 25:36 – Question: Where would we find the updated information to the specification regarding overlaps operator and the comparison of two interval values using a complete set of operations?
- 29:01 - Quantity Comparison Question
Agenda:
- Test on ART - Community Question
- HIV Assay - Community Question
- HIV Measure - Community Question
- Examples
-
Recording
-
4:49 – Question on representation of Stopping ART at Facility during the Measurement Period
- 7:47 – TestOnART examples
-
12:00 – Question on HIV Assay Decision Logic
-
12:19 – TestHIVAssay
- 12:22 – triggeredBy example
- 14:00 – Well Known Documentation Tags (link) example
- 15:43 – Identifier Conventions (link) example
- 17:01 – Formatting Conventions (link) example
- 18:08 – FHIR References examples
- 26:04 – Terminology for determining Assay 1 test
- 27:09 – ValueSet Usage
- 29:08 – Additional Filtering
- 31:01 – Patient Age
- 32:06 – Terminology Followup Question – Is there a way I can define that Custom valueset that contains a List of specific codes within CQL or does it need to be an actual valueset I have already defined outside CQL?
- 34:05 – Updated Queries
-
36:57 – Question/Discussion on HIV Measure Logic related to enumerating the number of HIV tests vs. the number of people tested
- 39:16 – Context features of CQL (link)
- 40:01 – Retrieve Context of CQL (link)
- 42:28 – TestHIVMeasure example – Define “Resulted HIV Test”
- 45:21 – Question – Where do you define “Active HIV Diagnosis”?
- 46:23 – Question - Why wouldn’t you define “Active HIV Diagnosis” with a condition right away to make sure it’s applicable to the measurement period?
-
12:19 – TestHIVAssay
-
4:49 – Question on representation of Stopping ART at Facility during the Measurement Period
Agenda:
- Aggregate Functions in CQL
- Examples
-
Recording
- 4:05 – Introduction to Aggregates in CQL
- 6:46 – Aggregate Capabilities
- 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
Agenda:
- US Commons IG Review
- Using CQL With FHIR IG Review
- CQL Next Steps Review
- Examples
- Recording
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
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
-
5:08 – PC-07 – Numerator reporting
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
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.
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
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
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
- 4:05 – Medication Request Example
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
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
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
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
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
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
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
This session will review CQL authoring using the VS Code plugin
- Examples
-
Cooking with CQL Q&A
- Use of the expand operator in the Visual Studio Code (VS Code) CQL plugin
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)
Based on requests from participants, this session will be a beginner's introduction to CQL
- 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
Topics:
- Community Acquired Pneumonia (CAP) Severity Scores (CURB-65 and CRB-65)
- Examples
- No Cooking with CQL Q&As from the 2022-03-24 session
Topics:
- Aggregates, Grouping, and Having
- 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
Topics:
- CQL Errata Review
- 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
Topics:
- 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
Topics:
- Focused on gathering community and stakeholder feedback on the concept of a shared CQL library repository
- 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
Topics:
- Age Calculations in QDM and FHIR
- Cumulative Medication Duration Calculations in QDM
- fix for durationInDays as a Quantity
- fix for authorDatetime if start boundary is unspecified
- 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
Topics:
- HL7/CMS Connectathon Review/Connectathon 28 CFP
- FHIR References Overview/Examples
- Open Source Tooling Stack Review
- 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
Topics:
- Blood Pressure Example
- Age Calculation Example
- 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"
Topics:
- Cumulative Medication Duration in FHIR
- Patterns and Practices
- 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
Topics:
- TSH Testing Monitoring
- Expand Interval Examples
- Resolving and Tracing FHIR References in CQL
- 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
Topics:
- TSH Testing Every 8 Weeks
- Bleeding Events
- 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
Topics:
- Cumulative Medication Duration in FHIR
- Calculating Months
- 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)
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
with
vsfrom
- 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