dQM QICore Content Implementation Guide
2026.0.0 - CI Build

dQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2026.0.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-qicore-2026/ and changes regularly. See the Directory of published versions

## Library: Status

Official URL: https://madie.cms.gov/Library/Status | Version: 2026.0.0
Standards status: Informative | Maturity Level: 1 | Computable Name: Status

Status logic.

Metadata
Title | Status
Version | 2026.0.0
Topic | FHIR
Topic | CQL
Description | Status logic.
Type | logic-library from http://terminology.hl7.org/CodeSystem/library-type
Parameter | Name: Patient Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Resource
Library Content
CQL Content |
    /*
    @description: This library contains functions used to constrain FHIR resource elements for measures
    authored by NCQA, based on QICore 7.0.0 resources including IG and authoring patterns. The functions
    may appear similar to some QICoreCommon functions but differ in that they have constraints that are
    relevant for measures authored by NCQA.

    NOTE: For use by January 2026 Connectathon participants for internal use only. Not for use or distribution in commercial products.
    */
    library Status version '2.0.000'

    using QICore version '7.0.2'
    using USCore version '7.0.0'
    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

    // TODO: Consider whether to refactor to use the FHIRCommon declarations here
    codesystem "ObservationCategoryCodes": 'http://terminology.hl7.org/CodeSystem/observation-category'
    codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status'

    code "exam": 'exam' from "ObservationCategoryCodes" display 'exam'
    code "imaging": 'imaging' from "ObservationCategoryCodes" display 'imaging'
    code "confirmed": 'confirmed' from ConditionVerificationStatusCodes display 'confirmed'
    code "unconfirmed": 'unconfirmed' from ConditionVerificationStatusCodes display 'unconfirmed'
    code "provisional": 'provisional' from ConditionVerificationStatusCodes display 'provisional'
    code "differential": 'differential' from ConditionVerificationStatusCodes display 'differential'

    context Patient

    // TODO: Consider whether to use FHIR.Condition here
    //Condition
    //Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
    define fluent function verified(conditions List<Choice<ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis>>):
      conditions C
        where C.verificationStatus is not null implies
          (C.verificationStatus ~ "confirmed"
            or C.verificationStatus ~ "unconfirmed"
            or C.verificationStatus ~ "provisional"
            or C.verificationStatus ~ "differential"
          )

    //Assessment, Performed
    define fluent function isAssessmentPerformed(Obs List<ObservationScreeningAssessment>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    //Device, Order - Personal Use Devices
    define fluent function isDeviceOrderPersonalUseDevices(DeviceRequest List<FHIR.DeviceRequest>):
      DeviceRequest D
        where D.status in { 'active', 'completed' }
          and D.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Diagnostic Study, Order
    define fluent function isDiagnosticStudyOrder(ServiceRequest List<FHIR.ServiceRequest>):
      ServiceRequest S
        where S.status in { 'active', 'completed' }
          and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Intervention, Order
    define fluent function isInterventionOrder(ServiceRequest List<FHIR.ServiceRequest>):
      ServiceRequest S
        where S.status in { 'active', 'completed' }
          and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Laboratory Test, Order
    define fluent function isLaboratoryTestOrder(ServiceRequest List<FHIR.ServiceRequest>):
      ServiceRequest S
        where S.status in { 'active', 'completed' }
          and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Diagnostic Study, Performed
    define fluent function isDiagnosticStudyPerformed(Obs List<ObservationClinicalResult>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }
            and exists ( O.category ObservationCategory
            where ( ObservationCategory ) ~ "imaging"
        )

    //Encounter, Performed
    //General usage unless required otherwise by measure intent (e.g., follow-up encounters)
    define fluent function isEncounterPerformed(Enc List<FHIR.Encounter>):
      Enc E
        where E.status = 'finished'

    //Immunization, Administered
    define fluent function isImmunizationAdministered(Immunization List<FHIR.Immunization>):
      Immunization I
        where I.status ~ 'completed'

    //Intervention, Performed
    define fluent function isInterventionPerformed(Proc List<FHIR.Procedure>):
      Proc P
        where P.status ~ 'completed'

    //Procedure, Performed
    define fluent function isProcedurePerformed(Proc List<FHIR.Procedure>):
      Proc P
        where P.status ~ 'completed'

    //Laboratory Test, Performed
    define fluent function isLaboratoryTestPerformed(Obs List<LaboratoryResultObservation>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    //Medication, Active
    define fluent function isMedicationActive(MedicationRequest List<FHIR.MedicationRequest>):
      MedicationRequest M
        where M.status = 'active'
          and M.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Medication, Dispensed
    define fluent function isMedicationDispensed(Med List<FHIR.MedicationDispense>):
      Med M
        where M.status in { 'completed', 'in-progress', 'on-hold' }

    //Medication, Order
    define fluent function isMedicationOrder(MedicationRequest List<FHIR.MedicationRequest>):
      MedicationRequest M
        where M.status in { 'active', 'completed' }
        and M.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}

    //Physical Exam, Performed
    define fluent function isPhysicalExamPerformed(Obs List<ObservationClinicalResult>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }
          and exists ( O.category ObservationCategory
              where ( ObservationCategory ) ~ "exam"
          )

    //Observation Vital Signs
    define fluent function isObservationBP(Obs List<BloodPressureProfile>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    define fluent function isObservationBodyHeight(Obs List<BodyHeightProfile>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    define fluent function isObservationBodyWeight(Obs List<BodyWeightProfile>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    define fluent function isObservationBMI(Obs List<BMIProfile>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    //Observation Pediatric BMI
    define fluent function isObservationPediatricBMI(Obs List<PediatricBMIforAgeObservationProfile>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }

    //Observation Smoking Status
    define fluent function isObservationSmokingStatus(Obs List<SmokingStatusProfile>):
      Obs O
        where O.status = 'final'

    //Symptom
    define fluent function isSymptom(Obs List<SimpleObservation>):
      Obs O
        where O.status in { 'preliminary', 'final', 'amended', 'corrected' }
ELM XML Content |
    Encoded data (176168 characters)
ELM JSON Content |
    Encoded data (330012 characters)
Generated using version 0.5.0 of the sample-content-ig Liquid templates