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

Official URL: https://madie.cms.gov/Library/CMS0334FHIRPCCesareanBirth Version: 1.1.000
Active as of 2025-08-25 Responsible: The Joint Commission Computable Name: CMS0334FHIRPCCesareanBirth
Other Identifiers: https://madie.cms.gov/login#CMS0334FHIRPCCesareanBirth (use: official, )

CMS0334FHIRPCCesareanBirth

Metadata
Title CMS0334FHIRPCCesareanBirth
Version 1.1.000
Identifier CMS0334FHIRPCCesareanBirth
Topic FHIR
Topic CQL
Steward (Publisher) The Joint Commission
Description

CMS0334FHIRPCCesareanBirth

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 CQMCommon
Resource: CQMCommonversion: null5.1.000)
Canonical URL: https://madie.cms.gov/Library/CQMCommon|5.1.000
Dependency Description: Library PCMaternal
Resource: PCMaternalversion: null6.1.000)
Canonical URL: https://madie.cms.gov/Library/PCMaternal|6.1.000
Dependency Description: Code System LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Dependency Description: Value Set Abnormal Presentation
Resource: Abnormal Presentation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.105
Dependency Description: Value Set Cesarean Birth
Resource: Cesarean Birth
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.282
Dependency Description: Value Set Delivery of Singleton
Resource: Delivery of Singleton
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.99
Dependency Description: Value Set Genital Herpes
Resource: Genital Herpes
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1049
Dependency Description: Value Set Placenta Accreta Spectrum Previa or Vasa Previa
Resource: Placental Accreta Spectrum Previa or Vasa Previa
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.37
Dependency Description: Value Set 37 to 42 Plus Weeks Gestation
Resource: 37 to 42 Plus Weeks Gestation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.68
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation
Code Filter(s):
Path: code
ValueSet: Abnormal Presentation
Data Requirement Type: Procedure
Profile(s): Procedure
Code Filter(s):
Path: code
ValueSet: Cesarean Birth
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation
Code Filter(s):
Path: code
Code(s): LOINC: 11996-6 ([#] Pregnancies)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation
Code Filter(s):
Path: code
Code(s): LOINC: 11637-6 ([#] Births.preterm)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation
Code Filter(s):
Path: code
Code(s): LOINC: 11639-2 ([#] Births.term)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation
Code Filter(s):
Path: code
Code(s): LOINC: 11977-6 ([#] Parity)
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Resource
Delivery Encounter With Calculated Gestational Age Greater Than Or Equal To 37 Weeks Out 0..* Encounter
Delivery Encounter With Estimated Gestational Age Greater Than Or Equal To 37 Weeks Out 0..* Encounter
Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks Based On Coding Out 0..* Encounter
Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks Out 0..* Encounter
Encounter With Singleton Delivery Out 0..* Encounter
Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births Out 0..* Encounter
Encounter With Abnormal Presentation Out 0..* Encounter
Encounter With Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum Out 0..* Encounter
Delivery Encounter With Abnormal Presentation, Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum Out 0..* Encounter
Denominator Out 0..* Encounter
Denominator Exclusions Out 0..* Encounter
Initial Population Out 0..* Encounter
Delivery Encounter With Cesarean Birth Out 0..* Encounter
Numerator Out 0..* Encounter
SDE Ethnicity Out 0..1 Resource
SDE Payer Out 0..* Resource
SDE Race Out 0..1 Resource
SDE Sex Out 0..1 Coding
SDE Variable Calculated Gestational Age Out 0..* Resource
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 CMS0334FHIRPCCesareanBirth version '1.0.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 USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon
include SupplementalDataElements version '6.1.000' called SDE
include CQMCommon version '5.1.000' called CQMCommon
include PCMaternal version '6.1.000' called PCMaternal

codesystem "LOINC": 'http://loinc.org'

valueset "Abnormal Presentation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.105'
valueset "Cesarean Birth": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.282'
valueset "Delivery of Singleton": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.99'
valueset "Genital Herpes": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1049'
valueset "Placenta Accreta Spectrum Previa or Vasa Previa": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.37'
valueset "37 to 42 Plus Weeks Gestation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.68'

code "[#] Births.preterm": '11637-6' from "LOINC" display '[#] Births.preterm'
code "[#] Births.term": '11639-2' from "LOINC" display '[#] Births.term'
code "[#] Parity": '11977-6' from "LOINC" display '[#] Parity'
code "[#] Pregnancies": '11996-6' from "LOINC" display '[#] Pregnancies'
//code "Date and time of obstetric delivery": '93857-1' from "LOINC" display 'Date and time of obstetric delivery'


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

context Patient

define "Delivery Encounter With Abnormal Presentation, Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum":
  "Encounter With Abnormal Presentation"
    union "Encounter With Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum"

define "Delivery Encounter With Calculated Gestational Age Greater Than Or Equal To 37 Weeks":
  PCMaternal."Delivery Encounter With Age Range" DeliveryEncounter
    where DeliveryEncounter.calculatedGestationalAge ( ) >= 37

define "Delivery Encounter With Estimated Gestational Age Greater Than Or Equal To 37 Weeks":
  PCMaternal."Delivery Encounter With Age Range" DeliveryEncounter
    where DeliveryEncounter.calculatedGestationalAge ( ) is null
      and DeliveryEncounter.lastEstimatedGestationalAge ( ) >= 37 weeks

define "Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks":
  "Delivery Encounter With Calculated Gestational Age Greater Than Or Equal To 37 Weeks"
    union "Delivery Encounter With Estimated Gestational Age Greater Than Or Equal To 37 Weeks"
    union "Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks Based On Coding"

define "Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks Based On Coding":
  PCMaternal."Delivery Encounter With Age Range" DeliveryEncounter
    let CGA: DeliveryEncounter.calculatedGestationalAge ( ),
    EGA: DeliveryEncounter.lastEstimatedGestationalAge ( )
    where CGA is null
      and EGA is null
      and ( DeliveryEncounter.reasonCode in "37 to 42 Plus Weeks Gestation"
          or DeliveryEncounter.encounterDiagnosis ( ).code in "37 to 42 Plus Weeks Gestation"
      )

define "Denominator":
  "Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births"

define "Denominator Exclusions":
  "Delivery Encounter With Abnormal Presentation, Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum"

define "Initial Population":
  PCMaternal."Delivery Encounter With Age Range"

define "Numerator":
  "Delivery Encounter With Cesarean Birth"

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 "SDE Variable Calculated Gestational Age":
  PCMaternal."Variable Calculated Gestational Age"

define "Delivery Encounter With Cesarean Birth":
  "Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births" ThirtySevenWeeksPlusEncounter
    with ["Procedure": "Cesarean Birth"] CSection
      such that CSection.performed.toInterval ( ) during ThirtySevenWeeksPlusEncounter.hospitalizationWithEDOBTriageObservation ( )
        and CSection.status = 'completed'

define "Encounter With Genital Herpes, Placenta Previa, Vasa Previa Or Placenta Accreta Spectrum":
  "Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births" ThirtySevenWeeksPlusEncounter
    where ( ThirtySevenWeeksPlusEncounter.encounterDiagnosis ( ).code in "Placenta Accreta Spectrum Previa or Vasa Previa"
        or ThirtySevenWeeksPlusEncounter.encounterDiagnosis ( ).code in "Genital Herpes"
        or ThirtySevenWeeksPlusEncounter.reasonCode in "Genital Herpes"
        or ThirtySevenWeeksPlusEncounter.reasonCode in "Placenta Accreta Spectrum Previa or Vasa Previa"
    )

define "Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births":
  ( "Delivery Encounter With Gestational Age Greater Than Or Equal To 37 Weeks"
    intersect "Encounter With Singleton Delivery" ) SingletonEncounterGE37Weeks
    where ( ( SingletonEncounterGE37Weeks.lastGravida ( ) = 1 )
        or ( SingletonEncounterGE37Weeks.lastParity ( ) = 0 )
        or ( ( SingletonEncounterGE37Weeks.lastHistoryPretermBirth ( ) = 0 )
            and ( SingletonEncounterGE37Weeks.lastHistoryTermBirth ( ) = 0 )
        )
    )

define "Encounter With Abnormal Presentation":
  "Singleton Delivery Encounters At 37 Plus Weeks Gravida 1 Parity 0, No Previous Births" ThirtySevenWeeksPlusEncounter
    let LastAbnormalPresentation: Last(["SimpleObservation": "Abnormal Presentation"] AbnormalPresentation
        where AbnormalPresentation.effective.earliest() before or on ThirtySevenWeeksPlusEncounter.lastTimeOfDelivery()
          and AbnormalPresentation.status in { 'final', 'amended', 'corrected' }
        sort by effective.earliest()
    )
    where LastAbnormalPresentation.effective.earliest ( ) during ThirtySevenWeeksPlusEncounter.hospitalizationWithEDOBTriageObservation ( )
      or ThirtySevenWeeksPlusEncounter.encounterDiagnosis ( ).code in "Abnormal Presentation"
      or ThirtySevenWeeksPlusEncounter.reasonCode in "Abnormal Presentation"

define "Encounter With Singleton Delivery":
  PCMaternal."Delivery Encounter With Age Range" DeliveryEncounter
    where DeliveryEncounter.reasonCode in "Delivery of Singleton"
      or DeliveryEncounter.encounterDiagnosis ( ).code in "Delivery of Singleton"

define fluent function lastGravida(TheEncounter Encounter):
  Last(["SimpleObservation": "[#] Pregnancies"] Gravida
      where Gravida.value is not null
        and Gravida.status in { 'final', 'amended', 'corrected' }
        and Gravida.effective.earliest() 42 weeks or less before TheEncounter.lastTimeOfDelivery()
      sort by effective.earliest()
  ).value as FHIR.integer

define fluent function lastHistoryPretermBirth(TheEncounter Encounter):
  Last(["SimpleObservation": "[#] Births.preterm"] PretermBirth
      where PretermBirth.effective.earliest() 42 weeks or less before TheEncounter.lastTimeOfDelivery()
        and PretermBirth.status in { 'final', 'amended', 'corrected' }
        and PretermBirth.value is not null
      sort by effective.earliest()
  ).value as FHIR.integer

define fluent function lastHistoryTermBirth(TheEncounter Encounter):
  Last(["SimpleObservation": "[#] Births.term"] TermBirth
      where TermBirth.effective.earliest() 42 weeks or less before TheEncounter.lastTimeOfDelivery()
        and TermBirth.status in { 'final', 'amended', 'corrected' }
        and TermBirth.value is not null
      sort by effective.earliest()
  ).value as FHIR.integer

define fluent function lastParity(TheEncounter Encounter):
  Last(["SimpleObservation": "[#] Parity"] Parity
      where Parity.effective.earliest() 42 weeks or less before TheEncounter.lastTimeOfDelivery()
        and Parity.status in { 'final', 'amended', 'corrected' }
        and Parity.value is not null
      sort by effective.earliest()
  ).value as FHIR.integer
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates