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 - XML Representation

Draft as of 2026-05-13

Raw xml | Download

    <Library xmlns="http://hl7.org/fhir">
      <id value="MPPEncounterLevel"/>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
        <table class="grid dict">

            <tr>
                <th scope="row"><b>Id: </b></th>
                <td style="padding-left: 4px;">MPPEncounterLevel</td>
            </tr>

            <tr>
                <th scope="row"><b>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Library-MPPEncounterLevel.html">MPPEncounterLevel</a></td>
            </tr>

            <tr>
                <th scope="row"><b>Name: </b></th>
                <td style="padding-left: 4px;">MPPEncounterLevel</td>
            </tr>

            <tr>
                <th scope="row"><b>Status: </b></th>
                <td style="padding-left: 4px;">draft</td>
            </tr>

            <tr>
                <th scope="row"><b>Experimental: </b></th>
                <td style="padding-left: 4px;">true</td>
            </tr>

            <tr>
                <th scope="row"><b>Type: </b></th>
                <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <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>
                            </p>

                            <p style="margin-bottom: 5px;">
                                <b>code: </b> <span>logic-library</span>
                            </p>

                </td>
            </tr>

            <tr>
                <th scope="row"><b>Date: </b></th>
                <td style="padding-left: 4px;">2026-05-13 23:09:13+0000</td>
            </tr>

            <tr>
                <th scope="row"><b>Related Artifacts: </b></th>
                <td style="padding-left: 4px;">

                    <p><b>Dependencies</b></p>
                    <ul>

                        <li><code>http://hl7.org/fhir/Library/QICore-ModelInfo</code></li>

                        <li><a href="Library-FHIRHelpers.html">FHIRHelpers</a> version: 4.3.000</li>

                        <li><a href="Library-CQMCommon.html">CQMCommon</a> version: 1.4.000</li>

                        <li><a href="Library-QICoreCommon.html">QICoreCommon</a> version: 1.5.000</li>

                        <li><a href="Library-SupplementalDataElements.html">SupplementalDataElements</a> version: 3.4.000</li>

                        <li><a href="Library-TJCOverall.html">TJCOverall</a> version: 8.9.000</li>

                        <li><a href="Library-AttributionModel.html">AttributionModel</a> version: 0.1.0</li>

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

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

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

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

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

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

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

                    </ul>

                </td>
            </tr>

            <tr>
              <th scope="row"><b>Parameters: </b></th>
              <td style="padding-left: 4px;">
                <table class="grid-dict">
                  <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>

                    <tr><th>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>In</th></tr>

                    <tr><th>Provider</th><th>string</th><th>0</th><th>1</th><th>In</th></tr>

                    <tr><th>Patient</th><th>Resource</th><th>0</th><th>1</th><th>Out</th></tr>

                    <tr><th>Non Elective Inpatient Encounter</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>

                    <tr><th>All Stroke Encounter</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>

                    <tr><th>Encounter with Principal Diagnosis and Age</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>

                    <tr><th>Initial Population</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>

                </table>
              </td>
            </tr>

            <tr>
              <th scope="row"><b>Data Requirements:</b></th>
              <td style="padding-left: 4px;">
                <table class="grid-dict">
                  <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>

                    <tr>
                      <th>Patient</th>
                      <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                      <th/>
                      <th>

                      </th>
                    </tr>

                    <tr>
                      <th>Encounter</th>
                      <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                      <th>;;;;;;;</th>
                      <th>

                          <b>code filter: </b>

                          <br/>

                          <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                          <br/>

                          <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424</span>
                          </span>

                      </th>
                    </tr>

                    <tr>
                      <th>Condition</th>
                      <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition</th>
                      <th>;;</th>
                      <th>

                      </th>
                    </tr>

                </table>
              </td>
            </tr>

            <tr>
              <td colspan="2">
                <table>
                  <tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
                  <tr><td><pre><code class="language-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 &quot;Antithrombotic Therapy for Ischemic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62'
    valueset &quot;Hemorrhagic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212'
    valueset &quot;Ischemic Stroke&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247'
    valueset &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'
    valueset &quot;Nonelective Inpatient Encounter&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424'
    valueset &quot;Patient Refusal&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'
    valueset &quot;Pharmacological Contraindications For Antithrombotic Therapy&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52'

    parameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;
      default Interval[@2024-01-01T00:00:00.000Z, @2025-01-01T00:00:00.000Z)

    context Patient

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

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

    define &quot;Encounter with Principal Diagnosis and Age&quot;:
      &quot;All Stroke Encounter&quot; AllStrokeEncounter
        where AgeInYearsAt(date from start of AllStrokeEncounter.period ) &gt;= 18

    define &quot;Initial Population&quot;:
      &quot;Encounter with Principal Diagnosis and Age&quot; Encounter
        where Encounter.isAttributable()

    </code></pre></td></tr>
                </table>
              </td>
            </tr>

            <tr>
              <td colspan="2">
                <table>
                  <tr><th><b>Content: </b> application/elm+xml</th></tr>
                  <tr><td><pre><code>Encoded data (31496 characters)</code></pre></td></tr>
                </table>
              </td>
            </tr>

        </table>
    </div>
      </text>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
        <valueReference>
          <reference value="Device/cqf-tooling"/>
        </valueReference>
      </extension>
      <url value="http://ecqi.healthit.gov/ecqms/Library/MPPEncounterLevel"/>
      <name value="MPPEncounterLevel"/>
      <status value="draft"/>
      <experimental value="true"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="logic-library"/>
        </coding>
      </type>
      <date value="2026-05-13T23:09:13+00:00"/>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="QICore model information"/>
        <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/CQMCommon|1.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/QICoreCommon|1.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/SupplementalDataElements|3.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library TJC"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/TJCOverall|8.9.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AM"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/AttributionModel|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Antithrombotic Therapy for Ischemic Stroke"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hemorrhagic Stroke"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Ischemic Stroke"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Medical Reason For Not Providing Treatment"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nonelective Inpatient Encounter"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Refusal"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Pharmacological Contraindications For Antithrombotic Therapy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="Provider"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Patient"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Non Elective Inpatient Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="All Stroke Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Encounter with Principal Diagnosis and Age"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
      </dataRequirement>
      <content>
        <contentType value="text/cql"/>
        <data
              value=" "/>
      </content>
      <content>
        <contentType value="application/elm+xml"/>
        <data
              value=" "/>
      </content>
    </Library>