Quality Measure Implementation Guide
1.0.0 - STU 1

Quality Measure Implementation Guide - Downloaded Version null See the Directory of published versions

## : EXM Ratio Measure - XML Representation

Page standards status: Informative

Raw xml | Download

    <Measure xmlns="http://hl7.org/fhir">
      <id value="EXMRatio-FHIR"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-ratiomeasure"/>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"/>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-cqlmeasure"/>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"/>
      </meta>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
      <table class="narrative-table">
        <tbody>
    <tr>

    <th colspan="2" scope="row" class="row-header">Metadata</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Title</th>

    <td class="content-container">EXM Ratio Measure</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Version</th>

    <td class="content-container">2.0.0</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Identifier</th>

    <td class="content-container">EXMRatio-FHIR</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Identifier</th>

    <td class="content-container">urn:oid:2.16.840.1.113883.4.642.40.61.29.10</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Effective Period</th>

    <td class="content-container">2018-01-01 + 1 year(s)</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Approval Date</th>

    <td class="content-container">2019-02-17</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Last Review Date</th>

    <td class="content-container">2019-02-17</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Experimental</th>

    <td class="content-container">true</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Use Context</th>

    <td class="content-container"><span title="{http://terminology.hl7.org/CodeSystem/usage-context-type venue}">Clinical Venue</span> = <span title="Codes:{http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes ec}">EC</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Jurisdiction</th>

    <td class="content-container"><span title="Codes:{http://unstats.un.org/unsd/methods/m49/m49.htm 001}">Global (Whole world)</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Topic</th>

    <td class="content-container"><span title="Codes:{http://loinc.org 57024-2}">Health Quality Measure Document</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Steward (Publisher)</th>

    <td class="content-container">HL7 International / Clinical Quality Information</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Developer</th>

    <td class="content-container">Example Measure Content Developer</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Description</th>

    <td class="content-container"><div><p>An example FHIR-based publishable measure</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Purpose</th>

    <td class="content-container"><div><p>This measure has been developed to support improvement in clinical care.</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Copyright</th>

    <td class="content-container"><div><p>Example Copyright Statement</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Disclaimer</th>

    <td class="content-container"><div><p>Example disclaimer</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Basis</th>

    <td class="content-container">Encounter</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Scoring</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring ratio}">Ratio</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Scoring Unit</th>

    <td class="content-container"><span title="Codes:{http://unitsofmeasure.org /1000.d}">/1000.d</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Type</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-type process}">Process</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Rationale</th>

    <td class="content-container"><div><p>The rationale of this measure is...</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Improvement Notation</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation decrease}">Decreased score indicates improvement</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Guidance (Usage)</th>

    <td class="content-container">Users of this measure should be aware of...</td>
    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: primary)</th>

    </tr>

        <tr>

    <th scope="row" class="row-header">Initial Population</th>

          <td class="content-container">

            <em>ID</em>: primary-exmratio-initial-population
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-exmratio-initial-population">Initial Population</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Numerator</th>

          <td class="content-container">

            <em>ID</em>: primary-exmratio-numerator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-exmratio-numerator">Numerator</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator</th>

          <td class="content-container">

            <em>ID</em>: primary-exmratio-denominator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-exmratio-denominator">Denominator</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Measure Observation</th>

          <td class="content-container">

            <em>ID</em>: primary-exmratio-denominator-observation
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-exmratio-denominator-observation">Denominator Observation</a>

              <br/><em>Input Population</em>: denominator

              <em>AggregateMethod</em>: sum

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Measure Observation</th>

          <td class="content-container">

            <em>ID</em>: primary-exmratio-numerator-observation
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-exmratio-numerator-observation">Numerator Observation</a>

              <br/><em>Input Population</em>: numerator

              <em>AggregateMethod</em>: sum

          </td>
        </tr>

    <tr>

    <th colspan="2" scope="row" class="row-header">Measure Logic</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Primary Library</th>

    <td class="content-container"><a href="Library-EXMRatio.html">EXMRatio - Example Ratio Measure Library</a></td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Contents</th>
      <td class="content-container">
        <em><a href="#population-criteria">Population Criteria</a></em>
        <br/>
        <em><a href="#definitions">Logic Definitions</a></em>
        <br/>
        <em><a href="#terminology">Terminology</a></em>
        <br/>
        <em><a href="#dependencies">Dependencies</a></em>
        <br/>
        <em><a href="#data-requirements">Data Requirements</a></em>
        <br/>
      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="population-criteria"> </a>Population Criteria</th>

    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: primary)</th>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Initial Population

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-exmratio-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
      &quot;Qualifying Encounters&quot;</code></pre>

          <a href="#exmratio-initial-population"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Numerator

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-exmratio-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      &quot;Initial Population&quot;</code></pre>

          <a href="#exmratio-numerator"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-exmratio-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;</code></pre>

          <a href="#exmratio-denominator"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Measure Observation

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-exmratio-denominator-observation"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Denominator Observation&quot;(Encounter &quot;Encounter&quot;):
      duration in hours of Global.Hospitalization(Encounter) / 24</code></pre>

          <a href="#exmratio-denominator-observation"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Measure Observation

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-exmratio-numerator-observation"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Numerator Observation&quot;(Encounter &quot;Encounter&quot;):
      Count(
        &quot;Falls with Major Injury&quot; Falls
          where Global.&quot;Normalize Interval&quot;(Falls.effective) during Encounter.period
      )</code></pre>

          <a href="#exmratio-numerator-observation"><em>Definition</em></a>

      </td>

    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="definitions"> </a>Logic Definitions</th>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-hospitalization"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Hospitalization&quot;(TheEncounter FHIR.Encounter):
    	( &quot;ED Visit&quot;(TheEncounter) ) X
        return
            if X is null then TheEncounter.period
            else Interval[start of FHIRHelpers.ToInterval(X.period), end of FHIRHelpers.ToInterval(TheEncounter.period)]</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-ed-visit"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;ED Visit&quot;(TheEncounter FHIR.Encounter):
        singleton from (
            [Encounter: &quot;Emergency Department Visit&quot;] EDVisit
                where EDVisit.status = 'finished'
                    and EDVisit.period ends 1 hour or less on or before start of FHIRHelpers.ToInterval(TheEncounter.period)
        )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value EncounterStatus): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tointerval"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period.&quot;start&quot; is null then
                Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
            else
                Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-qualifying-encounters"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Encounters&quot;:
      [&quot;Encounter&quot;: &quot;Inpatient&quot;]</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
      &quot;Qualifying Encounters&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      &quot;Initial Population&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-falls-with-major-injury"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Falls with Major Injury&quot;:
      [&quot;Observation&quot;: &quot;Fall&quot;]</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-denominator-observation"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Denominator Observation&quot;(Encounter &quot;Encounter&quot;):
      duration in hours of Global.Hospitalization(Encounter) / 24</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> EXMRatio</td>

    </tr>
    <tr>

      <td>

          <a name="exmratio-numerator-observation"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Numerator Observation&quot;(Encounter &quot;Encounter&quot;):
      Count(
        &quot;Falls with Major Injury&quot; Falls
          where Global.&quot;Normalize Interval&quot;(Falls.effective) during Encounter.period
      )</code></pre>
      </td>

    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="terminology"> </a>Terminology</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Inpatient

        <br/>

        <em>Resource</em>: <code>http://example.org/fhir/ValueSet/inpatient</code>
        <br/>
        <em>Canonical URL</em>: <tt>http://example.org/fhir/ValueSet/inpatient</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Emergency Department Visit

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Fall

        <br/>

        <em>Resource</em>: <code>http://example.org/fhir/ValueSet/fall</code>
        <br/>
        <em>Canonical URL</em>: <tt>http://example.org/fhir/ValueSet/fall</tt>

      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="dependencies"> </a>Dependencies</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library Global

        <br/>

        <em>Resource</em>: <a href="Library-MATGlobalCommonFunctions.html">MAT Global Common Functions FHIR Libraryversion: null5.0.000)</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library FHIRHelpers

        <br/>

        <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</tt>

      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="data-requirements"> </a>Data Requirements</th>

    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, status, period
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <code>http://example.org/fhir/ValueSet/inpatient</code>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Observation
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
        <br/>

        <em>Must Support Elements</em>: code, effective
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <code>http://example.org/fhir/ValueSet/fall</code>
        <br/>

      </td>
    </tr>

    <tr>
      <th colspan="2" scope="row" class="row-header">Generated using version 0.4.9 of the sample-content-ig Liquid templates</th>
    </tr>

        </tbody>
      </table>
    </div>
      </text>
      <contained>
        <Library>
          <id value="effective-data-requirements"/>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Qualifying Encounters"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Qualifying Encounters&quot;:
      [&quot;Encounter&quot;: &quot;Inpatient&quot;]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="0"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Initial Population"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Initial Population&quot;:
      &quot;Qualifying Encounters&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="1"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Numerator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Numerator&quot;:
      &quot;Initial Population&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="2"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator&quot;:
      &quot;Initial Population&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="3"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Falls with Major Injury"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Falls with Major Injury&quot;:
      [&quot;Observation&quot;: &quot;Fall&quot;]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="4"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator Observation"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function &quot;Denominator Observation&quot;(Encounter &quot;Encounter&quot;):
      duration in hours of Global.Hospitalization(Encounter) / 24"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="5"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="MATGlobalCommonFunctions"/>
            </extension>
            <extension url="name">
              <valueString value="Hospitalization"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function &quot;Hospitalization&quot;(TheEncounter FHIR.Encounter):
    	( &quot;ED Visit&quot;(TheEncounter) ) X
        return
            if X is null then TheEncounter.period
            else Interval[start of FHIRHelpers.ToInterval(X.period), end of FHIRHelpers.ToInterval(TheEncounter.period)]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="6"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="MATGlobalCommonFunctions"/>
            </extension>
            <extension url="name">
              <valueString value="ED Visit"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function &quot;ED Visit&quot;(TheEncounter FHIR.Encounter):
        singleton from (
            [Encounter: &quot;Emergency Department Visit&quot;] EDVisit
                where EDVisit.status = 'finished'
                    and EDVisit.period ends 1 hour or less on or before start of FHIRHelpers.ToInterval(TheEncounter.period)
        )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="7"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToString"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function ToString(value EncounterStatus): value.value"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="8"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period.&quot;start&quot; is null then
                Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
            else
                Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="9"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="EXMRatio"/>
            </extension>
            <extension url="name">
              <valueString value="Numerator Observation"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function &quot;Numerator Observation&quot;(Encounter &quot;Encounter&quot;):
      Count(
        &quot;Falls with Major Injury&quot; Falls
          where Global.&quot;Normalize Interval&quot;(Falls.effective) during Encounter.period
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="10"/>
            </extension>
          </extension>
          <name value="EffectiveDataRequirements"/>
          <status value="active"/>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
              <code value="module-definition"/>
            </coding>
          </type>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library Global"/>
            <resource
                      value="http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library FHIRHelpers"/>
            <resource
                      value="http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Inpatient"/>
            <resource value="http://example.org/fhir/ValueSet/inpatient"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Emergency Department Visit"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Fall"/>
            <resource value="http://example.org/fhir/ValueSet/fall"/>
          </relatedArtifact>
          <parameter>
            <name value="Numerator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Encounter"/>
          </parameter>
          <parameter>
            <name value="Denominator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Encounter"/>
          </parameter>
          <parameter>
            <name value="Initial Population"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Encounter"/>
          </parameter>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="status"/>
            <mustSupport value="period"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <codeFilter>
              <path value="type"/>
              <valueSet value="http://example.org/fhir/ValueSet/inpatient"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Observation"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
            <mustSupport value="code"/>
            <mustSupport value="effective"/>
            <codeFilter>
              <path value="code"/>
              <valueSet value="http://example.org/fhir/ValueSet/fall"/>
            </codeFilter>
          </dataRequirement>
        </Library>
      </contained>
      <extension
                 url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-populationBasis">
        <valueCode value="Encounter"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-scoringUnit">
        <valueCodeableConcept>
          <coding>
            <system value="http://unitsofmeasure.org"/>
            <code value="/1000.d"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
        <valueReference>🔗
          <reference value="Device/software-system-example"/>
        </valueReference>
      </extension>
      <extension
                 url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" id="effective-data-requirements">
        <valueCanonical value="#effective-data-requirements"/>
      </extension>
      <url value="http://example.org/fhir/measures/measure-ratio-exm"/>
      <identifier>
        <system value="http://example.org/fhir/cqi/ecqm/Measure/Identifier/exm"/>
        <value value="EXMRatio-FHIR"/>
      </identifier>
      <identifier>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:oid:2.16.840.1.113883.4.642.40.61.29.10"/>
      </identifier>
      <version value="2.0.0"/>
      <name value="EXMRatioMeasure"/>
      <title value="EXM Ratio Measure"/>
      <status value="active"/>
      <experimental value="true"/>
      <date value="2025-08-13"/>
      <publisher value="HL7 International / Clinical Quality Information"/>
      <contact>
        <telecom>
          <system value="url"/>
          <value value="http://www.hl7.org/Special/committees/cqi"/>
        </telecom>
      </contact>
      <description value="An example FHIR-based publishable measure"/>
      <useContext>
        <code>
          <system
                  value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
          <code value="venue"/>
          <display value="Clinical Venue"/>
        </code>
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes"/>
            <code value="ec"/>
            <display value="EC"/>
          </coding>
        </valueCodeableConcept>
      </useContext>
      <jurisdiction>
        <coding>
          <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
          <code value="001"/>
        </coding>
      </jurisdiction>
      <purpose
               value="This measure has been developed to support improvement in clinical care."/>
      <usage value="Users of this measure should be aware of..."/>
      <copyright value="Example Copyright Statement"/>
      <approvalDate value="2019-02-17"/>
      <lastReviewDate value="2019-02-17"/>
      <effectivePeriod>
        <extension
                   url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-effectivePeriodAnchor">
          <valueDateTime value="2018-01-01"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-effectivePeriodDuration">
          <valueDuration>
            <value value="1"/>
            <system value="http://unitsofmeasure.org"/>
            <code value="a"/>
          </valueDuration>
        </extension>
        <start value="2018-01-01"/>
        <end value="2018-12-31"/>
      </effectivePeriod>
      <topic>
        <coding>
          <system value="http://loinc.org"/>
          <code value="57024-2"/>
        </coding>
        <text value="Health Quality Measure Document"/>
      </topic>
      <author>
        <name value="Example Measure Content Developer"/>
      </author>
      <library value="http://hl7.org/fhir/uv/cqm/Library/EXMRatio"/>
      <disclaimer value="Example disclaimer"/>
      <scoring>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="ratio"/>
          <display value="Ratio"/>
        </coding>
      </scoring>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
          <code value="process"/>
        </coding>
      </type>
      <rationale value="The rationale of this measure is..."/>
      <improvementNotation>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="decrease"/>
          <display value="Decreased score indicates improvement"/>
        </coding>
      </improvementNotation>
      <group id="group-1">
        <extension
                   url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId">
          <valueString value="primary"/>
        </extension>
        <population id="initial-population">
          <extension
                     url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId">
            <valueString value="primary-exmratio-initial-population"/>
          </extension>
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="initial-population"/>
              <display value="Initial Population"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Initial Population"/>
          </criteria>
        </population>
        <population id="numerator">
          <extension
                     url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId">
            <valueString value="primary-exmratio-numerator"/>
          </extension>
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="numerator"/>
              <display value="Numerator"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Numerator"/>
          </criteria>
        </population>
        <population id="denominator">
          <extension
                     url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId">
            <valueString value="primary-exmratio-denominator"/>
          </extension>
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator"/>
              <display value="Denominator"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator"/>
          </criteria>
        </population>
        <population id="denominator-observation">
          <extension
                     url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId">
            <valueString value="primary-exmratio-denominator-observation"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference">
            <valueString value="denominator"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod">
            <valueCode value="sum"/>
          </extension>
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="measure-observation"/>
              <display value="Measure Observation"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Observation"/>
          </criteria>
        </population>
        <population id="numerator-observation">
          <extension
                     url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId">
            <valueString value="primary-exmratio-numerator-observation"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference">
            <valueString value="numerator"/>
          </extension>
          <extension
                     url="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod">
            <valueCode value="sum"/>
          </extension>
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="measure-observation"/>
              <display value="Measure Observation"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Numerator Observation"/>
          </criteria>
        </population>
      </group>
    </Measure>