Quality Measure Implementation Guide
5.0.0 - STU5 United States of America flag

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v5.0.0: STU5 (v5.0.0)) based on FHIR (HL7® FHIR® Standard) 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"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
            <tr>
                <th scope="row"><b>Title: </b></th>
                <td style="padding-left: 4px;">EXM Measure</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Id: </b></th>
                <td style="padding-left: 4px;">EXMLogic-FHIR</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>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Measure-EXMLogic-FHIR.html">EXM Measure</a></td>
            </tr>
        

        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>EXM</span>
                        </p>
                    
                </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>Experimental: </b></th>
                <td style="padding-left: 4px;">true</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Publisher: </b></th>
                <td style="padding-left: 4px;">HL7 International / Clinical Quality Information</td>
            </tr>
        

        
        <tr>
            <th scope="row"><b>Author: </b></th>
            <td style="padding-left: 4px;">Example Measure Content Developer</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>venue</td>
                                <td/>
                            </tr>
                        
                    </table>
                </td>
            </tr>
        

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

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

        
            <tr>
                <th scope="row"><b>Purpose: </b></th>
                <td style="padding-left: 4px;"><div><p>This measure has been developed to support improvement in clinical care.</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Copyright: </b></th>
                <td style="padding-left: 4px;"><div><p>Example Copyright Statement</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Disclaimer: </b></th>
                <td style="padding-left: 4px;"><div><p>Example disclaimer</p>
</div></td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Basis: </b></th>
                <td style="padding-left: 4px;">
                Encounter
                </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>Type: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            <p style="margin-bottom: 5px;">
                                <span>process </span>
                            </p>
                        
                    
                    
                </td>
            </tr>
        

        
        <tr>
            <th scope="row"><b>Risk Adjustment: </b></th>
            <td style="padding-left: 4px;">Risk adjustment for this measure is performed by...</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Rate Aggregation: </b></th>
            <td style="padding-left: 4px;">Rate aggregation for this measure is performed by...</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Rationale: </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>Clinical recommendation statement: </b></th>
            <td style="padding-left: 4px;"><div><p>The clinical recommendation statement for this measure is...</p>
</div></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>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> Supplemental Data Elements: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            
                                
                                    <p>SDE Ethnicity</p>
                                
                            
                        
                    
                        
                            
                                
                                    <p>SDE Race</p>
                                
                            
                        
                    
                        
                            
                                
                                    <p>SDE Payer</p>
                                
                            
                        
                    
                        
                            
                                
                                    <p>SDE Sex</p>
                                
                            
                        
                    
                </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>Terminology and Other Dependencies: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <li><code>http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</code></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-diagnosis-role.html">Diagnosis Role</a></li>
                        
                            <li><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</code></li>
                        
                            <li><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299</code></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>Resource Type</b></th>
                                <th><b>Resource Elements</b></th>
                                <th><b>Valueset Name</b></th>
                                <th><b>Valueset</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Patient(<code>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</code>)</td>
                                    <td>
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Patient(<code>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</code>)</td>
                                    <td>
                                        
                                            url
                                        
                                            extension
                                        
                                            value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Patient(<code>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</code>)</td>
                                    <td>
                                        
                                            url
                                        
                                            extension
                                        
                                            value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>)</td>
                                    <td>
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Coverage(<a href="http://hl7.org/fhir/R4/coverage.html">Coverage</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Payer
                                            
                                        
                                    </td>
                                    <td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</code></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://hl7.org/fhir/R4/codesystem-diagnosis-role.html">http://terminology.hl7.org/CodeSystem/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 colspan="3" style="padding-left: 4px;">
                                    

                                    

                                    
                                        <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"/></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql"/></pre>
                                        
                                    </td>
                                </tr>
                                
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><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>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><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>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Stratifier 3&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Stratifier 4&quot; :
  &quot;Inpatient Encounter&quot; Encounter
    where PrincipalDiagnosis(Encounter) is null</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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
                                    <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>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements-exmlogic"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-moduledefinitionlibrary"/>
      </meta>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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>
      <url
           value="http://hl7.org/fhir/us/cqfmeasures/Library/effective-data-requirements-exmlogic"/>
      <version value="1.0.0"/>
      <name value="EffectiveDataRequirements"/>
      <title value="Module Definition Library - EXM Logic"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <description
                   value="This library is used as an example module definition in the FHIR Quality Measure Implementation Guide"/>
      <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/StructureDefinition/cqf-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-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/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="url"/>
        <mustSupport value="extension"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern">
          <valueString value="Patient?_id={{context.patientId}}"/>
        </extension>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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/StructureDefinition/cqf-fhirQueryPattern">
          <valueString
                       value="Encounter?subject=Patient/{{context.patientId}}"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-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/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">
    <valueCanonical value="#effective-data-requirements-exmlogic"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringPrecision">
    <valuePositiveInt value="2"/>
  </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="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 measure"/>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="venue"/>
      <display value="Venue"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/intended-venue-codes"/>
        <code value="ec"/>
        <display value="EC"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
    </coding>
  </jurisdiction>
  <purpose
           value="This measure has been developed to support improvement in clinical care."/>
  <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="The purpose of this measure is to show how all the elements of a FHIR-based quality measure are represented."/>
  <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>
  <guidance
            value="Additional guidance provided to help communicate the intent of the measure"/>
  <group id="group-1">
    <code>
      <coding>
        <system value="http://example.org/group"/>
        <code value="group"/>
        <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"/>
            <code value="initial-population"/>
            <display value="Initial 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"/>
            <code value="initial-population"/>
            <display value="Initial 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"/>
            <code value="initial-population"/>
            <display value="Initial 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"/>
            <code value="initial-population"/>
            <display value="Initial 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>