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

## : MPPEncounterLevel - JSON Representation

Draft as of 2026-05-13

Raw json | Download

    {
      "resourceType" : "Library",
      "id" : "MPPEncounterLevel",
      "text" : {
        "status" : "extensions",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <table class=\"grid dict\">\n        \n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">MPPEncounterLevel</td>\n        </tr>\n        \n\n        \n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"Library-MPPEncounterLevel.html\">MPPEncounterLevel</a></td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Name: </b></th>\n            <td style=\"padding-left: 4px;\">MPPEncounterLevel</td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Status: </b></th>\n            <td style=\"padding-left: 4px;\">draft</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Experimental: </b></th>\n            <td style=\"padding-left: 4px;\">true</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>logic-library</span>\n                        </p>\n                        \n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2026-05-13 23:09:13+0000</td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Related Artifacts: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                \n                \n                <p><b>Dependencies</b></p>\n                <ul>\n                  \n                    <li><code>http://hl7.org/fhir/Library/QICore-ModelInfo</code></li>\n                  \n                    <li><a href=\"Library-FHIRHelpers.html\">FHIRHelpers</a> version: 4.3.000</li>\n                  \n                    <li><a href=\"Library-CQMCommon.html\">CQMCommon</a> version: 1.4.000</li>\n                  \n                    <li><a href=\"Library-QICoreCommon.html\">QICoreCommon</a> version: 1.5.000</li>\n                  \n                    <li><a href=\"Library-SupplementalDataElements.html\">SupplementalDataElements</a> version: 3.4.000</li>\n                  \n                    <li><a href=\"Library-TJCOverall.html\">TJCOverall</a> version: 8.9.000</li>\n                  \n                    <li><a href=\"Library-AttributionModel.html\">AttributionModel</a> version: 0.1.0</li>\n                  \n                    <li><a href=\"https://tx.fhir.org/r4/ValueSet/2.16.840.1.113762.1.4.1110.62-20210409\">Antithrombotic Therapy for Ischemic Stroke</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.212/expansion\">Hemorrhagic Stroke</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.247/expansion\">Ischemic Stroke</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.473/expansion\">Medical Reason</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion\">Non-Elective Inpatient Encounter</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.93/expansion\">Patient Refusal</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.52/expansion\">Pharmacological Contraindications For Antithrombotic Therapy</a></li>\n                  \n                </ul>\n                \n                \n                \n                \n                \n            </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Parameters: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>\n              \n                <tr><th>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>In</th></tr>\n              \n                <tr><th>Provider</th><th>string</th><th>0</th><th>1</th><th>In</th></tr>\n              \n                <tr><th>Patient</th><th>Resource</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Non Elective Inpatient Encounter</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>All Stroke Encounter</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Encounter with Principal Diagnosis and Age</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Initial Population</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Data Requirements:</b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>\n              \n                <tr>\n                  <th>Patient</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Encounter</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>\n                  <th>;;;;;;;</th>\n                  <th>\n                    \n                      <b>code filter: </b>\n                      \n                      <br/>\n                      \n                      \n                      <span style=\"padding-left: 4px;\">\n                          <b>path: </b><span>type</span>\n                      </span>\n                      \n                      <br/>\n                      \n                      \n                      \n                      <span style=\"padding-left: 4px;\">\n                          <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424</span>\n                      </span>\n                      \n                      \n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Condition</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition</th>\n                  <th>;;</th>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><a id=\"cql-content\"><b>Content: </b></a> text/cql</th></tr>\n              <tr><td><pre><code class=\"language-cql\">library MPPEncounterLevel\r\n\r\nusing QICore version '4.1.1'\r\n\r\ninclude FHIRHelpers version '4.3.000' called FHIRHelpers\r\ninclude CQMCommon version '1.4.000' called CQMCommon\r\ninclude QICoreCommon version '1.5.000' called QICoreCommon\r\ninclude SupplementalDataElements version '3.4.000' called SDE\r\ninclude TJCOverall version '8.9.000' called TJC\r\ninclude AttributionModel version '0.1.0' called AM\r\n\r\nvalueset &quot;Antithrombotic Therapy for Ischemic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62'\r\nvalueset &quot;Hemorrhagic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212'\r\nvalueset &quot;Ischemic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247'\r\nvalueset &quot;Medical Reason For Not Providing Treatment&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473'\r\nvalueset &quot;Nonelective Inpatient Encounter&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424'\r\nvalueset &quot;Patient Refusal&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'\r\nvalueset &quot;Pharmacological Contraindications For Antithrombotic Therapy&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52'\r\n\r\nparameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;\r\n  default Interval[@2024-01-01T00:00:00.000Z, @2025-01-01T00:00:00.000Z)\r\n\r\ncontext Patient\r\n\r\ndefine &quot;Non Elective Inpatient Encounter&quot;:\r\n  [&quot;Encounter&quot;: &quot;Nonelective Inpatient Encounter&quot;] NonElectiveEncounter\r\n        where NonElectiveEncounter.period ends during day of &quot;Measurement Period&quot;\r\n\r\ndefine &quot;All Stroke Encounter&quot;:\r\n  &quot;Non Elective Inpatient Encounter&quot; NonElectiveEncounter\r\n  let ConditionCode: NonElectiveEncounter.principalDiagnosis().code\r\n    where ( ConditionCode in &quot;Hemorrhagic Stroke&quot;\r\n       or   ConditionCode in &quot;Ischemic Stroke&quot; )  \r\n\r\ndefine &quot;Encounter with Principal Diagnosis and Age&quot;:\r\n  &quot;All Stroke Encounter&quot; AllStrokeEncounter\r\n    where AgeInYearsAt(date from start of AllStrokeEncounter.period ) &gt;= 18\r\n\r\ndefine &quot;Initial Population&quot;:\r\n  &quot;Encounter with Principal Diagnosis and Age&quot; Encounter\r\n    where Encounter.isAttributable()\r\n\r\n</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><b>Content: </b> application/elm+xml</th></tr>\n              <tr><td><pre><code>Encoded data (31496 characters)</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n    </table>\n</div>"
      },
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
          "valueReference" : {
            "reference" : "Device/cqf-tooling"
          }
        }
      ],
      "url" : "http://ecqi.healthit.gov/ecqms/Library/MPPEncounterLevel",
      "name" : "MPPEncounterLevel",
      "status" : "draft",
      "experimental" : true,
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "logic-library"
          }
        ]
      },
      "date" : "2026-05-13T23:09:13+00:00",
      "relatedArtifact" : [
        {
          "type" : "depends-on",
          "display" : "QICore model information",
          "resource" : "http://hl7.org/fhir/Library/QICore-ModelInfo"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRHelpers",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library CQMCommon",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/CQMCommon|1.4.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library QICoreCommon",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/QICoreCommon|1.5.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library SDE",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/SupplementalDataElements|3.4.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library TJC",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/TJCOverall|8.9.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library AM",
          "resource" : "http://ecqi.healthit.gov/ecqms/Library/AttributionModel|0.1.0"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Antithrombotic Therapy for Ischemic Stroke",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Hemorrhagic Stroke",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Ischemic Stroke",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Medical Reason For Not Providing Treatment",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Nonelective Inpatient Encounter",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Patient Refusal",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Pharmacological Contraindications For Antithrombotic Therapy",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52"
        }
      ],
      "parameter" : [
        {
          "name" : "Measurement Period",
          "use" : "in",
          "min" : 0,
          "max" : "1",
          "type" : "Period"
        },
        {
          "name" : "Provider",
          "use" : "in",
          "min" : 0,
          "max" : "1",
          "type" : "string"
        },
        {
          "name" : "Patient",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        },
        {
          "name" : "Non Elective Inpatient Encounter",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "All Stroke Encounter",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with Principal Diagnosis and Age",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Initial Population",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        }
      ],
      "dataRequirement" : [
        {
          "type" : "Patient",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "period",
            "rank",
            "rank.value",
            "condition",
            "condition.reference",
            "condition.reference.value"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
                    "valueExpression" : {
                      "language" : "text/cql-identifier",
                      "expression" : "Measurement Period"
                    }
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Condition",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
          ],
          "mustSupport" : [
            "id",
            "id.value"
          ]
        }
      ],
      "content" : [
        {
          "contentType" : "text/cql",
          "data" : " "
        },
        {
          "contentType" : "application/elm+xml",
          "data" : " "
        }
      ]
    }