Quality Measure Implementation Guide
2.0.0-ballot - STU 2 Ballot

Quality Measure Implementation Guide - Downloaded Version null See the Directory of published versions

## Measure: Age Stratified Example (Experimental)

Official URL: http://hl7.org/fhir/uv/cqm/Measure/age-stratified-example | Version: 2.0.0-ballot | Highlight text changes?
Standards status: Informative Active as of 2025-08-13 | Computable Name: MeasureAgeStratifiedExample
Other Identifiers: OID:2.16.840.1.113883.4.642.40.61.29.20

A sample measure demonstrating age stratification using age ranges represented as ISO-8601-Derived periods.

Metadata
Title | Measure Age Stratified Example
Version | 2.0.0-ballot
Identifier | urn:oid:2.16.840.1.113883.4.642.40.61.29.20
Experimental | true
Jurisdiction | 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) | HL7 International / Clinical Quality Information
Description | A sample measure demonstrating age stratification using age ranges represented as ISO-8601-Derived periods.
Measure Basis | boolean
Measure Scoring | cohort from http://terminology.hl7.org/CodeSystem/measure-scoring
Measure Group (Rate) (ID: primary)
Stratifier | Code: Age Group Description: Stratification by age groups represented as ISO-8601-Derived periods.
Measure Logic
Primary Library | Age Stratification Example
Contents | Population Criteria Logic Definitions Terminology Dependencies Data Requirements Parameters
Population Criteria
Measure Group (Rate) (ID: primary)
Stratifier
    /*
    By Patient Age as of the start of the Measurement Period
    Age (10-14, 15-19, 20+)
    */
    define "By Age":
      case
        when AgeInYearsAt(start of "Measurement Period") in Interval[10, 14] then "P10Y--P15Y"
        when AgeInYearsAt(start of "Measurement Period") in Interval[15, 19] then "P15Y--P20Y"
        when AgeInYearsAt(start of "Measurement Period") >= 20 then "P20Y--P9999Y"
        else null
      end
Definition
Logic Definitions
Logic Definition | Library Name: AgeStratificationExample
    define "Initial Population":
      exists (
        [Encounter] E
          where E.period during "Measurement Period"
      )
Logic Definition | Library Name: AgeStratificationExample
    /*
    By Patient Age as of the start of the Measurement Period
    Age (10-14, 15-19, 20+)
    */
    define "By Age":
      case
        when AgeInYearsAt(start of "Measurement Period") in Interval[10, 14] then "P10Y--P15Y"
        when AgeInYearsAt(start of "Measurement Period") in Interval[15, 19] then "P15Y--P20Y"
        when AgeInYearsAt(start of "Measurement Period") >= 20 then "P20Y--P9999Y"
        else null
      end
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period."start" is null then
                Interval(period."start".value, period."end".value]
            else
                Interval[period."start".value, period."end".value]
Terminology
Code System | Description: Code system Time Period Ranges Resource: Time Period Ranges Canonical URL: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 10-14 years Code: P10Y--P15Y System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 15-19 years Code: P15Y--P20Y System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 20+ years Code: P20Y--P9999Y System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Dependencies
Dependency | Description: FHIR model information Resource: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1 Canonical URL: `http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1`
Dependency | Description: Library FHIRHelpers Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1 Canonical URL: `http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1`
Data Requirements
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: period
Data Requirement | Type: Patient Profile(s): Patient
Parameters
Name | Use | Card. | Type | Documentation
Measurement Period | In | 0..1 | Period |
Initial Population | Out | 0..1 | boolean |
By Age | Out | 0..1 | Coding |
Generated using version 0.5.4 of the sample-content-ig Liquid templates