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

: Module Definition Library - EXM Logic - TTL Representation

Active as of 2024-04-09

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:Library ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "effective-data-requirements-exmlogic"] ; # 
  fhir:meta [
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-moduledefinitionlibrary"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-moduledefinitionlibrary>     ] )
  ] ; # 
  fhir:text [
fhir:status [ fhir:v "extensions" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <table class=\"grid dict\">\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Title: </b></th>\n            <td style=\"padding-left: 4px;\">Module Definition Library - EXM Logic</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">effective-data-requirements-exmlogic</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">1.0.0</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"Library-effective-data-requirements-exmlogic.html\">Module Definition Library - EXM Logic</a></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-library-type.html\">LibraryType</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>module-definition</span>\n                        </p>\n                        \n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2024-04-09 13:20:21+0000</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Publisher: </b></th>\n            <td style=\"padding-left: 4px;\">HL7 International / Clinical Quality Information</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Description: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>This library is used as an example module definition in the FHIR Quality Measure Implementation Guide</p>\n</div></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Jurisdiction: </b></th>\n            <td style=\"padding-left: 4px;\">US</td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Related Artifacts: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                \n                \n                <p><b>Dependencies</b></p>\n                <ul>\n                  \n                    <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>\n                  \n                    <li><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-diagnosis-role.html\">Diagnosis Role</a></li>\n                  \n                    <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a></li>\n                  \n                    <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>\n                  \n                </ul>\n                \n                \n                \n                \n                \n            </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Parameters: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>\n              \n                <tr><th>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>in</th></tr>\n              \n                <tr><th>SDE Sex</th><th>Coding</th><th>0</th><th>1</th><th>out</th></tr>\n              \n                <tr><th>Stratifier 3</th><th>Encounter</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>Stratifier 4</th><th>Encounter</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>SDE Payer</th><th>Resource</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>Initial Population</th><th>Encounter</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>SDE Ethnicity</th><th>Coding</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>SDE Race</th><th>Coding</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>Stratifier 1</th><th>Encounter</th><th>0</th><th>*</th><th>out</th></tr>\n              \n                <tr><th>Stratifier 2</th><th>Encounter</th><th>0</th><th>*</th><th>out</th></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Data Requirements:</b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>\n              \n                <tr>\n                  <th>Patient</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Patient</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>\n                  <th>;;;</th>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Patient</th>\n                  <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>\n                  <th>;;;</th>\n                  <th>\n                    \n                      <b>code filter: </b>\n                      \n                      <br/>\n                      \n                      \n                      <span style=\"padding-left: 4px;\">\n                          <b>path: </b><span>url</span>\n                      </span>\n                      \n                      <br/>\n                      \n                      \n                      \n                      \n                          \n                          <p style=\"margin-bottom: 5px;\">\n                              <b>system: </b> <span>urn:ietf:rfc:3986</span>\n                          </p>\n                          \n                          \n                          <p style=\"margin-bottom: 5px;\">\n                              <b>code: </b> <span>http://hl7.org/fhir/us/core/StructureDefinition/us-core-race</span>\n                          </p>\n                          \n                          \n                      \n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Encounter</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Encounter</th>\n                  <th>;</th>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Coverage</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Coverage</th>\n                  <th>;;</th>\n                  <th>\n                    \n                      <b>code filter: </b>\n                      \n                      <br/>\n                      \n                      \n                      <span style=\"padding-left: 4px;\">\n                          <b>path: </b><span>type</span>\n                      </span>\n                      \n                      <br/>\n                      \n                      \n                      \n                      <span style=\"padding-left: 4px;\">\n                          <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</span>\n                      </span>\n                      \n                      \n                    \n                  </th>\n                </tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n    </table>\n</div>"
  ] ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode"^^xsd:anyURI ] ;
fhir:value [
a fhir:Coding ;
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/diagnosis-role"^^xsd:anyURI ] ;
fhir:code [ fhir:v "billing" ] ;
fhir:display [ fhir:v "Billing" ]     ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "SDE Sex" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"SDE Sex\":\n  case\n    when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }\n    when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }\n    else null\n  end" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "0"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Inpatient Encounter" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Inpatient Encounter\" :\n  [\"Encounter\"] Encounter\n    where LengthInDays(Encounter.period) <= 120\n      and Encounter.period ends during \"Measurement Period\"" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "1"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Stratifier 3" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Stratifier 3\" :\n  \"Inpatient Encounter\" Encounter\n    where PrincipalDiagnosis(Encounter) is null" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "2"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Stratifier 4" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Stratifier 4\" :\n  \"Inpatient Encounter\" Encounter\n    where PrincipalDiagnosis(Encounter) is null" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "3"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "SDE Payer" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"SDE Payer\":\n    [Coverage: type in \"Payer\"] Payer\n      return {\n        code: Payer.type,\n        period: Payer.period\n      }" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "4"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Initial Population" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Initial Population\" :\n  \"Inpatient Encounter\" Encounter" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "5"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "SDE Ethnicity" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"SDE Ethnicity\":\n  (flatten (\n    Patient.extension Extension\n      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'\n        return Extension.extension\n  )) E\n    where E.url = 'ombCategory'\n      or E.url = 'detailed'\n    return E.value as Coding" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "6"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "SDE Race" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"SDE Race\":\n  (flatten (\n    Patient.extension Extension\n      where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'\n        return Extension.extension\n  )) E\n    where E.url = 'ombCategory'\n      or E.url = 'detailed'\n    return E.value as Coding" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "7"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Stratifier 1" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Stratifier 1\" :\n  \"Inpatient Encounter\" Encounter\n    where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "8"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "EXMLogic-FHIR" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Stratifier 2" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Stratifier 2\" :\n  \"Inpatient Encounter\" Encounter\n    where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\"" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "9"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
fhir:value [ fhir:v "cqi" ]
  ] ) ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/Library/effective-data-requirements-exmlogic"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "EffectiveDataRequirements"] ; # 
  fhir:title [ fhir:v "Module Definition Library - EXM Logic"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:type [
    ( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/library-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "module-definition" ]     ] )
  ] ; # 
  fhir:date [ fhir:v "2024-04-09T13:20:21+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International / Clinical Quality Information"] ; # 
  fhir:contact ( [
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://www.hl7.org/Special/committees/cqi" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "This library is used as an example module definition in the FHIR Quality Measure Implementation Guide"] ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "US" ]     ] )
  ] ) ; # 
  fhir:relatedArtifact ( [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Library FHIRHelpers" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Code system Diagnosis Role" ] ;
fhir:resource [
fhir:v "http://terminology.hl7.org/CodeSystem/diagnosis-role"^^xsd:anyURI ;
fhir:link <http://terminology.hl7.org/CodeSystem/diagnosis-role>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Payer" ] ;
fhir:resource [
fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"^^xsd:anyURI ;
fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Psychiatric/Mental Health Patient" ] ;
fhir:resource [
fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299"^^xsd:anyURI ;
fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299>     ]
  ] ) ; # 
  fhir:parameter ( [
fhir:name [ fhir:v "Measurement Period" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "Period" ]
  ] [
fhir:name [ fhir:v "SDE Sex" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "Coding" ]
  ] [
fhir:name [ fhir:v "Stratifier 3" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Encounter" ]
  ] [
fhir:name [ fhir:v "Stratifier 4" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Encounter" ]
  ] [
fhir:name [ fhir:v "SDE Payer" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Resource" ]
  ] [
fhir:name [ fhir:v "Initial Population" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Encounter" ]
  ] [
fhir:name [ fhir:v "SDE Ethnicity" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Coding" ]
  ] [
fhir:name [ fhir:v "SDE Race" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Coding" ]
  ] [
fhir:name [ fhir:v "Stratifier 1" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Encounter" ]
  ] [
fhir:name [ fhir:v "Stratifier 2" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "Encounter" ]
  ] ) ; # 
  fhir:dataRequirement ( [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Patient?_id={{context.patientId}}" ]     ] ) ;
fhir:type [ fhir:v "Patient" ] ;
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient>     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Patient?_id={{context.patientId}}" ]     ] [
      ( fhir:extension [
fhir:url [ fhir:v "path"^^xsd:anyURI ] ;
fhir:value [ fhir:v "url" ]       ] [
fhir:url [ fhir:v "comparator"^^xsd:anyURI ] ;
fhir:value [ fhir:v "eq" ]       ] [
fhir:url [ fhir:v "value"^^xsd:anyURI ] ;
fhir:value [ fhir:v "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" ]       ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-valueFilter"^^xsd:anyURI ]     ] ) ;
fhir:type [ fhir:v "Patient" ] ;
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient>     ] ) ;
    ( fhir:mustSupport [ fhir:v "url" ] [ fhir:v "extension" ] [ fhir:v "value" ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Patient?_id={{context.patientId}}" ]     ] ) ;
fhir:type [ fhir:v "Patient" ] ;
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient>     ] ) ;
    ( fhir:mustSupport [ fhir:v "url" ] [ fhir:v "extension" ] [ fhir:v "value" ] ) ;
    ( fhir:codeFilter [
fhir:path [ fhir:v "url" ] ;
      ( fhir:code [
fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
fhir:code [ fhir:v "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" ]       ] )     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Encounter?subject=Patient/{{context.patientId}}" ]     ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-isSelective"^^xsd:anyURI ] ;
fhir:value [ fhir:v "true"^^xsd:boolean ]     ] ) ;
fhir:type [ fhir:v "Encounter" ] ;
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>     ] ) ;
    ( fhir:mustSupport [ fhir:v "period" ] ) ;
    ( fhir:dateFilter [
fhir:path [ fhir:v "period" ] ;
fhir:value [
a fhir:Period ;
        ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-expression"^^xsd:anyURI ] ;
fhir:value [
a fhir:Expression ;
fhir:language [ fhir:v "text/cql-identifier" ] ;
fhir:expression [ fhir:v "Measurement Period" ]           ]         ] )       ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Coverage?policy-holder=Patient/{{context.patientId}}&type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591" ]     ] ) ;
fhir:type [ fhir:v "Coverage" ] ;
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Coverage"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Coverage>     ] ) ;
    ( fhir:mustSupport [ fhir:v "type" ] [ fhir:v "period" ] ) ;
    ( fhir:codeFilter [
fhir:path [ fhir:v "type" ] ;
fhir:valueSet [
fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"^^xsd:anyURI ;
fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591>       ]     ] )
  ] ) . #