Quality Measure Implementation Guide (STU5)
5.0.0-ballot2 - ballot United States of America flag

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v5.0.0-ballot2: STU5 (v5.0.0) Ballot 2) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 4.0.0. For a full list of available versions, see the Directory of published versions

: Multi Rate Example Logic Library - XML Representation

Active as of 2019-09-03

Raw xml | Download



<Library xmlns="http://hl7.org/fhir">
  <id value="MultiRateExample-FHIR"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table class="grid dict">
        
        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">Multi Rate Example Logic Library</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">MultiRateExample-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="Library-MultiRateExample-FHIR.html">Multi Rate Example Logic Library</a></td>
        </tr>
        

        
        <tr>
            <th scope="row">
                <b>
                    
                        official
                    
                </b>
            </th>
            <td style="padding-left: 4px;">
                
                <p style="margin-bottom: 5px;">
                    <span>MultiRateExample</span>
                </p>
                
            </td>
        </tr>
        

        

        

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

        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="http://terminology.hl7.org/5.5.0/CodeSystem-library-type.html">LibraryType</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>logic-library</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2019-09-03</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>Description: </b></th>
            <td style="padding-left: 4px;"><div><p>This library is used as an example in the FHIR Quality Measure Implementation Guide</p>
</div></td>
        </tr>
        

        

        

        

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

        

        

        

        

        
        <tr>
            <th scope="row"><b>Approval Date: </b></th>
            <td style="padding-left: 4px;">2019-08-03</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Last Review Date: </b></th>
            <td style="padding-left: 4px;">2019-08-03</td>
        </tr>
        

        

        

        

        

        
        
        <tr>
          <td colspan="2">
            <table>
              <tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
              <tr><td><pre><code class="language-cql">library MultiRateExample

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

valueset &quot;Bed Device Types&quot;: 'http://example.org/fhir/ValueSet/TBD'
valueset &quot;Screening Procedure Types&quot;: 'http://example.org/fhir/ValueSet/TBD'

context Location

// Number of patients
define &quot;Patients&quot;:
  [Patient]

// Number of practitioners
define &quot;Practitioners&quot;:
  [PractitionerRole]

// Number of beds
define &quot;Beds&quot;:
  [Device: &quot;Bed Device Types&quot;]

// Number of screening procedures
define &quot;Screening Procedures&quot;:
  [Procedure: &quot;Screening Procedure Types&quot;]

// Percentage of patients who received screening
define &quot;Initial Population&quot;:
  &quot;Patients&quot;

define &quot;Denominator&quot;:
  &quot;Patients&quot; P
    where P.gender = 'female'

define &quot;Numerator&quot;:
  &quot;Patients&quot; P
    with &quot;Screening Procedures&quot; SP
      such that P.id = Last(Split(SP.subject.reference, '/'))

define function ToNumber(patient Patient):
  if patient is not null then 1 else 0

define function ToNumber(practitionerRole PractitionerRole):
  if practitionerRole is not null then 1 else 0

define function ToNumber(device Device):
  if device is not null then 1 else 0</code></pre></td></tr>
            </table>
          </td>
        </tr>
        
        
        
    </table>
</div>
  </text>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cqi"/>
  </extension>
  <url
       value="http://hl7.org/fhir/us/cqfmeasures/Library/MultiRateExample-FHIR"/>
  <identifier>
    <use value="official"/>
    <system value="http://example.org/fhir/cqi/ecqm/Library/Identifier"/>
    <value value="MultiRateExample"/>
  </identifier>
  <version value="2.0.0"/>
  <name value="MultiRateExample"/>
  <title value="Multi Rate Example Logic Library"/>
  <status value="active"/>
  <experimental value="true"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
      <code value="logic-library"/>
    </coding>
  </type>
  <date value="2019-09-03"/>
  <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="This library is used as an example in the FHIR Quality Measure Implementation Guide"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
    </coding>
  </jurisdiction>
  <approvalDate value="2019-08-03"/>
  <lastReviewDate value="2019-08-03"/>
  <content>
    <contentType value="text/cql"/>
    <data
          value="bGlicmFyeSBNdWx0aVJhdGVFeGFtcGxlCgp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwoKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMScKCnZhbHVlc2V0ICJCZWQgRGV2aWNlIFR5cGVzIjogJ2h0dHA6Ly9leGFtcGxlLm9yZy9maGlyL1ZhbHVlU2V0L1RCRCcKdmFsdWVzZXQgIlNjcmVlbmluZyBQcm9jZWR1cmUgVHlwZXMiOiAnaHR0cDovL2V4YW1wbGUub3JnL2ZoaXIvVmFsdWVTZXQvVEJEJwoKY29udGV4dCBMb2NhdGlvbgoKLy8gTnVtYmVyIG9mIHBhdGllbnRzCmRlZmluZSAiUGF0aWVudHM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