Quality Measure Implementation Guide (STU4)
4.0.0 - STU4 United States of America flag

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v4.0.0: STU4 (v4.0.0)) based on FHIR R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

: EXM Measure - XML Representation

Active as of 2022-02-22

Raw xml | Download



<Measure xmlns="http://hl7.org/fhir">
  <id value="EXMLogic-FHIR"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"/>
  </meta>
  <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;">EXMLogic-FHIR</td>
            </tr>
            
            
            <tr>
                <th scope="row"><b>Download cql: </b></th>
                <td style="padding-left: 4px;"><a href="Library-EXMLogic-FHIR.cql">EXMLogic-FHIR.cql</a></td>
            </tr>
            

        
        
            <tr>
                <th scope="row"><b>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Measure-EXMLogic-FHIR.html">EXM Measure</a></td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Version: </b></th>
                <td style="padding-left: 4px;">2.0.0</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Identifier: </b></th>
                <td style="padding-left: 4px;">
                    
                    
                        <p style="margin-bottom: 5px;">
                            <b>value: </b> <span>EXM</span>
                        </p>
                    
                </td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Name: </b></th>
                <td style="padding-left: 4px;">MeasureEXM</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Title: </b></th>
                <td style="padding-left: 4px;">EXM Measure</td>
            </tr>
        
        
        
            <tr>
                <th scope="row"><b>Status: </b></th>
                <td style="padding-left: 4px;">active</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Experimental: </b></th>
                <td style="padding-left: 4px;">true</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Scoring: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            <p style="margin-bottom: 5px;">
                                <span>Proportion </span>
                            </p>
                        
                    
                    
                </td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Improvement Notation: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            <p style="margin-bottom: 5px;">
                             <span>Increased score indicates improvement </span>
                            </p>
                        
                    
                    
                </td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Type: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            <p style="margin-bottom: 5px;">
                            <span>process </span>
                            </p>
                        
                    
                    
                </td>
            </tr>
        
        
        
            <tr>
                <th scope="row"><b>Date: </b></th>
                <td style="padding-left: 4px;">2022-02-22</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Publisher: </b></th>
                <td style="padding-left: 4px;">Clinical Quality Information WG</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Description: </b></th>
                <td style="padding-left: 4px;"><div><p>An example FHIR-based measure</p>
</div></td>
            </tr>
        
        
        
        
            <tr>
                <th scope="row"><b>Use Context: </b></th>
                <td style="padding-left: 4px;">
                    <table class="grid-dict">
                        <tr><th><b>code</b></th><th><b>value</b></th></tr>
                        
                            <tr>
                                <td>program</td>
                                <td>eligible-provider</td>
                            </tr>
                        
                    </table>
                </td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Jurisdiction: </b></th>
                <td style="padding-left: 25px;">US</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Topic: </b></th>
                <td style="padding-left: 25px;">57024-2</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Purpose: </b></th>
                <td style="padding-left: 4px;"><div><p>The purpose of this measure is to show how all the elements of a FHIR-based quality measure are represented.</p>
</div></td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Guidance (Usage): </b></th>
                <td style="padding-left: 4px;">Users of this measure should be aware that this is intentionally simplified to show specific aspects of a measure.</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Copyright: </b></th>
                <td style="padding-left: 25px;"><div><p>Example Copyright Statement</p>
</div></td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Disclaimer: </b></th>
                <td style="padding-left: 25px;"><div><p>Example disclaimer</p>
</div></td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Approval Date: </b></th>
                <td style="padding-left: 4px;">2019-02-17</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Last Review Date: </b></th>
                <td style="padding-left: 4px;">2019-02-17</td>
            </tr>
        
        
            <tr>
                <th scope="row"><b>Effective Period: </b></th>
                <td style="padding-left: 4px;">2018-01-01..2018-12-31</td>
            </tr>
        
        
            
        
        
        
        
            <tr>
                <th scope="row"><b> Supplemental Data Elements: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            
                                
                                    SDE Ethnicity
                                
                            
                        
                    
                        
                            
                                
                                    SDE Race
                                
                            
                        
                    
                        
                            
                                
                                    SDE Payer
                                
                            
                        
                    
                        
                            
                                
                                    SDE Sex
                                
                            
                        
                    
                </td>
            </tr>
        
        
        
            <tr>
                <th scope="row"><b>Libraries: </b></th>
                <td style="padding-left: 4px;">
                    <table class="grid-dict">
                        
                            <tr><td><a href="Library-EXMLogic-FHIR.html">Example Logic Library</a></td></tr>
                        
                    </table>
                </td>
            </tr>
        
        
            
                <tr>
                    <th scope="row"><b>Related Artifact Dependencies: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <li><a href="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1">http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.2.0/CodeSystem-diagnosis-role.html">Diagnosis Role</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.299/expansion">Psychiatric/Mental Health Diagnosis</a></li>
                        
                    </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>use</b></th><th><b>min</b></th><th><b>max</b></th><th><b>type</b></th></tr>
                            
                                <tr>
                                    <td>Measurement Period</td>
                                    <td>in</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Period</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Sex</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratifier 3</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Encounter</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratifier 4</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Encounter</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Payer</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Initial Population</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Encounter</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Ethnicity</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Race</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratifier 1</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Encounter</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratifier 2</td>
                                    <td>out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Encounter</td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>
                <tr>
                    <th scope="row"><b>DataRequirements:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr><th><b>Type</b></th><th><b>Must Support</b></th><th><b>Valueset Name</b></th><th><b>Valueset</b></th></tr>
                            
                                <tr>
                                    <td>Patient</td>
                                    <td>
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td></td>
                                </tr>
                            
                                <tr>
                                    <td>Patient</td>
                                    <td>
                                        
                                            url
                                        
                                            extension
                                        
                                            value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td></td>
                                </tr>
                            
                                <tr>
                                    <td>Patient</td>
                                    <td>
                                        
                                            url
                                        
                                            extension
                                        
                                            value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter</td>
                                    <td>
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td></td>
                                </tr>
                            
                                <tr>
                                    <td>Coverage</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Payer
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>
                
                    <tr>
                        <th scope="row"><b>Direct Reference Codes:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr><th><b>display</b></th><th><b>code</b></th><th><b>system</b></th></tr>
                                
                                    <tr>
                                        <td>Billing</td>
                                        <td>billing</td>
                                        <td><a href="http://terminology.hl7.org/5.2.0/CodeSystem-diagnosis-role.html">Diagnosis Role</a></td>
                                    </tr>
                                
                            </table>
                        </td>
                    </tr>
                
                
                    <tr>
                        <th scope="row"><b>Logic Definitions:</b></th>
                        <td style="padding-left: 4px;">
                            
                                <table class="grid-dict">
                                    <tr>
                                        <th><b>Group</b></th><th><b>Scoring</b></th><th><b>Population Criteria</b></th><th><b>Expression</b></th>
                                    </tr>
                                    <tr>
                                        
                                            <td> group-1 </td>
                                            <td>
                                                
                                                
                                                    <b>Measure scoring:</b>
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                        <span>Proportion</span>
                                                        </p>
                                                    
                                                
                                            </td>
                                            
                                                <tr>
                                                    <td/>
                                                    <td/>
                                                    <td>Initial Population</td>
                                                    <td>
                                                        
                                                        <pre><code class="language-cql">define &quot;Initial Population&quot; :
  &quot;Inpatient Encounter&quot; Encounter</code></pre>
                                                        
                                                    </td>
                                                </tr>
                                            
                                                <tr>
                                                    <td/>
                                                    <td/>
                                                    <td>Numerator</td>
                                                    <td>
                                                        
                                                        <pre><code class="language-cql"></code></pre>
                                                        
                                                    </td>
                                                </tr>
                                            
                                                <tr>
                                                    <td/>
                                                    <td/>
                                                    <td>Denominator</td>
                                                    <td>
                                                        
                                                        <pre><code class="language-cql"></code></pre>
                                                        
                                                    </td>
                                                </tr>
                                            

                                    
                                    </tr>
                                </table>
                            
                            <table class="grid-dict">
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>SDE Sex</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
    when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
    else null
  end</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>Inpatient Encounter</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Inpatient Encounter&quot; :
  [&quot;Encounter&quot;] Encounter
    where LengthInDays(Encounter.period) &lt;= 120
      and Encounter.period ends during &quot;Measurement Period&quot;</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>Stratifier 3</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Stratifier 3&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic</td>
                                        
                                        
                                            <td>Stratifier 4</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Stratifier 4&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>SDE Payer</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
    [Coverage: type in &quot;Payer&quot;] Payer
      return {
        code: Payer.type,
        period: Payer.period
      }</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic</td>
                                        
                                        
                                            <td>Initial Population</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot; :
  &quot;Inpatient Encounter&quot; Encounter</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>SDE Ethnicity</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.value as Coding</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic</td>
                                        
                                        
                                            <td>SDE Race</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.value as Coding</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>Stratifier 1</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Stratifier 1&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where not (PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;)</code></pre></td>
                                        
                                    </tr>
                                
                                    <tr><th><b>Library Name</b></th><th><b>Name</b></th></tr>
                                    <tr>
                                        
                                            <td>EXMLogic-FHIR</td>
                                        
                                        
                                            <td>Stratifier 2</td>
                                        
                                    </tr>
                                    <tr>
                                        
                                            <td></td>
                                        <td><pre class="highlight language-cql"><code class="language-cql">define &quot;Stratifier 2&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;</code></pre></td>
                                        
                                    </tr>
                                
                            </table>
                        </td>
                    </tr>
                
            
        
    </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/diagnosis-role"/>
          <code value="billing"/>
          <display value="Billing"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
    when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Inpatient Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Inpatient Encounter&quot; :
  [&quot;Encounter&quot;] Encounter
    where LengthInDays(Encounter.period) &lt;= 120
      and Encounter.period ends during &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Stratifier 3"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratifier 3&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Stratifier 4"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratifier 4&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
    [Coverage: type in &quot;Payer&quot;] Payer
      return {
        code: Payer.type,
        period: Payer.period
      }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot; :
  &quot;Inpatient Encounter&quot; Encounter"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.value as Coding"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.value as Coding"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Stratifier 1"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratifier 1&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where not (PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="EXMLogic-FHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Stratifier 2"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratifier 2&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </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 FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system Diagnosis Role"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/diagnosis-role"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Psychiatric/Mental Health Patient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Stratifier 3"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Stratifier 4"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <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="Encounter"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Stratifier 1"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Stratifier 2"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-valueFilter">
          <extension url="path">
            <valueString value="url"/>
          </extension>
          <extension url="comparator">
            <valueCode value="eq"/>
          </extension>
          <extension url="value">
            <valueString
                         value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"/>
          </extension>
        </extension>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="url"/>
        <mustSupport value="extension"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="url"/>
        <mustSupport value="extension"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="url"/>
          <code>
            <system value="urn:ietf:rfc:3986"/>
            <code
                  value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern">
          <valueString
                       value="Encounter?subject=Patient/{{context.patientId}}"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-isSelective">
          <valueBoolean value="true"/>
        </extension>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="period"/>
        <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>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern">
          <valueString
                       value="Coverage?policy-holder=Patient/{{context.patientId}}&amp;type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </extension>
        <type value="Coverage"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment">
    <extension url="type">
      <valueCode value="documentation"/>
    </extension>
    <extension url="text">
      <valueMarkdown value="This illustrates an example comment"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
    <valueCode value="Encounter"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>
      <reference value="Device/software-system-example"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url value="http://hl7.org/fhir/us/cqfmeasures/Measure/EXMLogic-FHIR"/>
  <identifier>
    <system value="http://example.org/fhir/cqi/ecqm/Measure/Identifier/exm"/>
    <value value="EXM"/>
  </identifier>
  <version value="2.0.0"/>
  <name value="MeasureEXM"/>
  <title value="EXM Measure"/>
  <status value="active"/>
  <experimental value="true"/>
  <date value="2022-02-22"/>
  <publisher value="Clinical Quality Information WG"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/cqi"/>
    </telecom>
  </contact>
  <description value="An example FHIR-based measure"/>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="program"/>
    </code>
    <valueCodeableConcept>
      <text value="eligible-provider"/>
    </valueCodeableConcept>
  </useContext>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
    </coding>
  </jurisdiction>
  <purpose
           value="The purpose of this measure is to show how all the elements of a FHIR-based quality measure are represented."/>
  <usage
         value="Users of this measure should be aware that this is intentionally simplified to show specific aspects of a measure."/>
  <copyright value="Example Copyright Statement"/>
  <approvalDate value="2019-02-17"/>
  <lastReviewDate value="2019-02-17"/>
  <effectivePeriod>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectivePeriodAnchor">
      <valueDateTime value="2018-01-01"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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/us/cqfmeasures/Library/EXMLogic-FHIR"/>
  <disclaimer value="Example disclaimer"/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
      <display value="Proportion"/>
    </coding>
  </scoring>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
      <code value="process"/>
    </coding>
  </type>
  <riskAdjustment
                  value="Risk adjustment for this measure is performed by..."/>
  <rateAggregation
                   value="Rate aggregation for this measure is performed by..."/>
  <rationale value="Rationale for this measure is..."/>
  <clinicalRecommendationStatement
                                   value="The clinical recommendation statement for this measure is..."/>
  <improvementNotation>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
      <code value="increase"/>
      <display value="Increased score indicates improvement"/>
    </coding>
  </improvementNotation>
  <definition>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-definitionTerm">
      <extension url="term">
        <valueString value="Term"/>
      </extension>
      <extension url="definition">
        <valueMarkdown
                       value="A term used in the measure that bears clearly definition to communicate the measure intent"/>
      </extension>
    </extension>
  </definition>
  <guidance
            value="Additional guidance provided to help communicate the intent of the measure"/>
  <group id="group-1">
    <code>
      <coding>
        <display value="group-1"/>
      </coding>
    </code>
    <population id="initial-population-1">
      <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">
      <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">
      <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>
    <stratifier id="stratifier-1">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          </coding>
          <text value="initial-population"/>
        </valueCodeableConcept>
      </extension>
      <code>
        <text value="Stratifier 1"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Stratifier 1"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-2">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          </coding>
          <text value="initial-population"/>
        </valueCodeableConcept>
      </extension>
      <code>
        <text value="Stratifier 2"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Stratifier 2"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-3">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          </coding>
          <text value="initial-population"/>
        </valueCodeableConcept>
      </extension>
      <code>
        <text value="Stratifier 3"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Stratifier 3"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-4">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          </coding>
          <text value="initial-population"/>
        </valueCodeableConcept>
      </extension>
      <code>
        <text value="Stratifier 4"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Stratifier 4"/>
      </criteria>
    </stratifier>
  </group>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>