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: CMS125FHIRBreastCancerScreen

Official URL: https://madie.cms.gov/Library/CMS125FHIRBreastCancerScreen | Version: 1.1.000
Active as of 2025-07-25 | Responsible: National Committee for Quality Assurance | Computable Name: CMS125FHIRBreastCancerScreen
Other Identifiers: https://madie.cms.gov/login#CMS125FHIRBreastCancerScreen (use: official, )

CMS125FHIRBreastCancerScreen

Metadata
Title | CMS125FHIRBreastCancerScreen
Version | 1.1.000
Identifier | CMS125FHIRBreastCancerScreen
Topic | FHIR
Topic | CQL
Steward (Publisher) | National Committee for Quality Assurance
Description | CMS125FHIRBreastCancerScreen
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 USCoreCommon Resource: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot Canonical URL: `http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot`
Dependency | Description: Library USCoreElements Resource: http://hl7.org/fhir/us/cql/Library/USCoreElements|2.0.0-ballot Canonical URL: `http://hl7.org/fhir/us/cql/Library/USCoreElements|2.0.0-ballot`
Dependency | Description: Library USQualityCoreCommon Resource: US Quality Core Commonversion: null0.1.0-cibuild) Canonical URL: `https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild`
Dependency | Description: Library SDE Resource: SupplementalDataElementsversion: null6.1.000) Canonical URL: `https://madie.cms.gov/Library/SupplementalDataElements|6.1.000`
Dependency | Description: Library Status Resource: Statusversion: null2.1.000) Canonical URL: `https://madie.cms.gov/Library/Status|2.1.000`
Dependency | Description: Library AdultOutpatientEncounters Resource: AdultOutpatientEncountersversion: null5.1.000) Canonical URL: `https://madie.cms.gov/Library/AdultOutpatientEncounters|5.1.000`
Dependency | Description: Library AIFrailLTCF Resource: AdvancedIllnessandFrailtyversion: null2.1.000) Canonical URL: `https://madie.cms.gov/Library/AdvancedIllnessandFrailty|2.1.000`
Dependency | Description: Library Hospice Resource: Hospiceversion: null7.1.000) Canonical URL: `https://madie.cms.gov/Library/Hospice|7.1.000`
Dependency | Description: Library PalliativeCare Resource: PalliativeCareversion: null2.1.000) Canonical URL: `https://madie.cms.gov/Library/PalliativeCare|2.1.000`
Dependency | Description: Code System SNOMEDCT Resource: SNOMED CT (all versions) Canonical URL: `http://snomed.info/sct`
Dependency | Description: Value Set Bilateral Mastectomy Resource: Bilateral Mastectomy Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1005`
Dependency | Description: Value Set History of bilateral mastectomy Resource: History of bilateral mastectomy Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1068`
Dependency | Description: Value Set Mammography Resource: Mammography Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1018`
Dependency | Description: Value Set Status Post Left Mastectomy Resource: Status Post Left Mastectomy Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1069`
Dependency | Description: Value Set Status Post Right Mastectomy Resource: Status Post Right Mastectomy Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1070`
Dependency | Description: Value Set Unilateral Mastectomy Left Resource: Unilateral Mastectomy Left Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1133`
Dependency | Description: Value Set Unilateral Mastectomy Right Resource: Unilateral Mastectomy Right Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1134`
Dependency | Description: Value Set Unilateral Mastectomy, Unspecified Laterality Resource: Unilateral Mastectomy, Unspecified Laterality Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071`
Data Requirement | Type: Condition Profile(s): Condition Code Filter(s): Path: code ValueSet: Status Post Right Mastectomy
Data Requirement | Type: Procedure Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedure` Code Filter(s): Path: code ValueSet: Unilateral Mastectomy Right
Data Requirement | Type: Condition Profile(s): Condition Code Filter(s): Path: code ValueSet: Status Post Left Mastectomy
Data Requirement | Type: Condition Profile(s): Condition Code Filter(s): Path: code ValueSet: Unilateral Mastectomy, Unspecified Laterality
Data Requirement | Type: Procedure Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedure` Code Filter(s): Path: code ValueSet: Unilateral Mastectomy Left
Data Requirement | Type: Condition Profile(s): Condition Code Filter(s): Path: code ValueSet: History of bilateral mastectomy
Data Requirement | Type: Procedure Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedure` Code Filter(s): Path: code ValueSet: Bilateral Mastectomy
Data Requirement | Type: Observation Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-clinical-result` Code Filter(s): Path: code ValueSet: Mammography
Data Requirement | Type: DiagnosticReport Profile(s): `http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-diagnosticreport-note` Code Filter(s): Path: code ValueSet: Mammography
Parameters
Name | Use | Card. | Type | Documentation
Measurement Period | In | 0..1 | Period |
Patient | Out | 0..1 | Resource |
Initial Population | Out | 0..1 | boolean |
Denominator | Out | 0..1 | boolean |
Right Mastectomy Diagnosis | Out | 0..* | Condition |
Right Mastectomy Procedure | Out | 0..* | Procedure |
Left Mastectomy Diagnosis | Out | 0..* | Condition |
Left Mastectomy Procedure | Out | 0..* | Procedure |
Bilateral Mastectomy Diagnosis | Out | 0..* | Condition |
Bilateral Mastectomy Procedure | Out | 0..* | Procedure |
Denominator Exclusions | Out | 0..1 | boolean |
October 1 Two Years Prior to the Measurement Period | Out | 0..1 | dateTime |
Numerator | Out | 0..1 | boolean |
SDE Ethnicity | Out | 0..1 | Resource |
SDE Payer | Out | 0..* | Resource |
SDE Race | Out | 0..1 | Resource |
SDE Sex | Out | 0..1 | Coding |
Stratification 1 | Out | 0..1 | boolean |
Stratification 2 | Out | 0..1 | boolean |
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 CMS125FHIRBreastCancerScreen version '1.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 hl7.fhir.us.cql.USCoreCommon version '2.0.0-ballot' called USCoreCommon
    include hl7.fhir.us.cql.USCoreElements version '2.0.0-ballot' called USCoreElements
    //include fhir.guides.astp."us-quality-core".USQualityCoreCommon version '1.0.0' called USQualityCore
    //include hl7.fhir.us."us-quality-core".USQualityCoreCommon version '2.0.0' called USQualityCore

    include USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon
    include SupplementalDataElements version '6.1.000' called SDE
    include Status version '2.1.000' called Status
    include AdultOutpatientEncounters version '5.1.000' called AdultOutpatientEncounters
    include AdvancedIllnessandFrailty version '2.1.000' called AIFrailLTCF
    include Hospice version '7.1.000' called Hospice
    include PalliativeCare version '2.1.000' called PalliativeCare

    codesystem "SNOMEDCT": 'http://snomed.info/sct'

    valueset "Bilateral Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1005'
    valueset "History of bilateral mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1068'
    valueset "Mammography": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1018'
    valueset "Status Post Left Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1069'
    valueset "Status Post Right Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1070'
    valueset "Unilateral Mastectomy Left": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1133'
    valueset "Unilateral Mastectomy Right": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1134'
    valueset "Unilateral Mastectomy, Unspecified Laterality": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071'

    code "Left (qualifier value)": '7771000' from "SNOMEDCT" display 'Left (qualifier value)'
    code "Right (qualifier value)": '24028007' from "SNOMEDCT" display 'Right (qualifier value)'

    parameter "Measurement Period" Interval<DateTime>
      default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)

    context Patient

    define "Initial Population":
      Patient.ageInYearsAt(date from end of "Measurement Period") in Interval[42, 74]
        and Patient.sex() = '248152002'
        and exists AdultOutpatientEncounters."Qualifying Encounters"

    define "Denominator":
      "Initial Population"

    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or ( ( exists ( "Right Mastectomy Diagnosis" )
              or exists ( "Right Mastectomy Procedure" )
          )
            and ( exists ( "Left Mastectomy Diagnosis" )
                or exists ( "Left Mastectomy Procedure" )
            )
        )
        or exists "Bilateral Mastectomy Diagnosis"
        or exists "Bilateral Mastectomy Procedure"
        or AIFrailLTCF."Is Age 66 or Older with Advanced Illness and Frailty"
        or AIFrailLTCF."Is Age 66 or Older Living Long Term in a Nursing Home"
        or PalliativeCare."Has Palliative Care in the Measurement Period"

    define "Right Mastectomy Diagnosis":
      ( ( ( [FHIR.Condition: "Status Post Right Mastectomy"] ) RightMastectomyCondition
          union ( ( [FHIR.Condition: "Unilateral Mastectomy, Unspecified Laterality"] ) UnilateralMastectomyDiagnosis
              where exists UnilateralMastectomyDiagnosis.bodySite S
                where S ~ "Right (qualifier value)"
          )
      ).verified ( ) ) RightMastectomy
        where RightMastectomy.prevalenceInterval ( ) starts on or before end of "Measurement Period"

    define "Right Mastectomy Procedure":
      ( ( [USQualityCore.Procedure: "Unilateral Mastectomy Right"] ).isProcedurePerformed ( ) ) UnilateralMastectomyRightPerformed
        where UnilateralMastectomyRightPerformed.performed.toInterval ( ) ends on or before end of "Measurement Period"

    define "Left Mastectomy Diagnosis":
      ( ( ( [FHIR.Condition: "Status Post Left Mastectomy"] )
          union ( ( [Condition: "Unilateral Mastectomy, Unspecified Laterality"] ) UnilateralMastectomyDiagnosis
              where exists UnilateralMastectomyDiagnosis.bodySite S
                where S ~ "Left (qualifier value)"
          )
      ).verified ( ) ) LeftMastectomy
        where LeftMastectomy.prevalenceInterval ( ) starts on or before end of "Measurement Period"

    define "Left Mastectomy Procedure":
      ( ( [USQualityCore.Procedure: "Unilateral Mastectomy Left"] ).isProcedurePerformed ( ) ) UnilateralMastectomyLeftPerformed
        where UnilateralMastectomyLeftPerformed.performed.toInterval ( ) ends on or before end of "Measurement Period"

    define "Bilateral Mastectomy Diagnosis":
      ( ( [FHIR.Condition: "History of bilateral mastectomy"] ).verified ( ) ) BilateralMastectomyHistory
        where BilateralMastectomyHistory.prevalenceInterval ( ) starts on or before end of "Measurement Period"

    define "Bilateral Mastectomy Procedure":
      ( ( [USQualityCore.Procedure: "Bilateral Mastectomy"] ).isProcedurePerformed ( ) ) BilateralMastectomyPerformed
        where BilateralMastectomyPerformed.performed.toInterval ( ) ends on or before end of "Measurement Period"

    define "Numerator":
      exists (
        ( ( [USQualityCore.ObservationClinicalResult: "Mammography"] ).isDiagnosticStudyPerformed ( ) ) Mammogram
          where Mammogram.effective.toInterval ( ) ends during day of Interval["October 1 Two Years Prior to the Measurement Period", end of "Measurement Period"]
      ) or exists (
        ( ( [USQualityCore.DiagnosticReportNote: "Mammography"] ).complete ( ) ) Mammogram
          where Mammogram.effective.toInterval ( ) ends during day of Interval["October 1 Two Years Prior to the Measurement Period", end of "Measurement Period"]
      )

    define "October 1 Two Years Prior to the Measurement Period":
      DateTime((year from start of "Measurement Period" - 2), 10, 1, 0, 0, 0, 0, 0)

    define "SDE Ethnicity":
      SDE."SDE Ethnicity"

    define "SDE Payer":
      SDE."SDE Payer"

    define "SDE Race":
      SDE."SDE Race"

    define "SDE Sex":
      SDE."SDE Sex"

    define "Stratification 1":
      AgeInYearsAt(date from
        end of "Measurement Period"
      ) in Interval[42, 51]

    define "Stratification 2":
      AgeInYearsAt(date from
        end of "Measurement Period"
      ) in Interval[52, 74]
ELM XML Content |
    Encoded data
ELM JSON Content |
    Encoded data
Generated using version 0.5.4 of the sample-content-ig Liquid templates