Quality Measure STU2 for FHIR R4 Implementation Guide

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v1.1.0: STU 2 Ballot 1) based on FHIR R4. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions

SupplementalDataElements_FHIR2


<Library xmlns="http://hl7.org/fhir">
  <id value="supplementaldataelements-fhir2"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><table class="grid dict"><tr><th scope="row"><b>Id: </b></th><td style="padding-left: 25px; padding-right: 25px;">supplementaldataelements-fhir2</td></tr><tr><th scope="row"><b>Type: </b></th><td style="padding-right: 25px;"><span><br/><span><span style="padding-left: 25px;"><b>system: </b><span>http://terminology.hl7.org/CodeSystem/library-type</span><br/></span><span style="padding-left: 25px;"><b>code: </b><span>logic-library</span></span></span></span></td></tr><tr><th scope="row"><b>Version: </b></th><td style="padding-left: 25px; padding-right: 25px;">1.0.0</td></tr><tr><th scope="row"><b>Status: </b></th><td style="padding-left: 25px; padding-right: 25px;">active</td></tr>    <!-- <th:block th:each="cont, iter : ${resource.contributor}"> -->    <!-- <tr style="vertical-align: top;"> -->    <!-- <th th:if="${iter.index == 0}" th:rowspan="${iter.size}"  scope="row"><b>Contributor: </b></th> -->    <!-- <td style="padding-left: 25px; padding-right: 25px;"> -->    <!-- <b><span th:narrative="${cont.type.toCode()}"></span>: </b><span th:narrative="${cont.name}"></span> -->    <!-- </td> -->    <!-- </tr> -->    <!-- </th:block> -->    <!-- Filter down to human readable content --><tr style="vertical-align: top;"><th scope="row"><b>Content: </b></th><td style="padding-left: 25px; padding-right: 25px;"><b>type: </b><span>text/cql</span></td></tr><tr><td colspan="2" style="padding-left: 25px; padding-right: 25px;"><pre><code class="language-cql">library SupplementalDataElements_FHIR2 version '1.0.0'
/*
using FHIR version '1.0.2'

include FHIRHelpers version '1.0.2' called FHIRHelpers

valueset &quot;ONC Administrative Sex&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1'
valueset &quot;Race&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836'
valueset &quot;Ethnicity&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837'
valueset &quot;Payer&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591'

context Patient

define &quot;SDE Ethnicity&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://fhir.org/guides/argonaut/StructureDefinition/argo-ethnicity'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.valueCodeableConcept

define &quot;SDE Payer&quot;:
    [Coverage: type in &quot;Payer&quot;] Payer
      return {
        code: Payer.type,
        period: Payer.period
      }

define &quot;SDE Race&quot;:
  (flatten (
    Patient.extension Extension
      where Extension.url = 'http://fhir.org/guides/argonaut/StructureDefinition/argo-race'
        return Extension.extension
  )) E
    where E.url = 'ombCategory'
      or E.url = 'detailed'
    return E.valueCodeableConcept

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>
        
    </table>
</div>
  </text>
  <url
       value="http://hl7.org/fhir/us/cqfmeasures/Library/supplementaldataelements-fhir2"/>
  <version value="1.1.0"/>
  <name value="SupplementalDataElements_FHIR2"/>
  <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-12-24T00:29:38+00:00"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <content>
    <contentType value="application/elm+xml"/>
    <data
          value="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