CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG
1.0.0 - Release 1
CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Page standards status: Trial-use | Maturity Level: 1 |
<Measure xmlns="http://hl7.org/fhir">
<id value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
<meta>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cohort-measure-cqfm"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
</meta>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table class="narrative-table">
<tbody>
<tr>
<th colspan="2" scope="row" class="row-header">Knowledge Artifact Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Name (machine-readable)</th>
<td class="content-container">NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<th scope="row" class="row-header">Title (human-readable)</th>
<td class="content-container">NHSN dQM Acute Care Hospital Monthly Initial Population</td>
</tr>
<tr>
<th scope="row" class="row-header">Status</th>
<td class="content-container">Draft</td>
</tr>
<tr>
<th scope="row" class="row-header">Experimental</th>
<td class="content-container">false</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container"><div><p>The Acute Care Hospital Monthly Initial Population includes all encounters for patients of any age in an ED, observation, or inpatient location or all encounters for patients of any age with an ED, observation, inpatient, or short stay status during the measurement period.</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Steward</th>
<td class="content-container">CDC National Healthcare Safety Network (NHSN)</td>
</tr>
<tr>
<th scope="row" class="row-header">Steward Contact Details</th>
<td class="content-container">CDC National Healthcare Safety Network (NHSN): <a href="http://www.cdc.gov/nhsn">http://www.cdc.gov/nhsn</a>,<a href="mailto:nhsn@cdc.gov">nhsn@cdc.gov</a></td>
</tr>
<tr>
<th scope="row" class="row-header">Copyright</th>
<td class="content-container"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Documentation</th>
<td class="content-container">
<em>Description</em>: https://www.cdc.gov/nhsn/index.html [placeholder for link to protocol on CDC website]
<br/>
<em>Content URL</em>: <a href="https://www.cdc.gov/nhsn/index.html">https://www.cdc.gov/nhsn/index.html</a>
<br/>
<em>Document</em>: null @ https://www.cdc.gov/nhsn/index.html
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Version Number</th>
<td class="content-container">1.0.0</td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Scoring</th>
<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring cohort}">Cohort</span></td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Type</th>
<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-type outcome}">Outcome</span></td>
</tr>
<tr>
<th scope="row" class="row-header">Rationale</th>
<td class="content-container"><div><p>The NHSN Acute Care Hospital Monthly dQM allows for facilities to report line level patient data electronically to NHSN for the following modules that are reported monthly: Glycemic Control, Hypoglycemia; Healthcare facility-onset, antibiotic-Treated Clostridioides difficile (C. difficile) Infection (HT-CDI); Hospital-Onset Bacteremia & Fungemia (HOB); Venous Thromboembolism (VTE); Late Onset Sepsis / Meningitis. *Please see <a href="https://www.cdc.gov/nhsn/acute-care-hospital/index.html">Acute Care / Critical Access Hospitals (ACH) | NHSN | CDC</a> for the individual measure protocols.</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Population Basis</th>
<td class="content-container">Encounter</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Population Criteria</th>
</tr>
<tr>
<th scope="row" class="row-header">Initial Population</th>
<td class="content-container">
<em>ID</em>: initial-population
<br/>
<em>Description</em>:
<p style="white-space: pre-line" class="tab-one">All encounters for patients of any age in an ED, observation, or inpatient location or all encounters for patients of any age with an ED, observation, inpatient, or short stay status during the measurement period.</p>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-initial-population">Initial Population</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Supplemental Data Elements</th>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-condition
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Condition
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-condition">SDE Condition</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-device
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Device
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-device">SDE Device</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-diagnosticreport-lab
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE DiagnosticReport Lab
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-lab">SDE DiagnosticReport Lab</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-diagnosticreport-note
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE DiagnosticReport Note
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-note">SDE DiagnosticReport Note</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-diagnosticreport-others
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE DiagnosticReport Others
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-others">SDE DiagnosticReport Others</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-encounter
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Encounter
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-encounter">SDE Encounter</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-location
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Location
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-location">SDE Location</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-medication-administration
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Medication Administration
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication-administration">SDE Medication Administration</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-medication-request
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Medication Request
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication-request">SDE Medication Request</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-medication
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Medication
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication">SDE Medication</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-observation-lab-category
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Observation Lab Category
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-lab-category">SDE Observation Lab Category</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-observation-vital-signs-category
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Observation Vital Signs Category
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-vital-signs-category">SDE Observation Vital Signs Category</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-observation-category
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Observation Category
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-category">SDE Observation Category</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-coverage
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Coverage
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-coverage">SDE Coverage</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-procedure
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Procedure
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-procedure">SDE Procedure</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-specimen
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Specimen
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-specimen">SDE Specimen</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-service-request
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Service Request
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-service-request">SDE Service Request</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-minimal-patient
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE Minimal Patient
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-minimal-patient">SDE Minimal Patient</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-ip-encounters
<br/>
<em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
<br/>
<em>Description</em>: SDE IP Encounters
<br/>
<em>Logic Definition</em>: <a href="#nhsnacutecarehospitalmonthlyinitialpopulation-sde-ip-encounters">SDE IP Encounters</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Logic</th>
</tr>
<tr>
<th scope="row" class="row-header">Primary Library</th>
<td class="content-container"><a href="Library-NHSNAcuteCareHospitalMonthlyInitialPopulation.html">NHSNAcuteCareHospitalMonthlyInitialPopulation</a></td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: FHIR model information
<br/>
<em>Resource</em>: <a href="http://fhir.org/guides/cqf/common/4.0.1/4.0.1/Library-FHIR-ModelInfo.html">http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1</a>
<br/>
<em>Canonical URL</em>: <tt>http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library FHIRHelpers
<br/>
<em>Resource</em>: <code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2</code>
<br/>
<em>Canonical URL</em>: <tt>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library NHSNHelpers
<br/>
<em>Resource</em>: <code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNHelpers|0.0.002</code>
<br/>
<em>Canonical URL</em>: <tt>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNHelpers|0.0.002</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library SharedResource
<br/>
<em>Resource</em>: <code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/SharedResourceCreation|0.1.010</code>
<br/>
<em>Canonical URL</em>: <tt>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/SharedResourceCreation|0.1.010</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system ActCode
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-v3-ActCode.html">ActCodeversion: null9.0.0)</a>
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode|9.0.0</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system MedicationRequest Category
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-medicationrequest-category.html">MedicationRequest Category Codesversion: null1.0.0)</a>
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category|1.0.0</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system SNOMEDCT
<br/>
<em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a>
<br/>
<em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system Observation Category
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-observation-category.html">Observation Category Codesversion: null1.0.1)</a>
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category|1.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system LOINC
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-v3-loinc.html">Logical Observation Identifiers, Names and Codes (LOINC)</a>
<br/>
<em>Canonical URL</em>: <tt>http://loinc.org</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system V2-0074
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/5.0.0/CodeSystem-v2-0074.html">diagnosticServiceSectionIdversion: null2.5.0)</a>
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/v2-0074|2.5.0</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system Condition Category
<br/>
<em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-condition-category.html">Condition Category Codesversion: null1.0.1)</a>
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-category|1.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Encounter Inpatient
<br/>
<em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a>
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Emergency Department Visit
<br/>
<em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visitversion: null20210611)</a>
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292|20210611</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Observation Services
<br/>
<em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Servicesversion: null20210611)</a>
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143|20210611</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set NHSN Inpatient Encounter Class Codes
<br/>
<em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.274/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.274</a>
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.274</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Inpatient, Emergency, and Observation Locations
<br/>
<em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.265/expansion">Inpatient, Emergency, and Observation Locations</a>
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.265</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: emergency
<br/>
<em>Code</em>: EMER
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: observation encounter
<br/>
<em>Code</em>: OBSENC
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Inpatient
<br/>
<em>Code</em>: inpatient
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Outpatient
<br/>
<em>Code</em>: outpatient
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Surgical procedure
<br/>
<em>Code</em>: 3877713003
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Diagnostic procedure
<br/>
<em>Code</em>: 103693007
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Laboratory
<br/>
<em>Code</em>: laboratory
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Imaging
<br/>
<em>Code</em>: imaging
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Procedure
<br/>
<em>Code</em>: procedure
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Vital Signs
<br/>
<em>Code</em>: vital-signs
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Radiology
<br/>
<em>Code</em>: LP29684-5
<br/>
<em>System</em>: <tt>http://loinc.org</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Pathology
<br/>
<em>Code</em>: LP7839-6
<br/>
<em>System</em>: <tt>http://loinc.org</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Cardiology
<br/>
<em>Code</em>: LP29708-2
<br/>
<em>System</em>: <tt>http://loinc.org</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Laboratory
<br/>
<em>Code</em>: LAB
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v2-0074</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Encounter Diagnosis
<br/>
<em>Code</em>: encounter-diagnosis
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Laboratory procedure
<br/>
<em>Code</em>: 108252007
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Imaging
<br/>
<em>Code</em>: 363679005
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: Measurement Period
<br/>
<em>Use</em>: In
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: 1
<br/>
<em>Type</em>: Period
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Encounter
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Encounter
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Medication Request
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: MedicationRequest
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Coverage
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Coverage
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Procedure
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Procedure
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE IP Encounters
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Encounter
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Device
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Device
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Observation Lab Category
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Observation
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Observation Vital Signs Category
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Observation
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE DiagnosticReport Others
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: DiagnosticReport
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Medication Administration
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: MedicationAdministration
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Observation Category
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Observation
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Condition
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Condition
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: Initial Population
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Encounter
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE DiagnosticReport Lab
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: DiagnosticReport
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Location
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Location
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Service Request
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: ServiceRequest
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE DiagnosticReport Note
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: DiagnosticReport
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Minimal Patient
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: 1
<br/>
<em>Type</em>: Patient
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Medication
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Medication
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: SDE Specimen
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: *
<br/>
<em>Type</em>: Specimen
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="section-header"><a name="effective-data-requirements"> </a>Measure Logic Data Requirements</th>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: type, status, period, id, extension, identifier, statusHistory, class, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: type, status, period, id, extension, identifier, statusHistory, class, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visitversion: null20210611)</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: type, status, period, id, extension, identifier, statusHistory, class, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Servicesversion: null20210611)</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: class, status, period, id, extension, identifier, statusHistory, classHistory, type, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: class</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.274/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.274</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: class, status, period, id, extension, identifier, statusHistory, classHistory, type, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: class</span>
<br/>
<span class="tab-one"><em>Code</em>: </span>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: class, status, period, id, extension, identifier, statusHistory, classHistory, type, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: class</span>
<br/>
<span class="tab-one"><em>Code</em>: </span>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
<br/>
<em>Must Support Elements</em>: status, period, id, extension, identifier, statusHistory, class, classHistory, type, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, location, partOf
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Location
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/location.html">Location</a>
<br/>
<em>Must Support Elements</em>: id, extension, status, operationalStatus, name, alias, description, mode, type, telecom, address, physicalType, position, managingOrganization, partOf, hoursOfOperation, availabilityExceptions, endpoint
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: authoredOn, id, extension, status, statusReason, intent, category, priority, doNotPerform, reported, medication, subject, encounter, requester, recorder, reasonCode, reasonReference, instantiatesCanonical, instantiatesUri, courseOfTherapyType, dosageInstruction
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Coverage
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/coverage.html">Coverage</a>
<br/>
<em>Must Support Elements</em>: period, id, extension, status, type, policyHolder, subscriber, subscriberId, beneficiary, dependent, relationship, payor, class, order, network, subrogation, contract
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Procedure
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
<br/>
<em>Must Support Elements</em>: performed, id, extension, basedOn, partOf, status, category, code, subject, encounter, location, reasonCode, reasonReference, bodySite
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Device
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/device.html">Device</a>
<br/>
<em>Must Support Elements</em>: id, extension, status, expirationDate, lotNumber, serialNumber, modelNumber, partNumber, type, patient, parent
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: id, extension, partOf, status, category, code, subject, encounter, effective, issued, value, dataAbsentReason, interpretation, bodySite, method, specimen, referenceRange, hasMember, derivedFrom, component, focus, performer, note, device
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: DiagnosticReport
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/diagnosticreport.html">DiagnosticReport</a>
<br/>
<em>Must Support Elements</em>: category, effective, id, extension, basedOn, status, code, subject, encounter, issued, performer, resultsInterpreter, specimen, result, conclusion, conclusionCode
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: effective, id, extension, instantiates, partOf, status, statusReason, category, medication, subject, context, supportingInformation, performer, reasonCode, reasonReference, request, device, note, dosage, eventHistory
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
<br/>
<em>Must Support Elements</em>: id, extension, clinicalStatus, verificationStatus, category, code, subject, encounter, onset, abatement, recordedDate, encounter.id
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: ServiceRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a>
<br/>
<em>Must Support Elements</em>: authoredOn, id, extension, basedOn, status, intent, category, priority, doNotPerform, code, quantity, subject, encounter, occurrence, asNeeded, requester, specimen
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Patient
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
<br/>
<em>Must Support Elements</em>: id, identifier, active, name, telecom, gender, birthDate, deceased, address, maritalStatus, multipleBirth, photo, contact, communication, generalPractitioner, managingOrganization, link
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Medication
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
<br/>
<em>Must Support Elements</em>: id, extension, code, status, manufacturer, form, amount, ingredient, batch
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Specimen
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/specimen.html">Specimen</a>
<br/>
<em>Must Support Elements</em>: collection, collection.collected, id, extension, identifier, accessionIdentifier, status, type, subject, receivedTime, parent, request, processing, container, condition, note
<br/>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Logic Definitions</th>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-encounters"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Encounters": [Encounter]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-qualifying-encounters-during-measurement-period"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Qualifying Encounters During Measurement Period": ( [Encounter: "Encounter Inpatient"] union [Encounter: "Emergency Department Visit"] union [Encounter: "Observation Services"] union [Encounter: class in "NHSN Inpatient Encounter Class Codes"] union [Encounter: class ~ "emergency"] union [Encounter: class ~ "observation encounter"]) QualifyingEncounters where QualifyingEncounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'} and QualifyingEncounters.period overlaps "Measurement Period"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-encounters-with-patient-hospital-locations"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Encounters with Patient Hospital Locations": "Encounters" Encounters where exists( Encounters.location EncounterLocation where NHSNHelpers.GetLocation(EncounterLocation.location).type in "Inpatient, Emergency, and Observation Locations" and EncounterLocation.period overlaps Encounters.period ) and Encounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'} and Encounters.period overlaps "Measurement Period"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-initial-population"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population": "Qualifying Encounters During Measurement Period" union "Encounters with Patient Hospital Locations"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-encounter"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//#End DiagnosticReport block define "SDE Encounter": "Encounters" Encounters where not CheckIP(Encounters) and exists( "Initial Population" IP where Encounters.period overlaps IP.period) return SharedResource.EncounterResource(Encounters, {FHIR.canonical{value: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication-request"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Medication Request": [MedicationRequest] MedicationRequests where exists( "Initial Population" IP where MedicationRequests.authoredOn during IP.period) return MedicationRequestResource(MedicationRequests, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medicationrequest'}}, {"inpatient", "outpatient"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-coverage"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Coverage": [Coverage] Coverages where exists( "Initial Population" IP where Coverages.period overlaps IP.period) return SharedResource.CoverageResource(Coverages, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-coverage'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-procedure"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Procedure": [Procedure] Procedures where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Procedures.performed) overlaps IP.period) return ProcedureResource(Procedures, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-procedure'}}, {"Surgical procedure", "Diagnostic procedure"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-ip-encounters"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE IP Encounters": "Initial Population" IP return SharedResource.EncounterResource(IP, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-encounter'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-device"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Device": [Device] Devices where exists("Initial Population") return DeviceResource(Devices, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-device'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observations"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Observations": [Observation]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-lab-category"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Observation Lab Category": "Observations" Observations where (exists(Observations.category Category where Category ~ "laboratory")) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationLabResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation-lab'}}, {"imaging", "procedure", "vital-signs", "laboratory"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-vital-signs-category"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//Vital Signs Observation has its own profile in FHIR Base define "SDE Observation Vital Signs Category": "Observations" Observations where (exists(Observations.category Category where Category ~ "vital-signs")) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationVitalSignsResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation-vitals'}}, {"imaging", "procedure", "vital-signs", "laboratory"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-others"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE DiagnosticReport Others": [DiagnosticReport] DiagnosticReports where not ((exists(DiagnosticReports.category Category where Category ~ "Radiology")) or exists((DiagnosticReports.category Category where Category ~ "Pathology")) or exists((DiagnosticReports.category Category where Category ~ "Cardiology")) or exists(DiagnosticReports.category Category where Category ~ "LAB")) and exists("Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period) return DiagnosticReportResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication-administration"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Medication Administration": [MedicationAdministration] MedicationAdministrations where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(MedicationAdministrations.effective) overlaps IP.period) return MedicationAdministrationResource(MedicationAdministrations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medicationadministration'}}, {"inpatient", "outpatient"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-observation-category"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//Defaulting to base FHIR profile as there are no individual profiles in US Core 3.1.1 that cover these Observation categories define "SDE Observation Category": "Observations" Observations where (/*(exists(Observations.category Category where Category ~ "social-history")) or (exists(Observations.category Category where Category ~ "survey")) or */(exists(Observations.category Category where Category ~ "imaging")) or (exists(Observations.category Category where Category ~ "procedure"))) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation'}}, {"imaging", "procedure", "vital-signs", "laboratory"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-conditions"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Conditions": [Condition]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-condition"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//============================================================================ //Supplemental Data Element //When FHIR.canonical value is present, US Core 3.1.1 profiles are used //When FHIR.canonical value is not present, FHIR Base profiles are used //============================================================================ define "SDE Condition": "Conditions" Conditions where exists( "Initial Population" IP //Check for Problem List Conditions that were recorded before or during IP where (exists(IP.diagnosis Diagnoses where GetCondition(Diagnoses.condition).id = Conditions.id ) or GetEncounter(Conditions.encounter).id = IP.id ) and exists (Conditions.category categories where categories ~ "encounter-diagnosis" ) ) return ConditionResource(Conditions, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-condition'}}, {"encounter-diagnosis"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-diagnosticreports"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "DiagnosticReports": [DiagnosticReport]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-lab"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//This block collects all DiagnosticReport resources while also marking Lab and Note DiagnosticReports with the appropriate profiles //#Start DiagnosticReport block define "SDE DiagnosticReport Lab": "DiagnosticReports" DiagnosticReports where (exists(DiagnosticReports.category Category where Category ~ "LAB") and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period)) return DiagnosticReportLabResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport-lab'}}, {"LAB", "Radiology", "Pathology", "Cardiology"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-get-locations-from-ip-encounters-in-measurement-period"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Locations from IP Encounters in Measurement Period": flatten("Initial Population" IP let locationElements: IP.location return locationElements LE let locationReference: LE.location return NHSNHelpers.GetLocation(locationReference))</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-location"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Location": "Get Locations from IP Encounters in Measurement Period" Locations where exists("Initial Population") and Locations is not null return SharedResource.LocationResource(Locations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-location'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-service-request"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Service Request": [ServiceRequest] ServiceRequests where exists("Initial Population" IP where ServiceRequests.authoredOn during IP.period) return ServiceRequestResource(ServiceRequests, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-servicerequest'}}, {"Laboratory procedure", "Surgical procedure", "Imaging"})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-diagnosticreport-note"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE DiagnosticReport Note": "DiagnosticReports" DiagnosticReports where ((exists(DiagnosticReports.category Category where Category ~ "Radiology")) or exists((DiagnosticReports.category Category where Category ~ "Pathology")) or exists((DiagnosticReports.category Category where Category ~ "Cardiology"))) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period) return DiagnosticReportResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport-note'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-minimal-patient"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Minimal Patient": Patient p return SharedResource.PatientResource(p, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/cross-measure-patient'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-medication"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Medication": ("SDE Medication Request" union "SDE Medication Administration") MedReqOrAdmin where MedReqOrAdmin.medication is FHIR.Reference and exists("Initial Population") //No longer need to check for timing here because it's checked in SDE Medication Request/Administriation return SharedResource.MedicationResource(GetMedicationFrom(MedReqOrAdmin.medication), {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medication'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-sde-specimen"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Specimen": [Specimen] Specimens where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Specimens.collection.collected) overlaps IP.period ) return SharedResource.SpecimenResource(Specimens, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-specimen'}})</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-checkip"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// //Functions // define function "CheckIP"(encounter Encounter): exists("Initial Population" IP where encounter.id = IP.id)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tostring"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value EncounterStatus): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tointerval"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToInterval(period FHIR.Period): if period is null then null else if period."start".value is null then Interval(period."start".value, period."end".value] else if time from period."start".value is null and time from period."end".value is not null then Interval[ DateTime(year from period."start".value, month from period."start".value, day from period."start".value, 0, 0, 0, 0, timezoneoffset from period."end".value), period."end".value ] else if time from period."end".value is null and time from period."start".value is not null then Interval[ period."start".value, DateTime(year from period."end".value, month from period."end".value, day from period."end".value, 23, 59, 59, 999, timezoneoffset from period."start".value) ] else Interval[period."start".value, period."end".value]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnhelpers-getlocation"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetLocation"(reference Reference ): singleton from ( [Location] Locations where Locations.id = GetId(reference.reference) )</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tostring"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnhelpers-getid"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetId"(uri String ): Last(Split(uri, '/'))</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-toconcept"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToConcept(concept FHIR.CodeableConcept): if concept is null then null else System.Concept { codes: concept.coding C return ToCode(C), display: concept.text.value }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tocode"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToCode(coding FHIR.Coding): if coding is null then null else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterResource(encounter Encounter, profileURLs List<FHIR.canonical>): encounter e return Encounter{ id: FHIR.id{value: 'LCR-' + e.id}, meta: MetaElement(e, profileURLs), extension: e.extension, identifier: EncounterIdentifier(e.identifier), status: e.status, statusHistory: EncounterStatusHistory(e.statusHistory), class: e.class, classHistory: EncounterClassHistory(e.classHistory), type: e.type, serviceType: e.serviceType, priority: e.priority, subject: e.subject, period: e.period, length: e.length, reasonCode: e.reasonCode, reasonReference: e.reasonReference, diagnosis: EncounterDiagnosis(e.diagnosis), account: e.account, hospitalization: EncounterHospitalization(e.hospitalization), location: EncounterLocation(e.location), partOf: e.partOf }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-metaelement"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "MetaElement"(resource Resource, profileURLs List<FHIR.canonical>): resource r return FHIR.Meta{ extension: r.meta.extension, versionId: r.meta.versionId, lastUpdated: r.meta.lastUpdated, profile: profileURLs, security: r.meta.security, tag: r.meta.tag }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounteridentifier"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterIdentifier(identifier List<FHIR.Identifier>): identifier i return FHIR.Identifier{ use: i.use, type: i.type, system: i.system, value: i.value, period: i.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterstatushistory"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterStatusHistory(statusHistory List<FHIR.Encounter.StatusHistory>): statusHistory sH return FHIR.Encounter.StatusHistory{ status: sH.status, period: sH.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterclasshistory"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterClassHistory(classHistory List<FHIR.Encounter.ClassHistory>): classHistory cH return FHIR.Encounter.ClassHistory{ class: cH.class, period: cH.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterdiagnosis"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*No longer needed but saving for potential future use define function EncounterParticipant(participant List<FHIR.Encounter.Participant>): participant p return FHIR.Encounter.Participant{ type: p.type, period: p.period, individual: p.individual }*/ define function EncounterDiagnosis(diagnosis List<FHIR.Encounter.Diagnosis>): diagnosis d return FHIR.Encounter.Diagnosis{ condition: d.condition, use: d.use, rank: d.rank }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterhospitalization"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterHospitalization(hospitalization FHIR.Encounter.Hospitalization): hospitalization h return FHIR.Encounter.Hospitalization{ preAdmissionIdentifier: h.preAdmissionIdentifier, origin: h.origin, admitSource: h.admitSource, reAdmission: h.reAdmission, dietPreference: h.dietPreference, specialCourtesy: h.specialCourtesy, specialArrangement: h.specialArrangement, destination: h.destination, dischargeDisposition: h.dischargeDisposition }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-encounterlocation"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function EncounterLocation(location List<FHIR.Encounter.Location>): location l return FHIR.Encounter.Location{ location: l.location, status: l.status, physicalType: l.physicalType, period: l.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-todatetime"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-medicationrequestresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationRequestResource(medicationRequest MedicationRequest, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): medicationRequest m return MedicationRequest{ id: FHIR.id {value: 'LCR-' + m.id}, meta: SharedResource.MetaElement(medicationRequest, profileURLs), extension: m.extension, status: m.status, statusReason: m.statusReason, intent: m.intent, category: FilterCodeableConcepts(m.category, acceptedCategories), priority: m.priority, doNotPerform: m.doNotPerform, reported: m.reported, medication: m.medication, subject: m.subject, encounter: m.encounter, authoredOn: m.authoredOn, requester: m.requester, recorder: m.recorder, reasonCode: m.reasonCode, reasonReference: m.reasonReference, instantiatesCanonical: m.instantiatesCanonical, instantiatesUri: m.instantiatesUri, courseOfTherapyType: m.courseOfTherapyType, dosageInstruction: SharedResource.MedicationRequestDosageInstruction(m.dosageInstruction) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-filtercodeableconcepts"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function FilterCodeableConcepts(codes List<FHIR.CodeableConcept>, accepted List<System.Code>): if Count(accepted) > 0 then RemoveUnaccepted(codes, accepted) else codes</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-removeunaccepted"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function RemoveUnaccepted(codes List<FHIR.CodeableConcept>, accepted List<System.Code>): codes c where exists( accepted a where c ~ a )</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationrequestdosageinstruction"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationRequestDosageInstruction(dosageInstruction List<FHIR.Dosage>): dosageInstruction dI return FHIR.Dosage{ text: dI.text, patientInstruction: dI.patientInstruction, timing: dI.timing, asNeeded: dI.asNeeded, site: dI.site, route: dI.route, method: dI.method, doseAndRate: MedicationRequestDoseAndRate(dI.doseAndRate) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationrequestdoseandrate"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationRequestDoseAndRate(doseAndRate List<FHIR.Dosage.DoseAndRate>): doseAndRate dR return FHIR.Dosage.DoseAndRate{ type: dR.type, dose: dR.dose, rate: dR.rate }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-coverageresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function CoverageResource(coverage Coverage, profileURLs List<FHIR.canonical>): coverage c return Coverage{ id: FHIR.id{value: 'LCR-' + c.id}, meta: MetaElement(c, profileURLs), extension: c.extension, status: c.status, type: c.type, policyHolder: c.policyHolder, subscriber: c.subscriber, subscriberId: c.subscriberId, beneficiary: c.beneficiary, dependent: c.dependent, relationship: c.relationship, period: c.period, payor: c.payor, class: CoverageClass(c.class), order: c.order, network: c.network, subrogation: c.subrogation, contract: c.contract }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-coverageclass"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function CoverageClass(class List<FHIR.Coverage.Class>): class c return FHIR.Coverage.Class{ value: c.value, name: c.name }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-procedureresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ProcedureResource(procedure Procedure, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): procedure p return Procedure{ id: FHIR.id {value: 'LCR-' + p.id}, meta: SharedResource.MetaElement(p, profileURLs), extension: p.extension, basedOn: p.basedOn, partOf: p.partOf, status: p.status, category: FilterCodeableConcepts({p.category}, acceptedCategories)[0], code: p.code, subject: p.subject, encounter: p.encounter, performed: p.performed, location: p.location, reasonCode: p.reasonCode, reasonReference: p.reasonReference, bodySite: p.bodySite }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-deviceresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function DeviceResource(device Device, profileURLs List<FHIR.canonical>): device d return Device{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, status: d.status, expirationDate: d.expirationDate, lotNumber: d.lotNumber, serialNumber: d.serialNumber, modelNumber: d.modelNumber, partNumber: d.partNumber, type: d.type, patient: d.patient, parent: d.parent }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationlabresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationLabResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(SharedResource.ObservationLabCategory(o.category), acceptedCategories), code: o.code, subject: o.subject, encounter: o.encounter, effective: o.effective, issued: o.issued, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, bodySite: o.bodySite, method: o.method, specimen: o.specimen, referenceRange: ObservationLabReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: SharedResource.ObservationComponent(o.component) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-observationlabcategory"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationLabCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: ObservationLabCoding(c.coding), text: c.text }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-observationlabcoding"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationLabCoding(coding List<Coding>): coding c return Coding{ id: c.id, extension: c.extension, system: c.system, version: c.version, code: c.code, display: c.display, userSelected: c.userSelected }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationlabreferencerange"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationLabReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-observationcomponent"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationComponent(component List<FHIR.Observation.Component>): component c return FHIR.Observation.Component{ code: c.code, value: c.value, dataAbsentReason: c.dataAbsentReason, interpretation: c.interpretation, referenceRange: c.referenceRange }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationvitalsignsresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationVitalSignsResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(ObservationVitalSignsCategory(o.category), acceptedCategories), code: o.code, subject: o.subject, focus: o.focus, encounter: o.encounter, effective: o.effective, issued: o.issued, performer: o.performer, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, note: o.note, bodySite: o.bodySite, method: o.method, specimen: o.specimen, device: o.device, referenceRange: SharedResource.ObservationReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: ObservationVitalSignsComponent(o.component) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationvitalsignscategory"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationVitalSignsCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: ObservationVitalSignsCoding(c.coding), text: c.text }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationvitalsignscoding"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationVitalSignsCoding(coding List<Coding>): coding c return Coding{ system: c.system, version: c.version, code: c.code, display: c.display, userSelected: c.userSelected }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-observationreferencerange"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age, text: rR.text }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationvitalsignscomponent"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationVitalSignsComponent(component List<FHIR.Observation.Component>): component c return FHIR.Observation.Component{ code: c.code, value: c.value, dataAbsentReason: c.dataAbsentReason, interpretation: c.interpretation, referenceRange: SharedResource.ObservationReferenceRange(c.referenceRange) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-diagnosticreportresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function DiagnosticReportResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>): diagnosticReport d return DiagnosticReport{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, basedOn: d.basedOn, status: d.status, category: d.category, code: d.code, subject: d.subject, encounter: d.encounter, effective: d.effective, issued: d.issued, performer: d.performer, resultsInterpreter: d.resultsInterpreter, specimen: d.specimen, result: d.result, conclusion: d.conclusion, conclusionCode: d.conclusionCode }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-medicationadministrationresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationAdministrationResource(medicationAdministration MedicationAdministration, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): medicationAdministration m return MedicationAdministration{ id: FHIR.id {value: 'LCR-' + m.id}, meta: SharedResource.MetaElement(m, profileURLs), extension: m.extension, instantiates: m.instantiates, partOf: m.partOf, status: m.status, statusReason: m.statusReason, category: FilterCodeableConcepts({m.category}, acceptedCategories)[0], medication: m.medication, subject: m.subject, context: m.context, supportingInformation: m.supportingInformation, effective: m.effective, performer: SharedResource.MedicationAdministrationPerformer(m.performer), reasonCode: m.reasonCode, reasonReference: m.reasonReference, request: m.request, device: m.device, note: m.note, dosage: SharedResource.MedicationAdministrationDosage(m.dosage), eventHistory: m.eventHistory }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationadministrationperformer"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationAdministrationPerformer(performer List<FHIR.MedicationAdministration.Performer>): performer p return FHIR.MedicationAdministration.Performer{ function: p.function, actor: p.actor }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationadministrationdosage"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationAdministrationDosage(dosage FHIR.MedicationAdministration.Dosage): dosage d return FHIR.MedicationAdministration.Dosage{ text: d.text, site: d.site, route: d.route, method: d.method, dose: d.dose, rate: d.rate }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(o.category, acceptedCategories), code: o.code, subject: o.subject, encounter: o.encounter, effective: o.effective, issued: o.issued, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, bodySite: o.bodySite, method: o.method, specimen: o.specimen, referenceRange: ObservationReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: SharedResource.ObservationComponent(o.component) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-observationreferencerange"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ObservationReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-getcondition"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetCondition"(reference Reference): singleton from ( "Conditions" Conditions where Conditions.id = NHSNHelpers.GetId(reference.reference) )</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-getencounter"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetEncounter"(reference Reference): singleton from ( "Encounters" Encounters where Encounters.id = NHSNHelpers.GetId(reference.reference) )</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-conditionresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// //Measure Specific Resource Creation Functions // define function ConditionResource(condition Condition, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): condition c return Condition{ id: FHIR.id {value: 'LCR-' + c.id}, meta: SharedResource.MetaElement(c, profileURLs), extension: c.extension, clinicalStatus: c.clinicalStatus, verificationStatus: c.verificationStatus, category: FilterCodeableConcepts(c.category, acceptedCategories), code: c.code, subject: c.subject, encounter: c.encounter, onset: c.onset, abatement: c.abatement, recordedDate: c.recordedDate }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-diagnosticreportlabresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function DiagnosticReportLabResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): diagnosticReport d return DiagnosticReport{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, basedOn: d.basedOn, status: d.status, category: FilterCodeableConcepts(DiagnosticReportCategory(d.category), acceptedCategories), code: d.code, subject: d.subject, encounter: d.encounter, effective: d.effective, issued: d.issued, specimen: d.specimen, result: d.result, conclusion: d.conclusion, conclusionCode: d.conclusionCode }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-diagnosticreportcategory"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function DiagnosticReportCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: DiagnosticReportCoding(c.coding) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-diagnosticreportcoding"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function DiagnosticReportCoding(coding List<Coding>): coding c return Coding{ system: c.system, version: c.version, code: c.code, display: c.display }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-locationresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function LocationResource(location Location, profileURLs List<FHIR.canonical>): location l return Location{ id: FHIR.id {value: 'LCR-' + l.id}, meta: MetaElement(l, profileURLs), extension: l.extension, status: l.status, operationalStatus: l.operationalStatus, name: l.name, alias: l.alias, description: l.description, mode: l.mode, type: l.type, telecom: l.telecom, address: LocationAddress(l.address), physicalType: l.physicalType, position: LocationPosition(l.position), managingOrganization: l.managingOrganization, partOf: l.partOf, hoursOfOperation: LocationHoursOfOperation(l.hoursOfOperation), availabilityExceptions: l.availabilityExceptions, endpoint: l.endpoint }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-locationaddress"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function LocationAddress(address FHIR.Address): address a return FHIR.Address{ use: a.use, type: a.type, text: a.text, line: a.line, city: a.city, district: a.district, state: a.state, postalCode: a.postalCode, country: a.country, period: a.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-locationposition"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function LocationPosition(position FHIR.Location.Position): position p return FHIR.Location.Position{ longitude: p.longitude, latitude: p.latitude, altitude: p.altitude }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-locationhoursofoperation"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function LocationHoursOfOperation(hoursOfOperation List<FHIR.Location.HoursOfOperation>): hoursOfOperation hOO return FHIR.Location.HoursOfOperation{ daysOfWeek: hOO.daysOfWeek, allDay: hOO.allDay, openingTime: hOO.openingTime, closingTime: hOO.closingTime }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-servicerequestresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ServiceRequestResource(serviceRequest ServiceRequest, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): serviceRequest sR return ServiceRequest{ id: FHIR.id {value: 'LCR-' + sR.id}, meta: SharedResource.MetaElement(sR, profileURLs), extension: sR.extension, basedOn: sR.basedOn, status: sR.status, intent: sR.intent, category: FilterCodeableConcepts(sR.category, acceptedCategories), priority: sR.priority, doNotPerform: sR.doNotPerform, code: sR.code, quantity: sR.quantity, subject: sR.subject, encounter: sR.encounter, occurrence: sR.occurrence, asNeeded: sR.asNeeded, authoredOn: sR.authoredOn, requester: sR.requester, specimen: sR.specimen }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientResource(patient Patient, profileURLs List<FHIR.canonical>): patient p return Patient{ id: FHIR.id{value: 'LCR-' + p.id}, meta: MetaElement(p, profileURLs), extension: GetPatientExtensions(p) union GetIdExtensions(p), identifier: p.identifier, active: p.active, name: PatientName(p.name), telecom: PatientTelecom(p.telecom), gender: p.gender, birthDate: p.birthDate, deceased: p.deceased, address: PatientAddress(p.address), maritalStatus: p.maritalStatus, multipleBirth: p.multipleBirth, photo: p.photo, contact: PatientContact(p.contact), communication: PatientCommunication(p.communication), generalPractitioner: p.generalPractitioner, managingOrganization: p.managingOrganization, link: PatientLink(p.link) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-getpatientextensions"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetPatientExtensions"(domainResource DomainResource): domainResource.extension E where E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race' or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity' or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex' or E.url.value = 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/link-original-resource-id-extension' return E</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-getidextensions"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetIdExtensions"(domainResource DomainResource): domainResource.extension E where E.url.value = 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/link-original-resource-id-extension' return E</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientname"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* No longer needed but saving in case it's useful later define function PatientIdentifier(identifier List<FHIR.Identifier>): identifier i return FHIR.Identifier{ id: i.id, extension: i.extension, use: i.use, type: i.type, system: i.system, value: i.value, period: i.period, assigner: i.assigner }*/ define function PatientName(name List<FHIR.HumanName>): name n return FHIR.HumanName{ id: n.id, extension: n.extension, use: n.use, text: n.text, family: n.family, given: n.given, prefix: n.prefix, suffix: n.suffix, period: n.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patienttelecom"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientTelecom(telecom List<FHIR.ContactPoint>): telecom t return FHIR.ContactPoint{ system: t.system, value: t.value, use: t.use, rank: t.rank, period: t.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientaddress"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientAddress(address List<FHIR.Address>): address a return FHIR.Address{ id: a.id, extension: a.extension, use: a.use, type: a.type, text: a.text, line: a.line, city: a.city, district: a.district, state: a.state, postalCode: a.postalCode, country: a.country, period: a.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientcontact"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientContact(contact List<FHIR.Patient.Contact>): contact c return FHIR.Patient.Contact{ id: c.id, extension: c.extension, relationship: c.relationship, name: c.name, telecom: c.telecom, address: c.address, gender: c.gender, organization: c.organization, period: c.period }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientcommunication"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientCommunication(communication List<FHIR.Patient.Communication>): communication c return FHIR.Patient.Communication{ id: c.id, extension: c.extension, language: c.language, preferred: c.preferred }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-patientlink"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function PatientLink(link List<FHIR.Patient.Link>): link l return FHIR.Patient.Link{ id: l.id, extension: l.extension, modifierExtension: l.modifierExtension, other: l.other, type: l.type }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationResource(medication Medication, profileURLs List<FHIR.canonical>): medication m return Medication{ id: FHIR.id {value: 'LCR-' + m.id}, meta: MetaElement(m, profileURLs), extension: m.extension, code: m.code, status: m.status, manufacturer: m.manufacturer, form: m.form, amount: m.amount, ingredient: MedicationIngredient(m.ingredient), batch: MedicationBatch(m.batch) }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationingredient"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationIngredient(ingredient List<FHIR.Medication.Ingredient>): ingredient i return FHIR.Medication.Ingredient{ item: i.item, strength: i.strength }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-medicationbatch"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MedicationBatch(batch FHIR.Medication.Batch): batch b return FHIR.Medication.Batch{ lotNumber: b.lotNumber, expirationDate: b.expirationDate }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-getmedicationfrom"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetMedicationFrom"(choice Choice<FHIR.CodeableConcept, FHIR.Reference>): case when choice is FHIR.Reference then GetMedication(choice as FHIR.Reference) else null end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="nhsnacutecarehospitalmonthlyinitialpopulation-getmedication"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> NHSNAcuteCareHospitalMonthlyInitialPopulation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function "GetMedication"(reference Reference): singleton from ( [Medication] Medications where Medications.id = NHSNHelpers.GetId(reference.reference) )</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-specimenresource"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function SpecimenResource(specimen Specimen, profileURLs List<FHIR.canonical>): specimen s return Specimen{ id: FHIR.id {value: 'LCR-' + s.id}, meta: MetaElement(s, profileURLs), extension: s.extension, identifier: s.identifier, accessionIdentifier: s.accessionIdentifier, status: s.status, type: s.type, subject: s.subject, receivedTime: s.receivedTime, parent: s.parent, request: s.request, collection: SpecimenCollection(s.collection), processing: SpecimenProcessing(s.processing), container: SpecimenContainer(s.container), condition: s.condition, note: s.note }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-specimencollection"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function SpecimenCollection(collection FHIR.Specimen.Collection): collection c return FHIR.Specimen.Collection{ collector: c.collector, collected: c.collected, "duration": c."duration", quantity: c.quantity, method: c.method, bodySite: c.bodySite, fastingStatus: c.fastingStatus }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-specimenprocessing"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function SpecimenProcessing(processing List<FHIR.Specimen.Processing>): processing p return FHIR.Specimen.Processing{ description: p.description, procedure: p.procedure, additive: p.additive, time: p.time }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="sharedresourcecreation-specimencontainer"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SharedResourceCreation</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function SpecimenContainer(container List<FHIR.Specimen.Container>): container c return FHIR.Specimen.Container{ description: c.description, type: c.type, capacity: c.capacity, specimenQuantity: c.specimenQuantity, additive: c.additive }</code></pre>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Generated using version 0.4.6 of the sample-content-ig Liquid templates</th>
</tr>
</tbody>
</table>
</div>
</text>
<contained>
<Library>
<id value="effective-data-requirements"/>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
<code value="EMER"/>
<display value="emergency"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
<code value="OBSENC"/>
<display value="observation encounter"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
<code value="inpatient"/>
<display value="Inpatient"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
<code value="outpatient"/>
<display value="Outpatient"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="3877713003"/>
<display value="Surgical procedure"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="103693007"/>
<display value="Diagnostic procedure"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="laboratory"/>
<display value="Laboratory"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="imaging"/>
<display value="Imaging"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="procedure"/>
<display value="Procedure"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="vital-signs"/>
<display value="Vital Signs"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://loinc.org"/>
<code value="LP29684-5"/>
<display value="Radiology"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://loinc.org"/>
<code value="LP7839-6"/>
<display value="Pathology"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://loinc.org"/>
<code value="LP29708-2"/>
<display value="Cardiology"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0074"/>
<code value="LAB"/>
<display value="Laboratory"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-category"/>
<code value="encounter-diagnosis"/>
<display value="Encounter Diagnosis"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="108252007"/>
<display value="Laboratory procedure"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="363679005"/>
<display value="Imaging"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="Encounters"/>
</extension>
<extension url="statement">
<valueString value="define "Encounters": [Encounter]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="0"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString
value="Qualifying Encounters During Measurement Period"/>
</extension>
<extension url="statement">
<valueString
value="define "Qualifying Encounters During Measurement Period": ( [Encounter: "Encounter Inpatient"] union [Encounter: "Emergency Department Visit"] union [Encounter: "Observation Services"] union [Encounter: class in "NHSN Inpatient Encounter Class Codes"] union [Encounter: class ~ "emergency"] union [Encounter: class ~ "observation encounter"]) QualifyingEncounters where QualifyingEncounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'} and QualifyingEncounters.period overlaps "Measurement Period""/>
</extension>
<extension url="displaySequence">
<valueInteger value="1"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="Encounters with Patient Hospital Locations"/>
</extension>
<extension url="statement">
<valueString
value="define "Encounters with Patient Hospital Locations": "Encounters" Encounters where exists( Encounters.location EncounterLocation where NHSNHelpers.GetLocation(EncounterLocation.location).type in "Inpatient, Emergency, and Observation Locations" and EncounterLocation.period overlaps Encounters.period ) and Encounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'} and Encounters.period overlaps "Measurement Period""/>
</extension>
<extension url="displaySequence">
<valueInteger value="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="Initial Population"/>
</extension>
<extension url="statement">
<valueString
value="define "Initial Population": "Qualifying Encounters During Measurement Period" union "Encounters with Patient Hospital Locations""/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Encounter"/>
</extension>
<extension url="statement">
<valueString
value="//#End DiagnosticReport block define "SDE Encounter": "Encounters" Encounters where not CheckIP(Encounters) and exists( "Initial Population" IP where Encounters.period overlaps IP.period) return SharedResource.EncounterResource(Encounters, {FHIR.canonical{value: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Medication Request"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Medication Request": [MedicationRequest] MedicationRequests where exists( "Initial Population" IP where MedicationRequests.authoredOn during IP.period) return MedicationRequestResource(MedicationRequests, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medicationrequest'}}, {"inpatient", "outpatient"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Coverage"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Coverage": [Coverage] Coverages where exists( "Initial Population" IP where Coverages.period overlaps IP.period) return SharedResource.CoverageResource(Coverages, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-coverage'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="6"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Procedure"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Procedure": [Procedure] Procedures where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Procedures.performed) overlaps IP.period) return ProcedureResource(Procedures, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-procedure'}}, {"Surgical procedure", "Diagnostic procedure"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE IP Encounters"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE IP Encounters": "Initial Population" IP return SharedResource.EncounterResource(IP, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-encounter'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="8"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Device"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Device": [Device] Devices where exists("Initial Population") return DeviceResource(Devices, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-device'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="9"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="Observations"/>
</extension>
<extension url="statement">
<valueString
value="define "Observations": [Observation]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="10"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Observation Lab Category"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Observation Lab Category": "Observations" Observations where (exists(Observations.category Category where Category ~ "laboratory")) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationLabResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation-lab'}}, {"imaging", "procedure", "vital-signs", "laboratory"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="11"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Observation Vital Signs Category"/>
</extension>
<extension url="statement">
<valueString
value="//Vital Signs Observation has its own profile in FHIR Base define "SDE Observation Vital Signs Category": "Observations" Observations where (exists(Observations.category Category where Category ~ "vital-signs")) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationVitalSignsResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation-vitals'}}, {"imaging", "procedure", "vital-signs", "laboratory"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="12"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE DiagnosticReport Others"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE DiagnosticReport Others": [DiagnosticReport] DiagnosticReports where not ((exists(DiagnosticReports.category Category where Category ~ "Radiology")) or exists((DiagnosticReports.category Category where Category ~ "Pathology")) or exists((DiagnosticReports.category Category where Category ~ "Cardiology")) or exists(DiagnosticReports.category Category where Category ~ "LAB")) and exists("Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period) return DiagnosticReportResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="13"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Medication Administration"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Medication Administration": [MedicationAdministration] MedicationAdministrations where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(MedicationAdministrations.effective) overlaps IP.period) return MedicationAdministrationResource(MedicationAdministrations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medicationadministration'}}, {"inpatient", "outpatient"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Observation Category"/>
</extension>
<extension url="statement">
<valueString
value="//Defaulting to base FHIR profile as there are no individual profiles in US Core 3.1.1 that cover these Observation categories define "SDE Observation Category": "Observations" Observations where (/*(exists(Observations.category Category where Category ~ "social-history")) or (exists(Observations.category Category where Category ~ "survey")) or */(exists(Observations.category Category where Category ~ "imaging")) or (exists(Observations.category Category where Category ~ "procedure"))) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Observations.effective) overlaps IP.period) return ObservationResource(Observations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-observation'}}, {"imaging", "procedure", "vital-signs", "laboratory"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="15"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="Conditions"/>
</extension>
<extension url="statement">
<valueString value="define "Conditions": [Condition]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="16"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Condition"/>
</extension>
<extension url="statement">
<valueString
value="//============================================================================ //Supplemental Data Element //When FHIR.canonical value is present, US Core 3.1.1 profiles are used //When FHIR.canonical value is not present, FHIR Base profiles are used //============================================================================ define "SDE Condition": "Conditions" Conditions where exists( "Initial Population" IP //Check for Problem List Conditions that were recorded before or during IP where (exists(IP.diagnosis Diagnoses where GetCondition(Diagnoses.condition).id = Conditions.id ) or GetEncounter(Conditions.encounter).id = IP.id ) and exists (Conditions.category categories where categories ~ "encounter-diagnosis" ) ) return ConditionResource(Conditions, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-condition'}}, {"encounter-diagnosis"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="17"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DiagnosticReports"/>
</extension>
<extension url="statement">
<valueString
value="define "DiagnosticReports": [DiagnosticReport]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE DiagnosticReport Lab"/>
</extension>
<extension url="statement">
<valueString
value="//This block collects all DiagnosticReport resources while also marking Lab and Note DiagnosticReports with the appropriate profiles //#Start DiagnosticReport block define "SDE DiagnosticReport Lab": "DiagnosticReports" DiagnosticReports where (exists(DiagnosticReports.category Category where Category ~ "LAB") and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period)) return DiagnosticReportLabResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport-lab'}}, {"LAB", "Radiology", "Pathology", "Cardiology"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString
value="Get Locations from IP Encounters in Measurement Period"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Locations from IP Encounters in Measurement Period": flatten("Initial Population" IP let locationElements: IP.location return locationElements LE let locationReference: LE.location return NHSNHelpers.GetLocation(locationReference))"/>
</extension>
<extension url="displaySequence">
<valueInteger value="20"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Location"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Location": "Get Locations from IP Encounters in Measurement Period" Locations where exists("Initial Population") and Locations is not null return SharedResource.LocationResource(Locations, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-location'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="21"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Service Request"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Service Request": [ServiceRequest] ServiceRequests where exists("Initial Population" IP where ServiceRequests.authoredOn during IP.period) return ServiceRequestResource(ServiceRequests, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-servicerequest'}}, {"Laboratory procedure", "Surgical procedure", "Imaging"})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="22"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE DiagnosticReport Note"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE DiagnosticReport Note": "DiagnosticReports" DiagnosticReports where ((exists(DiagnosticReports.category Category where Category ~ "Radiology")) or exists((DiagnosticReports.category Category where Category ~ "Pathology")) or exists((DiagnosticReports.category Category where Category ~ "Cardiology"))) and exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(DiagnosticReports.effective) overlaps IP.period) return DiagnosticReportResource(DiagnosticReports, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-diagnosticreport-note'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="23"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Minimal Patient"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Minimal Patient": Patient p return SharedResource.PatientResource(p, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/cross-measure-patient'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="24"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Medication"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Medication": ("SDE Medication Request" union "SDE Medication Administration") MedReqOrAdmin where MedReqOrAdmin.medication is FHIR.Reference and exists("Initial Population") //No longer need to check for timing here because it's checked in SDE Medication Request/Administriation return SharedResource.MedicationResource(GetMedicationFrom(MedReqOrAdmin.medication), {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-medication'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="25"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="SDE Specimen"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Specimen": [Specimen] Specimens where exists( "Initial Population" IP where NHSNHelpers."Normalize Interval"(Specimens.collection.collected) overlaps IP.period ) return SharedResource.SpecimenResource(Specimens, {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/ach-monthly-specimen'}})"/>
</extension>
<extension url="displaySequence">
<valueInteger value="26"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="CheckIP"/>
</extension>
<extension url="statement">
<valueString
value="// //Functions // define function "CheckIP"(encounter Encounter): exists("Initial Population" IP where encounter.id = IP.id)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="27"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToString"/>
</extension>
<extension url="statement">
<valueString
value="define function ToString(value EncounterStatus): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="28"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToInterval"/>
</extension>
<extension url="statement">
<valueString
value="define function ToInterval(period FHIR.Period): if period is null then null else if period."start".value is null then Interval(period."start".value, period."end".value] else if time from period."start".value is null and time from period."end".value is not null then Interval[ DateTime(year from period."start".value, month from period."start".value, day from period."start".value, 0, 0, 0, 0, timezoneoffset from period."end".value), period."end".value ] else if time from period."end".value is null and time from period."start".value is not null then Interval[ period."start".value, DateTime(year from period."end".value, month from period."end".value, day from period."end".value, 23, 59, 59, 999, timezoneoffset from period."start".value) ] else Interval[period."start".value, period."end".value]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="29"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNHelpers"/>
</extension>
<extension url="name">
<valueString value="GetLocation"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetLocation"(reference Reference ): singleton from ( [Location] Locations where Locations.id = GetId(reference.reference) )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="30"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToString"/>
</extension>
<extension url="statement">
<valueString
value="define function ToString(value string): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="31"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNHelpers"/>
</extension>
<extension url="name">
<valueString value="GetId"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetId"(uri String ): Last(Split(uri, '/'))"/>
</extension>
<extension url="displaySequence">
<valueInteger value="32"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToConcept"/>
</extension>
<extension url="statement">
<valueString
value="define function ToConcept(concept FHIR.CodeableConcept): if concept is null then null else System.Concept { codes: concept.coding C return ToCode(C), display: concept.text.value }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="33"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCode"/>
</extension>
<extension url="statement">
<valueString
value="define function ToCode(coding FHIR.Coding): if coding is null then null else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="34"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterResource"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterResource(encounter Encounter, profileURLs List<FHIR.canonical>): encounter e return Encounter{ id: FHIR.id{value: 'LCR-' + e.id}, meta: MetaElement(e, profileURLs), extension: e.extension, identifier: EncounterIdentifier(e.identifier), status: e.status, statusHistory: EncounterStatusHistory(e.statusHistory), class: e.class, classHistory: EncounterClassHistory(e.classHistory), type: e.type, serviceType: e.serviceType, priority: e.priority, subject: e.subject, period: e.period, length: e.length, reasonCode: e.reasonCode, reasonReference: e.reasonReference, diagnosis: EncounterDiagnosis(e.diagnosis), account: e.account, hospitalization: EncounterHospitalization(e.hospitalization), location: EncounterLocation(e.location), partOf: e.partOf }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="35"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MetaElement"/>
</extension>
<extension url="statement">
<valueString
value="define function "MetaElement"(resource Resource, profileURLs List<FHIR.canonical>): resource r return FHIR.Meta{ extension: r.meta.extension, versionId: r.meta.versionId, lastUpdated: r.meta.lastUpdated, profile: profileURLs, security: r.meta.security, tag: r.meta.tag }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="36"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterIdentifier"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterIdentifier(identifier List<FHIR.Identifier>): identifier i return FHIR.Identifier{ use: i.use, type: i.type, system: i.system, value: i.value, period: i.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="37"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterStatusHistory"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterStatusHistory(statusHistory List<FHIR.Encounter.StatusHistory>): statusHistory sH return FHIR.Encounter.StatusHistory{ status: sH.status, period: sH.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="38"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterClassHistory"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterClassHistory(classHistory List<FHIR.Encounter.ClassHistory>): classHistory cH return FHIR.Encounter.ClassHistory{ class: cH.class, period: cH.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="39"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterDiagnosis"/>
</extension>
<extension url="statement">
<valueString
value="/*No longer needed but saving for potential future use define function EncounterParticipant(participant List<FHIR.Encounter.Participant>): participant p return FHIR.Encounter.Participant{ type: p.type, period: p.period, individual: p.individual }*/ define function EncounterDiagnosis(diagnosis List<FHIR.Encounter.Diagnosis>): diagnosis d return FHIR.Encounter.Diagnosis{ condition: d.condition, use: d.use, rank: d.rank }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="40"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterHospitalization"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterHospitalization(hospitalization FHIR.Encounter.Hospitalization): hospitalization h return FHIR.Encounter.Hospitalization{ preAdmissionIdentifier: h.preAdmissionIdentifier, origin: h.origin, admitSource: h.admitSource, reAdmission: h.reAdmission, dietPreference: h.dietPreference, specialCourtesy: h.specialCourtesy, specialArrangement: h.specialArrangement, destination: h.destination, dischargeDisposition: h.dischargeDisposition }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="41"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="EncounterLocation"/>
</extension>
<extension url="statement">
<valueString
value="define function EncounterLocation(location List<FHIR.Encounter.Location>): location l return FHIR.Encounter.Location{ location: l.location, status: l.status, physicalType: l.physicalType, period: l.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="42"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToDateTime"/>
</extension>
<extension url="statement">
<valueString
value="define function ToDateTime(value dateTime): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="43"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="MedicationRequestResource"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationRequestResource(medicationRequest MedicationRequest, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): medicationRequest m return MedicationRequest{ id: FHIR.id {value: 'LCR-' + m.id}, meta: SharedResource.MetaElement(medicationRequest, profileURLs), extension: m.extension, status: m.status, statusReason: m.statusReason, intent: m.intent, category: FilterCodeableConcepts(m.category, acceptedCategories), priority: m.priority, doNotPerform: m.doNotPerform, reported: m.reported, medication: m.medication, subject: m.subject, encounter: m.encounter, authoredOn: m.authoredOn, requester: m.requester, recorder: m.recorder, reasonCode: m.reasonCode, reasonReference: m.reasonReference, instantiatesCanonical: m.instantiatesCanonical, instantiatesUri: m.instantiatesUri, courseOfTherapyType: m.courseOfTherapyType, dosageInstruction: SharedResource.MedicationRequestDosageInstruction(m.dosageInstruction) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="44"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="FilterCodeableConcepts"/>
</extension>
<extension url="statement">
<valueString
value="define function FilterCodeableConcepts(codes List<FHIR.CodeableConcept>, accepted List<System.Code>): if Count(accepted) > 0 then RemoveUnaccepted(codes, accepted) else codes"/>
</extension>
<extension url="displaySequence">
<valueInteger value="45"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="RemoveUnaccepted"/>
</extension>
<extension url="statement">
<valueString
value="define function RemoveUnaccepted(codes List<FHIR.CodeableConcept>, accepted List<System.Code>): codes c where exists( accepted a where c ~ a )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="46"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationRequestDosageInstruction"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationRequestDosageInstruction(dosageInstruction List<FHIR.Dosage>): dosageInstruction dI return FHIR.Dosage{ text: dI.text, patientInstruction: dI.patientInstruction, timing: dI.timing, asNeeded: dI.asNeeded, site: dI.site, route: dI.route, method: dI.method, doseAndRate: MedicationRequestDoseAndRate(dI.doseAndRate) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="47"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationRequestDoseAndRate"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationRequestDoseAndRate(doseAndRate List<FHIR.Dosage.DoseAndRate>): doseAndRate dR return FHIR.Dosage.DoseAndRate{ type: dR.type, dose: dR.dose, rate: dR.rate }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="48"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="CoverageResource"/>
</extension>
<extension url="statement">
<valueString
value="define function CoverageResource(coverage Coverage, profileURLs List<FHIR.canonical>): coverage c return Coverage{ id: FHIR.id{value: 'LCR-' + c.id}, meta: MetaElement(c, profileURLs), extension: c.extension, status: c.status, type: c.type, policyHolder: c.policyHolder, subscriber: c.subscriber, subscriberId: c.subscriberId, beneficiary: c.beneficiary, dependent: c.dependent, relationship: c.relationship, period: c.period, payor: c.payor, class: CoverageClass(c.class), order: c.order, network: c.network, subrogation: c.subrogation, contract: c.contract }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="49"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="CoverageClass"/>
</extension>
<extension url="statement">
<valueString
value="define function CoverageClass(class List<FHIR.Coverage.Class>): class c return FHIR.Coverage.Class{ value: c.value, name: c.name }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="50"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ProcedureResource"/>
</extension>
<extension url="statement">
<valueString
value="define function ProcedureResource(procedure Procedure, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): procedure p return Procedure{ id: FHIR.id {value: 'LCR-' + p.id}, meta: SharedResource.MetaElement(p, profileURLs), extension: p.extension, basedOn: p.basedOn, partOf: p.partOf, status: p.status, category: FilterCodeableConcepts({p.category}, acceptedCategories)[0], code: p.code, subject: p.subject, encounter: p.encounter, performed: p.performed, location: p.location, reasonCode: p.reasonCode, reasonReference: p.reasonReference, bodySite: p.bodySite }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="51"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DeviceResource"/>
</extension>
<extension url="statement">
<valueString
value="define function DeviceResource(device Device, profileURLs List<FHIR.canonical>): device d return Device{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, status: d.status, expirationDate: d.expirationDate, lotNumber: d.lotNumber, serialNumber: d.serialNumber, modelNumber: d.modelNumber, partNumber: d.partNumber, type: d.type, patient: d.patient, parent: d.parent }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="52"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationLabResource"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationLabResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(SharedResource.ObservationLabCategory(o.category), acceptedCategories), code: o.code, subject: o.subject, encounter: o.encounter, effective: o.effective, issued: o.issued, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, bodySite: o.bodySite, method: o.method, specimen: o.specimen, referenceRange: ObservationLabReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: SharedResource.ObservationComponent(o.component) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="53"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="ObservationLabCategory"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationLabCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: ObservationLabCoding(c.coding), text: c.text }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="54"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="ObservationLabCoding"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationLabCoding(coding List<Coding>): coding c return Coding{ id: c.id, extension: c.extension, system: c.system, version: c.version, code: c.code, display: c.display, userSelected: c.userSelected }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="55"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationLabReferenceRange"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationLabReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="56"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="ObservationComponent"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationComponent(component List<FHIR.Observation.Component>): component c return FHIR.Observation.Component{ code: c.code, value: c.value, dataAbsentReason: c.dataAbsentReason, interpretation: c.interpretation, referenceRange: c.referenceRange }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="57"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationVitalSignsResource"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationVitalSignsResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(ObservationVitalSignsCategory(o.category), acceptedCategories), code: o.code, subject: o.subject, focus: o.focus, encounter: o.encounter, effective: o.effective, issued: o.issued, performer: o.performer, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, note: o.note, bodySite: o.bodySite, method: o.method, specimen: o.specimen, device: o.device, referenceRange: SharedResource.ObservationReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: ObservationVitalSignsComponent(o.component) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="58"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationVitalSignsCategory"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationVitalSignsCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: ObservationVitalSignsCoding(c.coding), text: c.text }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="59"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationVitalSignsCoding"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationVitalSignsCoding(coding List<Coding>): coding c return Coding{ system: c.system, version: c.version, code: c.code, display: c.display, userSelected: c.userSelected }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="60"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="ObservationReferenceRange"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age, text: rR.text }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="61"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationVitalSignsComponent"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationVitalSignsComponent(component List<FHIR.Observation.Component>): component c return FHIR.Observation.Component{ code: c.code, value: c.value, dataAbsentReason: c.dataAbsentReason, interpretation: c.interpretation, referenceRange: SharedResource.ObservationReferenceRange(c.referenceRange) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="62"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DiagnosticReportResource"/>
</extension>
<extension url="statement">
<valueString
value="define function DiagnosticReportResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>): diagnosticReport d return DiagnosticReport{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, basedOn: d.basedOn, status: d.status, category: d.category, code: d.code, subject: d.subject, encounter: d.encounter, effective: d.effective, issued: d.issued, performer: d.performer, resultsInterpreter: d.resultsInterpreter, specimen: d.specimen, result: d.result, conclusion: d.conclusion, conclusionCode: d.conclusionCode }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="63"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="MedicationAdministrationResource"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationAdministrationResource(medicationAdministration MedicationAdministration, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): medicationAdministration m return MedicationAdministration{ id: FHIR.id {value: 'LCR-' + m.id}, meta: SharedResource.MetaElement(m, profileURLs), extension: m.extension, instantiates: m.instantiates, partOf: m.partOf, status: m.status, statusReason: m.statusReason, category: FilterCodeableConcepts({m.category}, acceptedCategories)[0], medication: m.medication, subject: m.subject, context: m.context, supportingInformation: m.supportingInformation, effective: m.effective, performer: SharedResource.MedicationAdministrationPerformer(m.performer), reasonCode: m.reasonCode, reasonReference: m.reasonReference, request: m.request, device: m.device, note: m.note, dosage: SharedResource.MedicationAdministrationDosage(m.dosage), eventHistory: m.eventHistory }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="64"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationAdministrationPerformer"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationAdministrationPerformer(performer List<FHIR.MedicationAdministration.Performer>): performer p return FHIR.MedicationAdministration.Performer{ function: p.function, actor: p.actor }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="65"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationAdministrationDosage"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationAdministrationDosage(dosage FHIR.MedicationAdministration.Dosage): dosage d return FHIR.MedicationAdministration.Dosage{ text: d.text, site: d.site, route: d.route, method: d.method, dose: d.dose, rate: d.rate }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="66"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationResource"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationResource(observation Observation, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): observation o return Observation{ id: FHIR.id {value: 'LCR-' + o.id}, meta: SharedResource.MetaElement(o, profileURLs), extension: o.extension, partOf: o.partOf, status: o.status, category: FilterCodeableConcepts(o.category, acceptedCategories), code: o.code, subject: o.subject, encounter: o.encounter, effective: o.effective, issued: o.issued, value: o.value, dataAbsentReason: o.dataAbsentReason, interpretation: o.interpretation, bodySite: o.bodySite, method: o.method, specimen: o.specimen, referenceRange: ObservationReferenceRange(o.referenceRange), hasMember: o.hasMember, derivedFrom: o.derivedFrom, component: SharedResource.ObservationComponent(o.component) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="67"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ObservationReferenceRange"/>
</extension>
<extension url="statement">
<valueString
value="define function ObservationReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>): referenceRange rR return FHIR.Observation.ReferenceRange{ low: rR.low, high: rR.high, type: rR.type, appliesTo: rR.appliesTo, age: rR.age }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="68"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="GetCondition"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetCondition"(reference Reference): singleton from ( "Conditions" Conditions where Conditions.id = NHSNHelpers.GetId(reference.reference) )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="69"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="GetEncounter"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetEncounter"(reference Reference): singleton from ( "Encounters" Encounters where Encounters.id = NHSNHelpers.GetId(reference.reference) )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="70"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ConditionResource"/>
</extension>
<extension url="statement">
<valueString
value="// //Measure Specific Resource Creation Functions // define function ConditionResource(condition Condition, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): condition c return Condition{ id: FHIR.id {value: 'LCR-' + c.id}, meta: SharedResource.MetaElement(c, profileURLs), extension: c.extension, clinicalStatus: c.clinicalStatus, verificationStatus: c.verificationStatus, category: FilterCodeableConcepts(c.category, acceptedCategories), code: c.code, subject: c.subject, encounter: c.encounter, onset: c.onset, abatement: c.abatement, recordedDate: c.recordedDate }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="71"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DiagnosticReportLabResource"/>
</extension>
<extension url="statement">
<valueString
value="define function DiagnosticReportLabResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): diagnosticReport d return DiagnosticReport{ id: FHIR.id{value: 'LCR-' + d.id}, meta: SharedResource.MetaElement(d, profileURLs), extension: d.extension, basedOn: d.basedOn, status: d.status, category: FilterCodeableConcepts(DiagnosticReportCategory(d.category), acceptedCategories), code: d.code, subject: d.subject, encounter: d.encounter, effective: d.effective, issued: d.issued, specimen: d.specimen, result: d.result, conclusion: d.conclusion, conclusionCode: d.conclusionCode }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="72"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DiagnosticReportCategory"/>
</extension>
<extension url="statement">
<valueString
value="define function DiagnosticReportCategory(category List<CodeableConcept>): category c return CodeableConcept{ coding: DiagnosticReportCoding(c.coding) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="73"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="DiagnosticReportCoding"/>
</extension>
<extension url="statement">
<valueString
value="define function DiagnosticReportCoding(coding List<Coding>): coding c return Coding{ system: c.system, version: c.version, code: c.code, display: c.display }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="74"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="LocationResource"/>
</extension>
<extension url="statement">
<valueString
value="define function LocationResource(location Location, profileURLs List<FHIR.canonical>): location l return Location{ id: FHIR.id {value: 'LCR-' + l.id}, meta: MetaElement(l, profileURLs), extension: l.extension, status: l.status, operationalStatus: l.operationalStatus, name: l.name, alias: l.alias, description: l.description, mode: l.mode, type: l.type, telecom: l.telecom, address: LocationAddress(l.address), physicalType: l.physicalType, position: LocationPosition(l.position), managingOrganization: l.managingOrganization, partOf: l.partOf, hoursOfOperation: LocationHoursOfOperation(l.hoursOfOperation), availabilityExceptions: l.availabilityExceptions, endpoint: l.endpoint }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="75"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="LocationAddress"/>
</extension>
<extension url="statement">
<valueString
value="define function LocationAddress(address FHIR.Address): address a return FHIR.Address{ use: a.use, type: a.type, text: a.text, line: a.line, city: a.city, district: a.district, state: a.state, postalCode: a.postalCode, country: a.country, period: a.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="76"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="LocationPosition"/>
</extension>
<extension url="statement">
<valueString
value="define function LocationPosition(position FHIR.Location.Position): position p return FHIR.Location.Position{ longitude: p.longitude, latitude: p.latitude, altitude: p.altitude }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="77"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="LocationHoursOfOperation"/>
</extension>
<extension url="statement">
<valueString
value="define function LocationHoursOfOperation(hoursOfOperation List<FHIR.Location.HoursOfOperation>): hoursOfOperation hOO return FHIR.Location.HoursOfOperation{ daysOfWeek: hOO.daysOfWeek, allDay: hOO.allDay, openingTime: hOO.openingTime, closingTime: hOO.closingTime }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="78"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="ServiceRequestResource"/>
</extension>
<extension url="statement">
<valueString
value="define function ServiceRequestResource(serviceRequest ServiceRequest, profileURLs List<FHIR.canonical>, acceptedCategories List<System.Code>): serviceRequest sR return ServiceRequest{ id: FHIR.id {value: 'LCR-' + sR.id}, meta: SharedResource.MetaElement(sR, profileURLs), extension: sR.extension, basedOn: sR.basedOn, status: sR.status, intent: sR.intent, category: FilterCodeableConcepts(sR.category, acceptedCategories), priority: sR.priority, doNotPerform: sR.doNotPerform, code: sR.code, quantity: sR.quantity, subject: sR.subject, encounter: sR.encounter, occurrence: sR.occurrence, asNeeded: sR.asNeeded, authoredOn: sR.authoredOn, requester: sR.requester, specimen: sR.specimen }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="79"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientResource"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientResource(patient Patient, profileURLs List<FHIR.canonical>): patient p return Patient{ id: FHIR.id{value: 'LCR-' + p.id}, meta: MetaElement(p, profileURLs), extension: GetPatientExtensions(p) union GetIdExtensions(p), identifier: p.identifier, active: p.active, name: PatientName(p.name), telecom: PatientTelecom(p.telecom), gender: p.gender, birthDate: p.birthDate, deceased: p.deceased, address: PatientAddress(p.address), maritalStatus: p.maritalStatus, multipleBirth: p.multipleBirth, photo: p.photo, contact: PatientContact(p.contact), communication: PatientCommunication(p.communication), generalPractitioner: p.generalPractitioner, managingOrganization: p.managingOrganization, link: PatientLink(p.link) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="80"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="GetPatientExtensions"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetPatientExtensions"(domainResource DomainResource): domainResource.extension E where E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race' or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity' or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex' or E.url.value = 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/link-original-resource-id-extension' return E"/>
</extension>
<extension url="displaySequence">
<valueInteger value="81"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="GetIdExtensions"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetIdExtensions"(domainResource DomainResource): domainResource.extension E where E.url.value = 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/link-original-resource-id-extension' return E"/>
</extension>
<extension url="displaySequence">
<valueInteger value="82"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientName"/>
</extension>
<extension url="statement">
<valueString
value="/* No longer needed but saving in case it's useful later define function PatientIdentifier(identifier List<FHIR.Identifier>): identifier i return FHIR.Identifier{ id: i.id, extension: i.extension, use: i.use, type: i.type, system: i.system, value: i.value, period: i.period, assigner: i.assigner }*/ define function PatientName(name List<FHIR.HumanName>): name n return FHIR.HumanName{ id: n.id, extension: n.extension, use: n.use, text: n.text, family: n.family, given: n.given, prefix: n.prefix, suffix: n.suffix, period: n.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="83"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientTelecom"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientTelecom(telecom List<FHIR.ContactPoint>): telecom t return FHIR.ContactPoint{ system: t.system, value: t.value, use: t.use, rank: t.rank, period: t.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="84"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientAddress"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientAddress(address List<FHIR.Address>): address a return FHIR.Address{ id: a.id, extension: a.extension, use: a.use, type: a.type, text: a.text, line: a.line, city: a.city, district: a.district, state: a.state, postalCode: a.postalCode, country: a.country, period: a.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="85"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientContact"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientContact(contact List<FHIR.Patient.Contact>): contact c return FHIR.Patient.Contact{ id: c.id, extension: c.extension, relationship: c.relationship, name: c.name, telecom: c.telecom, address: c.address, gender: c.gender, organization: c.organization, period: c.period }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="86"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientCommunication"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientCommunication(communication List<FHIR.Patient.Communication>): communication c return FHIR.Patient.Communication{ id: c.id, extension: c.extension, language: c.language, preferred: c.preferred }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="87"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="PatientLink"/>
</extension>
<extension url="statement">
<valueString
value="define function PatientLink(link List<FHIR.Patient.Link>): link l return FHIR.Patient.Link{ id: l.id, extension: l.extension, modifierExtension: l.modifierExtension, other: l.other, type: l.type }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="88"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationResource"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationResource(medication Medication, profileURLs List<FHIR.canonical>): medication m return Medication{ id: FHIR.id {value: 'LCR-' + m.id}, meta: MetaElement(m, profileURLs), extension: m.extension, code: m.code, status: m.status, manufacturer: m.manufacturer, form: m.form, amount: m.amount, ingredient: MedicationIngredient(m.ingredient), batch: MedicationBatch(m.batch) }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="89"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationIngredient"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationIngredient(ingredient List<FHIR.Medication.Ingredient>): ingredient i return FHIR.Medication.Ingredient{ item: i.item, strength: i.strength }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="90"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="MedicationBatch"/>
</extension>
<extension url="statement">
<valueString
value="define function MedicationBatch(batch FHIR.Medication.Batch): batch b return FHIR.Medication.Batch{ lotNumber: b.lotNumber, expirationDate: b.expirationDate }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="91"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="GetMedicationFrom"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetMedicationFrom"(choice Choice<FHIR.CodeableConcept, FHIR.Reference>): case when choice is FHIR.Reference then GetMedication(choice as FHIR.Reference) else null end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="92"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</extension>
<extension url="name">
<valueString value="GetMedication"/>
</extension>
<extension url="statement">
<valueString
value="define function "GetMedication"(reference Reference): singleton from ( [Medication] Medications where Medications.id = NHSNHelpers.GetId(reference.reference) )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="93"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="SpecimenResource"/>
</extension>
<extension url="statement">
<valueString
value="define function SpecimenResource(specimen Specimen, profileURLs List<FHIR.canonical>): specimen s return Specimen{ id: FHIR.id {value: 'LCR-' + s.id}, meta: MetaElement(s, profileURLs), extension: s.extension, identifier: s.identifier, accessionIdentifier: s.accessionIdentifier, status: s.status, type: s.type, subject: s.subject, receivedTime: s.receivedTime, parent: s.parent, request: s.request, collection: SpecimenCollection(s.collection), processing: SpecimenProcessing(s.processing), container: SpecimenContainer(s.container), condition: s.condition, note: s.note }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="94"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="SpecimenCollection"/>
</extension>
<extension url="statement">
<valueString
value="define function SpecimenCollection(collection FHIR.Specimen.Collection): collection c return FHIR.Specimen.Collection{ collector: c.collector, collected: c.collected, "duration": c."duration", quantity: c.quantity, method: c.method, bodySite: c.bodySite, fastingStatus: c.fastingStatus }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="95"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="SpecimenProcessing"/>
</extension>
<extension url="statement">
<valueString
value="define function SpecimenProcessing(processing List<FHIR.Specimen.Processing>): processing p return FHIR.Specimen.Processing{ description: p.description, procedure: p.procedure, additive: p.additive, time: p.time }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="96"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SharedResourceCreation"/>
</extension>
<extension url="name">
<valueString value="SpecimenContainer"/>
</extension>
<extension url="statement">
<valueString
value="define function SpecimenContainer(container List<FHIR.Specimen.Container>): container c return FHIR.Specimen.Container{ description: c.description, type: c.type, capacity: c.capacity, specimenQuantity: c.specimenQuantity, additive: c.additive }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="97"/>
</extension>
</extension>
<name value="EffectiveDataRequirements"/>
<status value="active"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="module-definition"/>
</coding>
</type>
<relatedArtifact>
<type value="depends-on"/>
<display value="FHIR model information"/>
<resource
value="http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRHelpers"/>
<resource
value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library NHSNHelpers"/>
<resource
value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNHelpers|0.0.002"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library SharedResource"/>
<resource
value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/SharedResourceCreation|0.1.010"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system ActCode"/>
<resource
value="http://terminology.hl7.org/CodeSystem/v3-ActCode|9.0.0"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system MedicationRequest Category"/>
<resource
value="http://terminology.hl7.org/CodeSystem/medicationrequest-category|1.0.0"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system SNOMEDCT"/>
<resource value="http://snomed.info/sct"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system Observation Category"/>
<resource
value="http://terminology.hl7.org/CodeSystem/observation-category|1.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system LOINC"/>
<resource value="http://loinc.org"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system V2-0074"/>
<resource
value="http://terminology.hl7.org/CodeSystem/v2-0074|2.5.0"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system Condition Category"/>
<resource
value="http://terminology.hl7.org/CodeSystem/condition-category|1.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Encounter Inpatient"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
</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|20210611"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Observation Services"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143|20210611"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set NHSN Inpatient Encounter Class Codes"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.274"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display
value="Value set Inpatient, Emergency, and Observation Locations"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.265"/>
</relatedArtifact>
<parameter>
<name value="Measurement Period"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<type value="Period"/>
</parameter>
<parameter>
<name value="SDE Encounter"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</parameter>
<parameter>
<name value="SDE Medication Request"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="MedicationRequest"/>
</parameter>
<parameter>
<name value="SDE Coverage"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Coverage"/>
</parameter>
<parameter>
<name value="SDE Procedure"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Procedure"/>
</parameter>
<parameter>
<name value="SDE IP Encounters"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</parameter>
<parameter>
<name value="SDE Device"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Device"/>
</parameter>
<parameter>
<name value="SDE Observation Lab Category"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Observation"/>
</parameter>
<parameter>
<name value="SDE Observation Vital Signs Category"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Observation"/>
</parameter>
<parameter>
<name value="SDE DiagnosticReport Others"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="DiagnosticReport"/>
</parameter>
<parameter>
<name value="SDE Medication Administration"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="MedicationAdministration"/>
</parameter>
<parameter>
<name value="SDE Observation Category"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Observation"/>
</parameter>
<parameter>
<name value="SDE Condition"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Condition"/>
</parameter>
<parameter>
<name value="Initial Population"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Encounter"/>
</parameter>
<parameter>
<name value="SDE DiagnosticReport Lab"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="DiagnosticReport"/>
</parameter>
<parameter>
<name value="SDE Location"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Location"/>
</parameter>
<parameter>
<name value="SDE Service Request"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="ServiceRequest"/>
</parameter>
<parameter>
<name value="SDE DiagnosticReport Note"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="DiagnosticReport"/>
</parameter>
<parameter>
<name value="SDE Minimal Patient"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Patient"/>
</parameter>
<parameter>
<name value="SDE Medication"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Medication"/>
</parameter>
<parameter>
<name value="SDE Specimen"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Specimen"/>
</parameter>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="type"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="class"/>
<mustSupport value="classHistory"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="type"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="class"/>
<mustSupport value="classHistory"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292|20210611"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="type"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="class"/>
<mustSupport value="classHistory"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143|20210611"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="class"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="classHistory"/>
<mustSupport value="type"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="class"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.274"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="class"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="classHistory"/>
<mustSupport value="type"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="class"/>
<code>
<system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
<code value="EMER"/>
<display value="emergency"/>
</code>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="class"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="classHistory"/>
<mustSupport value="type"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
<codeFilter>
<path value="class"/>
<code>
<system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
<code value="OBSENC"/>
<display value="observation encounter"/>
</code>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
<mustSupport value="status"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="statusHistory"/>
<mustSupport value="class"/>
<mustSupport value="classHistory"/>
<mustSupport value="type"/>
<mustSupport value="serviceType"/>
<mustSupport value="priority"/>
<mustSupport value="subject"/>
<mustSupport value="length"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="diagnosis"/>
<mustSupport value="account"/>
<mustSupport value="hospitalization"/>
<mustSupport value="location"/>
<mustSupport value="partOf"/>
</dataRequirement>
<dataRequirement>
<type value="Location"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="status"/>
<mustSupport value="operationalStatus"/>
<mustSupport value="name"/>
<mustSupport value="alias"/>
<mustSupport value="description"/>
<mustSupport value="mode"/>
<mustSupport value="type"/>
<mustSupport value="telecom"/>
<mustSupport value="address"/>
<mustSupport value="physicalType"/>
<mustSupport value="position"/>
<mustSupport value="managingOrganization"/>
<mustSupport value="partOf"/>
<mustSupport value="hoursOfOperation"/>
<mustSupport value="availabilityExceptions"/>
<mustSupport value="endpoint"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="authoredOn"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="status"/>
<mustSupport value="statusReason"/>
<mustSupport value="intent"/>
<mustSupport value="category"/>
<mustSupport value="priority"/>
<mustSupport value="doNotPerform"/>
<mustSupport value="reported"/>
<mustSupport value="medication"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="requester"/>
<mustSupport value="recorder"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="instantiatesCanonical"/>
<mustSupport value="instantiatesUri"/>
<mustSupport value="courseOfTherapyType"/>
<mustSupport value="dosageInstruction"/>
</dataRequirement>
<dataRequirement>
<type value="Coverage"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Coverage"/>
<mustSupport value="period"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="status"/>
<mustSupport value="type"/>
<mustSupport value="policyHolder"/>
<mustSupport value="subscriber"/>
<mustSupport value="subscriberId"/>
<mustSupport value="beneficiary"/>
<mustSupport value="dependent"/>
<mustSupport value="relationship"/>
<mustSupport value="payor"/>
<mustSupport value="class"/>
<mustSupport value="order"/>
<mustSupport value="network"/>
<mustSupport value="subrogation"/>
<mustSupport value="contract"/>
</dataRequirement>
<dataRequirement>
<type value="Procedure"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
<mustSupport value="performed"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="basedOn"/>
<mustSupport value="partOf"/>
<mustSupport value="status"/>
<mustSupport value="category"/>
<mustSupport value="code"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="location"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="bodySite"/>
</dataRequirement>
<dataRequirement>
<type value="Device"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Device"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="status"/>
<mustSupport value="expirationDate"/>
<mustSupport value="lotNumber"/>
<mustSupport value="serialNumber"/>
<mustSupport value="modelNumber"/>
<mustSupport value="partNumber"/>
<mustSupport value="type"/>
<mustSupport value="patient"/>
<mustSupport value="parent"/>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="partOf"/>
<mustSupport value="status"/>
<mustSupport value="category"/>
<mustSupport value="code"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="effective"/>
<mustSupport value="issued"/>
<mustSupport value="value"/>
<mustSupport value="dataAbsentReason"/>
<mustSupport value="interpretation"/>
<mustSupport value="bodySite"/>
<mustSupport value="method"/>
<mustSupport value="specimen"/>
<mustSupport value="referenceRange"/>
<mustSupport value="hasMember"/>
<mustSupport value="derivedFrom"/>
<mustSupport value="component"/>
<mustSupport value="focus"/>
<mustSupport value="performer"/>
<mustSupport value="note"/>
<mustSupport value="device"/>
</dataRequirement>
<dataRequirement>
<type value="DiagnosticReport"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
<mustSupport value="category"/>
<mustSupport value="effective"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="basedOn"/>
<mustSupport value="status"/>
<mustSupport value="code"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="issued"/>
<mustSupport value="performer"/>
<mustSupport value="resultsInterpreter"/>
<mustSupport value="specimen"/>
<mustSupport value="result"/>
<mustSupport value="conclusion"/>
<mustSupport value="conclusionCode"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="effective"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="instantiates"/>
<mustSupport value="partOf"/>
<mustSupport value="status"/>
<mustSupport value="statusReason"/>
<mustSupport value="category"/>
<mustSupport value="medication"/>
<mustSupport value="subject"/>
<mustSupport value="context"/>
<mustSupport value="supportingInformation"/>
<mustSupport value="performer"/>
<mustSupport value="reasonCode"/>
<mustSupport value="reasonReference"/>
<mustSupport value="request"/>
<mustSupport value="device"/>
<mustSupport value="note"/>
<mustSupport value="dosage"/>
<mustSupport value="eventHistory"/>
</dataRequirement>
<dataRequirement>
<type value="Condition"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="clinicalStatus"/>
<mustSupport value="verificationStatus"/>
<mustSupport value="category"/>
<mustSupport value="code"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="onset"/>
<mustSupport value="abatement"/>
<mustSupport value="recordedDate"/>
<mustSupport value="encounter.id"/>
</dataRequirement>
<dataRequirement>
<type value="ServiceRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
<mustSupport value="authoredOn"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="basedOn"/>
<mustSupport value="status"/>
<mustSupport value="intent"/>
<mustSupport value="category"/>
<mustSupport value="priority"/>
<mustSupport value="doNotPerform"/>
<mustSupport value="code"/>
<mustSupport value="quantity"/>
<mustSupport value="subject"/>
<mustSupport value="encounter"/>
<mustSupport value="occurrence"/>
<mustSupport value="asNeeded"/>
<mustSupport value="requester"/>
<mustSupport value="specimen"/>
</dataRequirement>
<dataRequirement>
<type value="Patient"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<mustSupport value="id"/>
<mustSupport value="identifier"/>
<mustSupport value="active"/>
<mustSupport value="name"/>
<mustSupport value="telecom"/>
<mustSupport value="gender"/>
<mustSupport value="birthDate"/>
<mustSupport value="deceased"/>
<mustSupport value="address"/>
<mustSupport value="maritalStatus"/>
<mustSupport value="multipleBirth"/>
<mustSupport value="photo"/>
<mustSupport value="contact"/>
<mustSupport value="communication"/>
<mustSupport value="generalPractitioner"/>
<mustSupport value="managingOrganization"/>
<mustSupport value="link"/>
</dataRequirement>
<dataRequirement>
<type value="Medication"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="code"/>
<mustSupport value="status"/>
<mustSupport value="manufacturer"/>
<mustSupport value="form"/>
<mustSupport value="amount"/>
<mustSupport value="ingredient"/>
<mustSupport value="batch"/>
</dataRequirement>
<dataRequirement>
<type value="Specimen"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Specimen"/>
<mustSupport value="collection"/>
<mustSupport value="collection.collected"/>
<mustSupport value="id"/>
<mustSupport value="extension"/>
<mustSupport value="identifier"/>
<mustSupport value="accessionIdentifier"/>
<mustSupport value="status"/>
<mustSupport value="type"/>
<mustSupport value="subject"/>
<mustSupport value="receivedTime"/>
<mustSupport value="parent"/>
<mustSupport value="request"/>
<mustSupport value="processing"/>
<mustSupport value="container"/>
<mustSupport value="condition"/>
<mustSupport value="note"/>
</dataRequirement>
</Library>
</contained>
<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-effectiveDataRequirements">
<valueCanonical value="#effective-data-requirements"/>
</extension>
<extension
url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
<valueReference>🔗
<reference value="Device/cqf-tooling"/>
</valueReference>
</extension>
<url
value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Measure/NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
<identifier>
<system value="https://nhsnlink.org"/>
<value value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
</identifier>
<version value="1.0.0"/>
<name value="NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
<title value="NHSN dQM Acute Care Hospital Monthly Initial Population"/>
<status value="draft"/>
<experimental value="false"/>
<date value="2025-09-28T10:20:19-05:00"/>
<publisher value="CDC National Healthcare Safety Network (NHSN)"/>
<contact>
<name value="CDC National Healthcare Safety Network (NHSN)"/>
<telecom>
<system value="url"/>
<value value="http://www.cdc.gov/nhsn"/>
</telecom>
<telecom>
<system value="email"/>
<value value="nhsn@cdc.gov"/>
</telecom>
</contact>
<description
value="The Acute Care Hospital Monthly Initial Population includes all encounters for patients of any age in an ED, observation, or inpatient location or all encounters for patients of any age with an ED, observation, inpatient, or short stay status during the measurement period."/>
<jurisdiction>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
</coding>
</jurisdiction>
<copyright
value="Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets."/>
<relatedArtifact>
<type value="documentation"/>
<display
value="https://www.cdc.gov/nhsn/index.html [placeholder for link to protocol on CDC website]"/>
<url value="https://www.cdc.gov/nhsn/index.html"/>
<document>
<url value="https://www.cdc.gov/nhsn/index.html"/>
</document>
</relatedArtifact>
<library
value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNAcuteCareHospitalMonthlyInitialPopulation"/>
<disclaimer
value="This performance measure is not a clinical guideline, does not establish a standard of medical care and has not been tested for all potential applications. THE MEASURES AND SPECIFICATIONS ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND. This measure and specifications are subject to further revisions."/>
<scoring>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
<code value="cohort"/>
<display value="Cohort"/>
</coding>
</scoring>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
<code value="outcome"/>
<display value="Outcome"/>
</coding>
</type>
<rationale
value="The NHSN Acute Care Hospital Monthly dQM allows for facilities to report line level patient data electronically to NHSN for the following modules that are reported monthly: Glycemic Control, Hypoglycemia; Healthcare facility-onset, antibiotic-Treated Clostridioides difficile (C. difficile) Infection (HT-CDI); Hospital-Onset Bacteremia & Fungemia (HOB); Venous Thromboembolism (VTE); Late Onset Sepsis / Meningitis. *Please see [Acute Care / Critical Access Hospitals (ACH) | NHSN | CDC](https://www.cdc.gov/nhsn/acute-care-hospital/index.html) for the individual measure protocols."/>
<group>
<population id="initial-population">
<code>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-population"/>
<code value="initial-population"/>
<display value="Initial Population"/>
</coding>
</code>
<description
value="All encounters for patients of any age in an ED, observation, or inpatient location or all encounters for patients of any age with an ED, observation, inpatient, or short stay status during the measurement period."/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Initial Population"/>
</criteria>
</population>
</group>
<supplementalData id="sde-condition">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Condition"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Condition"/>
</criteria>
</supplementalData>
<supplementalData id="sde-device">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Device"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Device"/>
</criteria>
</supplementalData>
<supplementalData id="sde-diagnosticreport-lab">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE DiagnosticReport Lab"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE DiagnosticReport Lab"/>
</criteria>
</supplementalData>
<supplementalData id="sde-diagnosticreport-note">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE DiagnosticReport Note"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE DiagnosticReport Note"/>
</criteria>
</supplementalData>
<supplementalData id="sde-diagnosticreport-others">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE DiagnosticReport Others"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE DiagnosticReport Others"/>
</criteria>
</supplementalData>
<supplementalData id="sde-encounter">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Encounter"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Encounter"/>
</criteria>
</supplementalData>
<supplementalData id="sde-location">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Location"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Location"/>
</criteria>
</supplementalData>
<supplementalData id="sde-medication-administration">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Medication Administration"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Medication Administration"/>
</criteria>
</supplementalData>
<supplementalData id="sde-medication-request">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Medication Request"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Medication Request"/>
</criteria>
</supplementalData>
<supplementalData id="sde-medication">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Medication"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Medication"/>
</criteria>
</supplementalData>
<supplementalData id="sde-observation-lab-category">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Observation Lab Category"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Observation Lab Category"/>
</criteria>
</supplementalData>
<supplementalData id="sde-observation-vital-signs-category">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Observation Vital Signs Category"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Observation Vital Signs Category"/>
</criteria>
</supplementalData>
<supplementalData id="sde-observation-category">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Observation Category"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Observation Category"/>
</criteria>
</supplementalData>
<supplementalData id="sde-coverage">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Coverage"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Coverage"/>
</criteria>
</supplementalData>
<supplementalData id="sde-procedure">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Procedure"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Procedure"/>
</criteria>
</supplementalData>
<supplementalData id="sde-specimen">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Specimen"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Specimen"/>
</criteria>
</supplementalData>
<supplementalData id="sde-service-request">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Service Request"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Service Request"/>
</criteria>
</supplementalData>
<supplementalData id="sde-minimal-patient">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE Minimal Patient"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE Minimal Patient"/>
</criteria>
</supplementalData>
<supplementalData id="sde-ip-encounters">
<usage>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
</coding>
</usage>
<description value="SDE IP Encounters"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="SDE IP Encounters"/>
</criteria>
</supplementalData>
</Measure>