This page is part of the Using CQL with FHIR Implementation Guide (v1.0.0: STU1) 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
Active as of 2019-09-03 |
<Library xmlns="http://hl7.org/fhir">
<id value="module-example"/>
<meta>
<profile
value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><h2>Related Artifacts</h2><table class="grid"><tr><td>depends-on</td><td>QICore model information</td><td><code>http://example.org/fhir/us/qicore/Library/QICore-ModelInfo|4.1.1</code></td></tr><tr><td>depends-on</td><td>Library FHIRHelpers</td><td><code>http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</code></td></tr><tr><td>depends-on</td><td>Code system Diagnosis Role</td><td><a href="http://terminology.hl7.org/5.5.0/CodeSystem-diagnosis-role.html">Diagnosis Role</a></td></tr><tr><td>depends-on</td><td>Value set Emergency Department Visit</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</code></td></tr><tr><td>depends-on</td><td>Value set Psychiatric/Mental Health Patient</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299</code></td></tr><tr><td>depends-on</td><td>Value set Hospital Settings</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126</code></td></tr><tr><td>depends-on</td><td>Value set ONC Administrative Sex</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1</code></td></tr><tr><td>depends-on</td><td>Value set Race</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836</code></td></tr><tr><td>depends-on</td><td>Value set Ethnicity</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837</code></td></tr><tr><td>depends-on</td><td>Value set Payer</td><td><code>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</code></td></tr></table><h2>Parameters</h2><table class="grid"><tr><td>Measurement Period</td><td>in</td><td>0</td><td>1</td><td>Period</td></tr><tr><td>Patient</td><td>out</td><td>0</td><td>1</td><td>Patient</td></tr><tr><td>Inpatient Encounter</td><td>out</td><td>0</td><td>*</td><td>Encounter</td></tr><tr><td>Initial Population</td><td>out</td><td>0</td><td>*</td><td>Encounter</td></tr><tr><td>Measure Population</td><td>out</td><td>0</td><td>*</td><td>Encounter</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><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 Ethnicity</td><td>out</td><td>0</td><td>*</td><td>Coding</td></tr><tr><td>SDE Payer</td><td>out</td><td>0</td><td>*</td><td>Resource</td></tr><tr><td>SDE Race</td><td>out</td><td>0</td><td>*</td><td>Coding</td></tr><tr><td>SDE Sex</td><td>out</td><td>0</td><td>1</td><td>Coding</td></tr></table><h2>Data Requirements</h2><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/patient.html">Patient</a> (http://example.org/fhir/us/qicore/StructureDefinition/qicore-patient)</td></tr></table><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a> (http://example.org/fhir/us/qicore/StructureDefinition/qicore-encounter)</td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>type</td><td>In ValueSet <a href="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</a></td></tr></table><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/condition.html">Condition</a> (<a href="http://hl7.org/fhir/R4/condition.html">Condition</a>)</td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>id</td><td>One of these codes: </td></tr></table><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/coverage.html">Coverage</a> (http://example.org/fhir/us/qicore/StructureDefinition/qicore-coverage)</td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>type</td><td>In ValueSet <a href="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</a></td></tr></table><h2>Contents</h2></div>
</text>
<url value="http://hl7.org/fhir/uv/cql/Library/module-example"/>
<identifier>
<use value="official"/>
<system value="http://example.org/fhir/cqi/ecqm/Library/Identifier"/>
<value value="EXMLogic"/>
</identifier>
<identifier>
<system value="urn:ietf:rfc:3986"/>
<value value="urn:oid:2.16.840.1.113883.4.642.40.37.28.8"/>
</identifier>
<version value="1.0.0"/>
<name value="EXMLogicModuleDefinition"/>
<title value="Example Logic Library - Module Definition"/>
<status value="active"/>
<experimental value="true"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="module-definition"/>
</coding>
</type>
<date value="2019-09-03"/>
<publisher value="HL7 International / Clinical Decision Support"/>
<contact>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/dss"/>
</telecom>
</contact>
<description
value="This library is used as an example module definition in the Using FHIR with CQL Implementation Guide"/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
<display value="World"/>
</coding>
</jurisdiction>
<relatedArtifact>
<type value="depends-on"/>
<display value="QICore model information"/>
<resource
value="http://example.org/fhir/us/qicore/Library/QICore-ModelInfo|4.1.1"/>
</relatedArtifact>
<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 Emergency Department Visit"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
</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>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Hospital Settings"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set ONC Administrative Sex"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Race"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Ethnicity"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837"/>
</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>
<parameter>
<name value="Measurement Period"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<type value="Period"/>
</parameter>
<parameter>
<name value="Patient"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Patient"/>
</parameter>
<parameter>
<name value="Inpatient Encounter"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</parameter>
<parameter>
<name value="Initial Population"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</parameter>
<parameter>
<name value="Measure Population"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</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>
<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 Ethnicity"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="SDE Payer"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="SDE Race"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="SDE Sex"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<dataRequirement>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern">
<valueString value="Patient?_id={{context.patientId}}"/>
</extension>
<type value="Patient"/>
<profile
value="http://example.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
<mustSupport
value="extension('http://example.org/fhir/us/core/StructureDefinition/us-core-ethnicity')">
<extension
url="http://hl7.org/fhir/StructureDefinition/rendered-value">
<valueString value="ethnicity"/>
</extension>
</mustSupport>
</dataRequirement>
<dataRequirement>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern">
<valueString
value="Encounter?status=finished&subject=Patient/{{context.patientId}}&type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-isSelective">
<valueBoolean value="true"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-valueFilter">
<extension url="path">
<valueString value="status"/>
</extension>
<extension url="comparator">
<valueCode value="eq"/>
</extension>
<extension url="value">
<valueString value="finished"/>
</extension>
</extension>
<type value="Encounter"/>
<profile
value="http://example.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Condition"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
<codeFilter>
<path value="id"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern">
<valueString
value="Coverage?policy-holder=Patient/{{context.patientId}}&type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
</extension>
<type value="Coverage"/>
<profile
value="http://example.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
</codeFilter>
</dataRequirement>
</Library>