Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions

## Library: AdultOutpatientEncounters

Official URL: https://madie.cms.gov/Library/AdultOutpatientEncounters | Version: 5.1.000
Active as of 2025-07-25 | Responsible: National Committee for Quality Assurance | Computable Name: AdultOutpatientEncounters

This library contains a definition used to identify denominator qualifying encounters.

Metadata
Title | AdultOutpatientEncounters
Version | 5.1.000
Topic | FHIR
Topic | CQL
Steward (Publisher) | National Committee for Quality Assurance
Description | This library contains a definition used to identify denominator qualifying encounters.
Type | logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency | Description: Model USQualityCore Resource: `https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild` Canonical URL: `https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild`
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`
Dependency | Description: Library FHIRCommon Resource: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0 Canonical URL: `http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0`
Dependency | Description: Library Status Resource: Statusversion: null2.1.000) Canonical URL: `https://madie.cms.gov/Library/Status|2.1.000`
Dependency | Description: Value Set Annual Wellness Visit Resource: Annual Wellness Visit Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240`
Dependency | Description: Value Set Home Healthcare Services Resource: Home Healthcare Services Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016`
Dependency | Description: Value Set Office Visit Resource: Office Visit Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001`
Dependency | Description: Value Set Virtual Encounter Resource: Virtual Encounter Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089`
Dependency | Description: Value Set Preventive Care Services Established Office Visit, 18 and Up Resource: Preventive Care Services Established Office Visit, 18 and Up Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025`
Dependency | Description: Value Set Preventive Care Services Initial Office Visit, 18 and Up Resource: Preventive Care Services Initial Office Visit, 18 and Up Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023`
Dependency | Description: Value Set Telephone Visits Resource: Telephone Visits Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080`
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Office Visit
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Annual Wellness Visit
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Preventive Care Services Established Office Visit, 18 and Up
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Preventive Care Services Initial Office Visit, 18 and Up
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Home Healthcare Services
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Virtual Encounter
Data Requirement | Type: Encounter Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter` Code Filter(s): Path: type ValueSet: Telephone Visits
Parameters
Name | Use | Card. | Type | Documentation
Measurement Period | In | 0..1 | Period |
Patient | Out | 0..1 | Resource |
Qualifying Encounters | Out | 0..* | Encounter |
Library Content
CQL Content |
    /*
    NOTE: For use by March 2026 US Realm Connectathon participants for internal use only. Not for use or distribution in commercial products.
    */
    library AdultOutpatientEncounters version '5.1.000'

    using USQualityCore version '0.1.0-cibuild'
    using USCore version '6.1.0-derived'
    using FHIR version '4.0.1'

    include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers
    include hl7.fhir.uv.cql.FHIRCommon version '2.0.0' called FHIRCommon

    include Status version '2.1.000'

    valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'
    valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'
    valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
    valueset "Virtual Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089'
    valueset "Preventive Care Services Established Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025'
    valueset "Preventive Care Services Initial Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023'
    valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'

    parameter "Measurement Period" Interval<DateTime>
      default Interval[@2026-01-01T00:00:00, @2026-12-31T23:59:59]

    context Patient

    // NOTE: The USQualityCore encounter here is not introducing any constraints, and so could be expressed directly using US Core
    define "Qualifying Encounters":
      ( (
        [USQualityCore.Encounter: "Office Visit"]
          union [USQualityCore.Encounter: "Annual Wellness Visit"]
          union [USQualityCore.Encounter: "Preventive Care Services Established Office Visit, 18 and Up"]
          union [USQualityCore.Encounter: "Preventive Care Services Initial Office Visit, 18 and Up"]
          union [USQualityCore.Encounter: "Home Healthcare Services"]
          union [USQualityCore.Encounter: "Virtual Encounter"]
          union [USQualityCore.Encounter: "Telephone Visits"]
        ).isEncounterPerformed()
      ) ValidEncounter
        where ValidEncounter.period during day of "Measurement Period"
ELM XML Content |
    Encoded data
ELM JSON Content |
    Encoded data
Generated using version 0.5.4 of the sample-content-ig Liquid templates