-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started with Clinical Quality Language
Whether you're developing measures, building engines, or using CQL in implementation guides, this guide will help you get up and running.
Choose your path below to get started.
| 📊 Measure Developer | ⚙️ Engine Developer | 👤 Clinical Data Solution Implementer |
|---|---|---|
| Authoring quality measures and clinical decision support | Building CQL execution engines and infrastructure | Using CQL in implementation guides |
| Start Here → | Start Here → | Start Here → |
Goal: Write CQL to define quality measure logic and clinical decision support rules
| Step | Action | Resources |
|---|---|---|
| 1 | Set up tools | VS Code • CQL Plugin • MADiE |
| 2 | Learn basics | Session 63: Beginning CQL • CQL Spec Ch. 2 • Cheat Sheet |
| 3 | Study examples | Example Measures • Current eCQMs |
| 4 | Follow conventions | Formatting Guide • Authoring Patterns |
| 5 | Get help | chat.fhir.org #cql • Q&A Index |
| 6 | Using CQL with Terminology Services | Using CQL With Terminology Services |
Ready to dive deeper? → Go to Measure Developer Hub
Goal: Implement CQL parsers, evaluators, and execution infrastructure
| Step | Action | Resources |
|---|---|---|
| 1 | Understand architecture | CQL Specification • ELM Model • Reference Implementations |
| 2 | Set up environment | Clone reference implementation • CQL Translator |
| 3 | Build core features | Start with data types → operators → retrieves → queries |
| 4 | Test conformance | CQL Test Suite • Run tests regularly |
| 5 | Join community | CQL Developers Stream • [HL7 Connectathons] |
| 6 | Using CQL with Terminology Services | Using CQL With Terminology Services |
Ready to dive deeper? → Go to Engine Developer Hub
Goal: Understand and implement CQL logic from implementation guides like Da Vinci and HEDIS
| Step | Action | Resources |
|---|---|---|
| 1 | Learn to read CQL | Understanding Basics • Session 63: Beginning CQL • Cheat Sheet |
| 2 | Understand your IG | Review clinical logic • Identify data elements • Understand populations |
| 3 | Choose tools | Select CQL Engine • Set up data mapping • Test with samples |
| 4 | Validate and test | Use IG test cases • Verify data requirements • Check expected outcomes |
| 5 | Get support | Da Vinci Project • [chat.fhir.org #cql] |
| 6 | Using CQL with Terminology Services | Using CQL With Terminology Services |
Ready to dive deeper? → Go to Clinical Data Solution Implementers
Here's a simple CQL library structure:
library MyFirstMeasure version '1.0.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
valueset "Diabetes": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001'
define "Measurement Period":
Interval[@2024-01-01, @2024-12-31]
define "Patient Has Diabetes":
exists (
[Condition: "Diabetes"] C
where C.clinicalStatus ~ "active"
)Key Components:
- Library declaration - Names and versions your library
- Using declaration - Specifies your data model (FHIR or QDM)
- Include statements - Imports shared libraries
- Value set declarations - References to standard terminologies
- Define statements - Your clinical logic expressions
Retrieving Data:
// Get all conditions with a specific code
[Condition: "Diabetes"]
// Filter the results
[Condition: "Diabetes"] C
where C.clinicalStatus ~ "active"Queries with Timing:
// Find encounters in a specific period
[Encounter: "Inpatient"] E
where E.period during "Measurement Period"Calculations:
// Calculate age at a specific date
AgeInYearsAt(start of "Measurement Period")
// Calculate duration
duration in days of EncounterPeriod- CQL Specification - Official language specification
- CQL Formatting & Usage Wiki - Community best practices
- eCQI Resource Center - CMS resources and FAQs
- VS Code CQL Plugin - Authoring environment
- CQL Translator - Validation and translation
- CQL Evaluation Service - Test CQL in your browser
- Cooking with CQL - 90+ tutorial sessions
- Example Measures - Published measures with CQL
- CQL Cheat Sheet - Quick reference
If you're building or evaluating CQL engines:
- Java CQL Engine - Reference implementation in Java
- .NET CQL Engine - Implementation for .NET
- CQL Evaluator - FHIR-focused evaluation service
CQL works with different healthcare data models:
- Modern, API-first standard
- Used with QI-Core profiles
- Growing adoption across the industry
- FHIR Specification
- QI-Core Profiles
- Established for quality measures
- Used in many current CMS eCQMs
- Gradually transitioning to FHIR
- QDM Specification
- Real-time chat: chat.fhir.org #cql
- Email support: ecqi@lantanagroup.com
- GitHub issues: CQL Specification Issues
- Monthly webinars: Cooking with CQL (2nd Thursday)
- Connectathons: HL7 FHIR Connectathon
- Mailing lists: CQL Discussion List
Choose your path above to access role-specific resources and guidance:
- Measure Developer Hub - Authoring measures and CDS
- Engine Developer Hub - Building CQL engines
- Clinical Data Solution Implementers - Using CQL for measuring clinical outcomes
Maintained by the Digital Quality Implementers Community