Common CQL Artifacts for FHIR (US-Based)
2.0.0 - Informative 2 United States of America flag

Common CQL Artifacts for FHIR (US-Based), published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 2.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/us-cql-ig/ and changes regularly. See the Directory of published versions

Patterns

Page standards status: Informative

This topic provides best practices and patterns for authoring CQL expressions for each type of data accessed in CQL-based questionnaires.

  • Overall: Best practices and patterns for accessing data and authoring logic that apply to all types of data
  • Patient: Patterns and practices for patient data, including demographics
  • AllergyIntolerance: Patterns and practices for allergy/intolerance data
  • Condition: Patterns and practices for condition data including encounter diagnoses, as well as problem list items, and health concerns
  • Observation: Patterns and practices for observations generally, including labs, vital signs, clinical results, and simple observations
  • Service: Patterns and practices for services, including orders, prohibitions, referrals, and procedures
  • Medication: Patterns and practices for medications, including prescriptions, dispenses, and administrations
  • Claim: Patterns and practices for claims and explanations-of-benefits (EOBs)
  • Coverage: Patterns and practices for accessing coverage information

Methodology

US Core is the baseline for expected interoperability; this implementation guide builds CQL authoring patterns on top of US Core. To establish a new set of patterns, the following methodology is used:

  1. Choose a US Core profile to start with.
  2. Review the narrative, elements, and search parameters, building a list of what would commonly be used and benefit from having an authoring pattern defined.
  3. Compare those patterns with QI Core Authoring Patterns to see if we can align.
  4. Evaluate if our libraries already support the pattern or if more functions need to be added.
  5. Add the patterns to a local copy of this implementation guide, with pages split out by US Core profile. For each include a CQL example (ex:).
  6. Evaluate if there are any differences with older versions of US Core that should be called out (at time of writing, most systems are on 6.1.0, and planning for 7.0.0 by Jan 1st, 2028).
  7. Submit the proposed patterns and underlying profile as a change request JIRA tracker to this implementation guide.

Note that things like community calls, ballot feedback, JIRA issues, and trying to support example questionnaires can also feed into adding more patterns outside of this methodology.