Skip to content

Cooking with CQL Q&A: eCQM Specifications and CQL

rhondaschwartz edited this page Oct 23, 2020 · 7 revisions

Each Q&A has the Cooking with CQL session number and date. For the most current and accurate information, please check the CQL Qs&As for a more recent answer to your question.

Age-based Risk Factors: 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. (Session 32 - 2/28/19)
  • Yes, the way that ‘defines’ are listed in CQL allows them to be forward referenced anywhere in the library. It should be noted that age ranges could be defined as stratifications in the MAT and tested as such within Bonnie.
Flattening in CQL Is flattening part of CQL? (Session 32 - 2/28/19)
  • Yes. The ‘flatten’ operator takes a list of lists and returns a single list with all the elements of the lists in the input. Because lists may contain lists, CQL provides a flatten operation that can flatten lists of lists:

flatten { { 1, 2, 3 }, { 3, 4, 5 } }

This example returns:

{ 1, 2, 3, 3, 4, 5 }

Note that unlike the union operator, duplicate elements are retained in the result.

Also note that flatten only flattens one level, it is not recursive.

For additional information regarding this topic, please see the 5.6.3. Computing Lists in the Au-thoring Guide (https://cql.hl7.org/2020May/02-authorsguide.html).

Not Equivalent Comparison: For the follow-up HIV visit logic, explain why the not equivalent comparison is not needed and when it could be needed.

define "Followup HIV Visit":
		"Qualifying Encounters" FollowupVisit
			with "Qualifying Encounters" PriorVisit
				such that FollowupVisit.authorDatetime 90 days or more after day of PriorVisit.authorDatetime

(Session 32 - 2/28/19)

  • It is needed when using the ‘on’ and after’. When using only ‘after’ it would not be needed.

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