Menu

CQL Engines for Technical Teams

An introduction to implementing and maintaining a CQL engine for technical users.

CQL engines are essential for processing and interpreting clinical data in digital measures. Implementing and maintaining a CQL engine can be a complex task, especially for technical teams new to digital quality measurement. This guide explains the essential components of CQL engines and how they work, and includes steps for implementation. Whether you're a software developer, data engineer or IT professional, this guide will give you the foundational knowledge you need to implement, integrate and sustain a CQL engine at your organization.

Understanding How CQL Engines Work

woman coding

A CQL engine interprets CQL grammar through lexical analysis and parsing of components to identify a measure's population criteria, breaking down CQL statements into tokens and structures that it can understand and process. The engine then uses these parsed components to determine the criteria for including a patient or population in a digital quality measure, such as a HEDIS® measure.

Interpreted CQL logic is integrated with Fast Healthcare Interoperability Resources (FHIR®) queries to import relevant information from EHRs and other health care systems. FHIR provides a standardized format for representing health care data, which aligns with CQL's requirement for consistent and structured data to execute quality measurement logic accurately. Because CQL relies on access to diverse datasets from multiple health care systems, FHIR's standardized approach enables seamless data exchange, allowing CQL engines to retrieve and process data from different sources. Imported data are evaluated against the measure criteria defined in the CQL.

Data from the EHR are parsed and processed based on a measure's defined criteria. A MeasureReport is created for FHIR measures. For eCQM measures created in CQL/QDM (Quality Data Model), the output is based on Clinical Document Architecture. Regardless of the data model used, two types of files can be created.

  • An individual MeasureReport in FHIR or a Quality Reporting Document Architecture (QRDA) CAT 1 file for eCQMs. These files contain patient-level data.
  • An aggregate MeasureReport in FHIR or a QRDA CAT 3 file for eCQMs. These files contain aggregated results for reporting.

For the MIPS program, QRDA files are submitted by clinicians as part of their quality reporting obligations to regulatory bodies or payers. These reports help assess the quality of care provided, and ensure compliance with health care standards and regulations.

The diagram below depicts how these specifications can be used across different implementation environments.

CQL Based Solutions
Click for more information

Source: https://build.fhir.org/ig/HL7/cql/01-introduction.html

This CQL-based solution can be extended to meet Clinical Decision Support (CDS) requirements as well. By using the same technical approach to define CDS logic, the system can deliver real-time alerts and recommendations to clinicians to help them make informed treatment decisions, leading to better patient outcomes. Additionally, integrating CDS with quality reporting tools enables clinicians to improve their performance on quality measures by offering guidance on best practices and evidence-based care. This dual functionality enhances both the quality of care and the efficiency of health care delivery.

Find details on how CQL engines work here.

Preparing for CQL Engine Implementation

Implementing a CQL engine requires careful planning and consideration of various factors. It is essential to perform a comprehensive assessment, plan strategically and develop a robust change management plan to navigate the transition smoothly and minimize disruptions to daily operations. Identify and thoroughly review the clinical guidelines and quality measures you intend to implement; ensure guidelines are well-documented and that your team understands how to translate them into CQL.

Find helpful tips here.

Assessing Your Current Technology Stack and Its Compatibility With CQL

Before implementing a CQL engine, assess your current technology stack for compatibility by reviewing the following:

  • Existing Systems: Create a detailed inventory of your existing systems, including EHRs, clinical data repositories and other relevant health care IT systems.
  • Data Integration Capabilities: Evaluate the data integration capabilities of your systems. Ensure they can support the necessary data exchange protocols (e.g., FHIR, HL7) the CQL engine will use.
  • Database Compatibility: Assess whether your current databases can efficiently store and retrieve the structured data required for CQL execution. Consider the need for database schema modifications or optimizations.
  • APIs and Middleware: Check to ensure your systems support required APIs or middleware to facilitate seamless integration with the CQL engine.
  • Technical Infrastructure: Examine your technical infrastructure—servers, storage, network capacity—to ensure it can support the additional load generated by the CQL engine.
  • Software and Tools: Review the software and tools currently used for CDS and quality measurement. Determine if they are compatible with CQL, or if there are available upgrades or plug-ins that support CQL integration.

Aligning Organizational Processes with CQL Requirements

To implement a CQL engine effectively, your organization must align its processes with the requirements and best practices for CQL. Keep these strategies in mind:

Stakeholder Engagement

Engage key stakeholders early in the process. Ensure they understand the benefits of CQL and are committed to successful implementation.

Training and Education

Provide comprehensive staff training on CQL principles and their application in clinical decision support and quality measurement. This includes technical training for IT staff and practical training for clinicians.

Change Management

Implement a robust change management strategy to manage the transition to CQL, including clear communication about the changes, phased implementation and continuous feedback loops to address issues promptly.

Continuous Monitoring and Evaluation

Establish processes for continuous monitoring and evaluation of the CQL engine's performance and impact. Use metrics and feedback from end-users to make iterative improvements.

Compliance and Governance

Develop governance structures to ensure ongoing compliance with regulatory requirements and best practices. This includes regular audits, data quality checks and updating CQL logic as clinical guidelines evolve.

Integrating CQL Engines With Existing Stacks

Compatibility with Current Measure Engines

Consider these key points when integrating CQL engines with existing technology stacks such as SQL measure engines:

  • Data Model Alignment: Ensure that the data models used by your measure engines are compatible with those required by the CQL engine. This might involve mapping relational database schemas, such as SQL to FHIR resources.
  • Query Translation: Evaluate how existing SQL-based queries and logic can be translated into CQL.
  • Interface With Databases: While SQL engines query relational databases directly, CQL engines typically work through APIs (such as FHIR APIs) to access and manipulate data, requiring middleware or adapters to bridge the two.
  • Performance Considerations: Compare the performance characteristics of SQL-based measure engines with those of CQL engines. SQL is highly optimized for relational data operations, while CQL's performance depends on underlying implementation and data access patterns.

Strategic Considerations for Integrating CQL With Existing Systems and Software

Leverage Existing Infrastructure

Maximize the use of existing IT infrastructure to manage the cost and complexity associated with deploying new hardware.

Implement Middleware and Adapters

Implement middleware and adapters to translate and route data between the CQL engine and existing systems, ensuring that CQL queries can access the necessary data regardless of the data's original format.

Use API Integrations

Use APIs to integrate the CQL engine with existing systems and data repositories. FHIR APIs are commonly used for this purpose, as they provide a standardized way to access health care data.

Optimize Data Mapping and Transformation

Develop data mapping and transformation processes to convert data from current formats into those required by the CQL engine.

Adopt an Incremental Approach

Begin with a limited pilot integration of the CQL engine to test compatibility and performance. Gradually expand to cover more systems and use cases, based on initial results and feedback.

Training and Support

Provide training and support to IT staff and end users to facilitate a smooth transition.

Related Resources