Back to top
Top

Clinical Quality Language Frequently Asked Questions

The CQL FAQs contain common questions and answers to help you get started with CQL. Visit the Cooking with CQL Examples GitHub page to review questions and answers from the most recent Cooking with CQL sessions. Visit the Cooking with CQL Q&A All Categories GitHub page to review all the questions and answers from the past Cooking with CQL sessions.

What is Clinical Quality Language (CQL)?

CQL is a Health Level Seven International® (HL7) authoring language standard that’s intended to be human readable. CQL provides the ability to express logic that is human readable yet structured enough for processing a query electronically. Measure authors with access to the Measure Authoring Tool (MAT) can use the tool to author measures using CQL.

When did CMS begin using CQL in eCQMs?

CQL was first implemented beginning with the calendar year 2019 performance/reporting period eCQMs. CQL replaces the logic expressions previously defined in the Quality Data Model (QDM). Beginning with QDM v5.3, QDM includes only the conceptual model for defining the data elements (the data model).

What are the benefits of using Clinical Quality Language (CQL) in electronic clinical quality measures (eCQMs)?

CQL allows for a more modular, flexible, and robust expression of the logic. It allows logic to be shared between measures and with clinical decision support. Learn more about the advantages of CQL from the Benefits of CQL presentation.

Where can I find resources for using Clinical Quality Language (CQL)?

A full list of resources is found on the CQL Tools & Resources page.

Explore these resources to get an overview of CQL and learn how to implement CQL.

  • Learn more about the fundamentals of CQL and why it’s important on the CQL Educational Resources page. Also find past presentations and webinars for the various audiences who might use CQL.
  • Watch the CQL tutorial to see CQL in action.
  • Attend an upcoming Cooking with CQL webinar. The sessions feature open discussion with subject matter experts on the Measure Authoring Tool (MAT), show how to express measures using CQL, and review questions. Visit the eCQI Events page to find registration information.
  • Visit the CQL Formatting and Usage Wiki  to review common questions and answers on CQL.

Visit the Connect page to find out how to connect to various CQL resources.

Where can I find resources for using Clinical Quality Language (CQL) in Fast Healthcare Interoperability Resources® (FHIR)?
What is a Clinical Quality Language (CQL) library?

A CQL library is text document (.cql, .xml, and .json) that contains CQL expressions, definitions, functions, and other declarations that can be used across measures. Each electronic clinical quality measure (eCQM) contains a primary library that defines the criteria used by the populations of the measure. The Health Quality Measure Format (HQMF) document references this library and defines the populations by identifying which expressions in the CQL library define each population (e.g., Inpatient Encounter, terminologies). Measures may include references to a shared library, which can be either referenced throughout a single measure or across different measures (and even clinical decision support rules) to share definitions and functions like "Hospitalization". Library sharing minimizes efforts with measure development and implementation.

For more information on libraries, refer to the Using Libraries to Shared Logic section of the CQL Implementation Guide.

What is Expression Logical Model (ELM) and what is the advantage to using it?

ELM is a machine-readable representation of an electronic clinical quality measure's logic and provides the information needed to automatically retrieve data from an electronic health record. The ELM file can be in XML (.xml) or JavaScript Object Notation (JSON) file (.json).

There are a lot of things that CQL supports, higher level constructs like timing phrases that are translated into a representation in ELM that is focused on implementation so that you don’t have to worry about those pieces within ELM. There is nothing that says you could not do all that yourself. But for implementation, using ELM takes those pieces off an implementer’s plate. Individually each of those are not terribly difficult, but when you put them all together and add them up, and the fact that it is maintained as a part of this whole infrastructure, it is a significant advantage to be able to use the ELM directly rather than have to start from a parser. Refer to the CQL for Measure Developers presentation for additional guidance.

How are Clinical Quality Language (CQL) queries run?

CQL can be used with any data model. The examples in the Cooking with CQL sessions are focused on using the Quality Data Model (QDM), which has a serialization as Quality Reporting Document Architecture (QRDA). QRDA is similar to consolidated clinical document architecture (C-CDA) standard. QRDA and C-CDA are Health Level Seven International®  V3 standards.

In multi-source queries, is it feasible to specify the type of attributes to be returned?

Yes, you can use return, it is an arbitrary expression. So, whatever you want to return from the “from,” you can.

Where can I find an overview of current or future-planned Clinical Quality Language (CQL) execution tooling, i.e., Structured Query Language (SQL) execution, or Extensible Markup Language (XML) execution engines?

There is tooling to support authoring, parsing, and validation of CQL. There are open source tools available to evaluate the Expression Logical Model (ELM) for both the JavaScript and Java platforms. There is also a .NET toolkit for ELM that can support translation and evaluation.

Developing the measures in Java, C#, or any other commercially supported language would not achieve the goal of sharing the measure logic in a platform independent way, nor would it serve as a vehicle for communicating the intent of the measures in the way that CQL/ELM does. Traditional programming languages do not support the required set of operations for expressing measure logic, and traditional query languages, though closer to the mark, still do not support important aspects like terminology and interval-based timing. Refer to the GitHub tooling repository for additional guidance.

Is there a recommended Clinical Quality Language (CQL) editor?

The recommended editor is called Atom, a desktop general purpose editor. There is a CQL Language Package that gives basic syntax highlighting for CQL files within the Atom editor. It works well, does not give validations, but the Measure Authoring Tool (MAT) has that functionality embedded.

Are there open source implementations or parsers available?
How is Clinical Quality Language (CQL) related to the Measure Authoring Tool (MAT) tool? Must measure developers use the MAT?

CQL writes text documents using the CQL library. The MAT provides the structure to make writing easy beyond having a text document. It helps with available operations and acceptable attributes from the Quality Data Model (QDM) elements. Use of the MAT is required for eCQMs used in CMS programs.