eCQM QICore Content Implementation Guide
2023.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2023.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2023/ and changes regularly. See the Directory of published versions

## Library: MPPEncounterLevel (Experimental)

Official URL: http://ecqi.healthit.gov/ecqms/Library/MPPEncounterLevel | Version:
Draft as of 2026-05-13 | Computable Name: MPPEncounterLevel

Id: | MPPEncounterLevel
Url: | MPPEncounterLevel
Name: | MPPEncounterLevel
Status: | draft
Experimental: | true
Type: | system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library
Date: | 2026-05-13 23:09:13+0000
Related Artifacts: | Dependencies `http://hl7.org/fhir/Library/QICore-ModelInfo` FHIRHelpers version: 4.3.000 CQMCommon version: 1.4.000 QICoreCommon version: 1.5.000 SupplementalDataElements version: 3.4.000 TJCOverall version: 8.9.000 AttributionModel version: 0.1.0 Antithrombotic Therapy for Ischemic Stroke Hemorrhagic Stroke Ischemic Stroke Medical Reason Non-Elective Inpatient Encounter Patient Refusal Pharmacological Contraindications For Antithrombotic Therapy
Parameters: |
Name | Type | Min | Max | In/Out
--- | --- | --- | --- | ---
Measurement Period | Period | 0 | 1 | In
Provider | string | 0 | 1 | In
Patient | Resource | 0 | 1 | Out
Non Elective Inpatient Encounter | Resource | 0 | * | Out
All Stroke Encounter | Resource | 0 | * | Out
Encounter with Principal Diagnosis and Age | Resource | 0 | * | Out
Initial Population | Resource | 0 | * | Out
Data Requirements: |
Type | Profile | MS | Code Filter
--- | --- | --- | ---
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient |  |
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ;;;;;;; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424
Condition | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition | ;; |
Content: text/cql
    library MPPEncounterLevel

    using QICore version '4.1.1'

    include FHIRHelpers version '4.3.000' called FHIRHelpers
    include CQMCommon version '1.4.000' called CQMCommon
    include QICoreCommon version '1.5.000' called QICoreCommon
    include SupplementalDataElements version '3.4.000' called SDE
    include TJCOverall version '8.9.000' called TJC
    include AttributionModel version '0.1.0' called AM

    valueset "Antithrombotic Therapy for Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62'
    valueset "Hemorrhagic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212'
    valueset "Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247'
    valueset "Medical Reason For Not Providing Treatment": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473'
    valueset "Nonelective Inpatient Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424'
    valueset "Patient Refusal": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'
    valueset "Pharmacological Contraindications For Antithrombotic Therapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52'

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

    context Patient

    define "Non Elective Inpatient Encounter":
      ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter
            where NonElectiveEncounter.period ends during day of "Measurement Period"

    define "All Stroke Encounter":
      "Non Elective Inpatient Encounter" NonElectiveEncounter
      let ConditionCode: NonElectiveEncounter.principalDiagnosis().code
        where ( ConditionCode in "Hemorrhagic Stroke"
           or   ConditionCode in "Ischemic Stroke" )

    define "Encounter with Principal Diagnosis and Age":
      "All Stroke Encounter" AllStrokeEncounter
        where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18

    define "Initial Population":
      "Encounter with Principal Diagnosis and Age" Encounter
        where Encounter.isAttributable()
Content: application/elm+xml
    Encoded data (31496 characters)