CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG
3.0.0 - Release 3 - draft United States of America flag

CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG - Local Development build (v3.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: NHSNLongTermCareMonthlyInitialPopulation - XML Representation

Page standards status: Trial-use Maturity Level: 2

Raw xml | Download


<Library xmlns="http://hl7.org/fhir">
  <id value="NHSNLongTermCareMonthlyInitialPopulation"/>
  <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">Metadata</th>


</tr>



<tr>


<th scope="row" class="row-header">Version</th>



<td class="content-container">3.0.0</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">Jurisdiction</th>



<td class="content-container">
    US from <a href="https://en.wikipedia.org/wiki/ISO_3166-2">urn:iso:std:iso:3166</a> 


</td>


</tr>








<tr>


<th scope="row" class="row-header">Steward (Publisher)</th>



<td class="content-container">CDC National Healthcare Safety Network (NHSN)</td>


</tr>



<tr>


<th scope="row" class="row-header">Steward Contact</th>



<td class="content-container">CDC National Healthcare Safety Network (NHSN)</td>


</tr>












<tr>


<th scope="row" class="row-header">Type</th>



<td class="content-container">
    logic-library from <a href="http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a> 


</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-cibuild</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/SharedResourceCreation|0.1.010-cibuild</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/7.1.0/CodeSystem-observation-category.html">Observation Category Codes</a> version: 2.0.0
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/observation-category|2.0.0</tt>
    
    
    
  </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/>        
  
   
   
   
  </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>: period, id, extension, identifier, status, statusHistory, class, classHistory, type, subject, length, reasonCode, reasonReference, hospitalization, partOf
    <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, subscriber
    <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, reasonCode, reasonReference, request, dosage, eventHistory
    <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, 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>: 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, form, amount, ingredient
    <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>: category, effective, id, extension, basedOn, partOf, status, code, subject, focus, encounter, issued, value, dataAbsentReason, interpretation, note, bodySite, method, specimen, device, referenceRange, hasMember, derivedFrom, component
    <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
    <br/>
   
   
  </td>
</tr>

<tr>


<th colspan="2" scope="row" class="row-header"><a name="parameters"> </a>Parameters</th>


</tr>

<tr>
  

<th scope="row" class="row-header"/>


  <td class="content-container">
    <table>
      <thead>
        <tr>
          <td><em>Name</em></td>
          <td><em>Use</em></td>
          <td><em>Card.</em></td>
          <td><em>Type</em></td>
          <td><em>Documentation</em></td>
        </tr>
      </thead>
      <tbody>
      
        <tr>
          <td>Measurement Period</td>
          <td>In</td>
          <td>0..1</td>
          <td>Period</td>
          <td/>
        </tr>
      
        <tr>
          <td>Patient</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Patient</td>
          <td/>
        </tr>
      
        <tr>
          <td>Initial Population</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Coverage</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Coverage</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE IP Encounters</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Medication Administration</td>
          <td>Out</td>
          <td>0..*</td>
          <td>MedicationAdministration</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Medication Request</td>
          <td>Out</td>
          <td>0..*</td>
          <td>MedicationRequest</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Medication</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Medication</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Observation Lab Category</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Observation</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Minimal Patient</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Patient</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Specimen</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Specimen</td>
          <td/>
        </tr>
      
      </tbody>
    </table>
  </td>
</tr>








  <tr>


<th colspan="2" scope="row" class="row-header">Library Content</th>


</tr>
  
    
    <tr>
      <th scope="row" class="row-header">CQL Content</th>
      <td>
        <a name="cql-content"> </a>
        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">library NHSNLongTermCareMonthlyInitialPopulation version '2.0.1-cibuild'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.2' called FHIRHelpers
include NHSNHelpers version '0.0.002' called NHSNHelpers
include SharedResourceCreation version '0.1.010-cibuild' called SharedResource 

codesystem &quot;Observation Category&quot;: 'http://terminology.hl7.org/CodeSystem/observation-category'

//code for Observation Category
code &quot;laboratory&quot;: 'laboratory' from &quot;Observation Category&quot; display 'Laboratory'

parameter &quot;Measurement Period&quot; 
    default Interval[@2025-01-01T00:00:00.000Z, @2025-01-31T23:59:59.000Z)

context Patient 

define &quot;Initial Population&quot;:
  [Encounter] QualifyingEncounters
  where QualifyingEncounters.period overlaps &quot;Measurement Period&quot; 

define &quot;SDE Coverage&quot;: 
	[Coverage] Coverages
  where exists(
    &quot;Initial Population&quot; IP
    where Coverages.period overlaps IP.period)
  return CoverageResource(Coverages,
  {FHIR.canonical{value: ''}})

define &quot;SDE IP Encounters&quot;:
  &quot;Initial Population&quot; IP
  return EncounterResource(IP, 
  {FHIR.canonical{value: ''}})
 
define &quot;SDE Medication Administration&quot;:
  [MedicationAdministration] MedicationAdministrations 
  where exists(
    &quot;Initial Population&quot; IP
    where NHSNHelpers.&quot;Normalize Interval&quot;(MedicationAdministrations.effective) overlaps IP.period)
  return MedicationAdministrationResource(MedicationAdministrations,
  {FHIR.canonical{value: ''}})
 
define &quot;SDE Medication Request&quot;:
  [MedicationRequest] MedicationRequests 
  where exists(
    &quot;Initial Population&quot; IP
    where MedicationRequests.authoredOn during IP.period)
  return MedicationRequestResource(MedicationRequests,
  {FHIR.canonical{value: ''}})

define &quot;SDE Medication&quot;:
  (&quot;SDE Medication Request&quot;
  union &quot;SDE Medication Administration&quot;) MedReqOrAdmin
  where MedReqOrAdmin.medication is FHIR.Reference
  and exists(&quot;Initial Population&quot;) //No longer need to check for timing here because it's checked in SDE Medication Request/Administriation
  return MedicationResource(GetMedicationFrom(MedReqOrAdmin.medication),
  {FHIR.canonical{value: ''}})

define &quot;SDE Observation Lab Category&quot;:
  [Observation] Observations 
  where (exists(Observations.category Category where Category ~ &quot;laboratory&quot;))
    and exists(
      &quot;Initial Population&quot; IP
      where NHSNHelpers.&quot;Normalize Interval&quot;(Observations.effective) overlaps IP.period)
  return ObservationLabResource(Observations,
  {FHIR.canonical{value: ''}})

define &quot;SDE Minimal Patient&quot;:
  Patient p
  return SharedResource.PatientResource(p,
  {FHIR.canonical{value: 'http://www.cdc.gov/nhsn/fhirportal/dqm/ig/StructureDefinition/cross-measure-patient'}})

define &quot;SDE Specimen&quot;:
  [Specimen] Specimens
  where exists(
    &quot;Initial Population&quot; IP
    where NHSNHelpers.&quot;Normalize Interval&quot;(Specimens.collection.collected) overlaps IP.period
  )
  return SharedResource.SpecimenResource(Specimens,
  {FHIR.canonical{value: ''}})

//
//Functions
//
define function &quot;GetMedicationFrom&quot;(choice Choice&lt;FHIR.CodeableConcept, FHIR.Reference&gt;):
  case
    when choice is FHIR.Reference then
      GetMedication(choice as FHIR.Reference)
    else
      null
  end

define function &quot;GetMedication&quot;(reference Reference):
  singleton from (
    [Medication] Medications
    where Medications.id = NHSNHelpers.GetId(reference.reference)
  )

//
//Measure Specific Resource Creation Functions
//
define function CoverageResource(coverage Coverage, profileURLs List&lt;FHIR.canonical&gt;):
  coverage c
  return Coverage{
    id: FHIR.id{value: 'LCR-' + c.id},
    meta: SharedResource.MetaElement(c, profileURLs),
    extension: c.extension,
    status: c.status,
    type: c.type,
    subscriber: c.subscriber,
    period: c.period
  }

define function EncounterHospitalization(hospitalization FHIR.Encounter.Hospitalization):
  hospitalization h
  return FHIR.Encounter.Hospitalization{
    extension: h.extension,
    origin: h.origin,
    admitSource: h.admitSource,
    reAdmission: h.reAdmission,
    dischargeDisposition: h.dischargeDisposition
  }

define function EncounterResource(encounter Encounter, profileURLs List&lt;FHIR.canonical&gt;):
  encounter e
  return Encounter{
    id: FHIR.id{value: 'LCR-' + e.id},
    meta: SharedResource.MetaElement(e, profileURLs),
    extension: e.extension,
    identifier: SharedResource.EncounterIdentifier(e.identifier),
    status: e.status,
    statusHistory: SharedResource.EncounterStatusHistory(e.statusHistory),
    class: e.class,
    classHistory: SharedResource.EncounterClassHistory(e.classHistory),
    type: e.type,
    subject: e.subject,
    period: e.period,
    length: e.length,
    reasonCode: e.reasonCode,
    reasonReference: e.reasonReference,
    hospitalization: EncounterHospitalization(e.hospitalization),
    partOf: e.partOf
  }

define function MedicationResource(medication Medication, profileURLs List&lt;FHIR.canonical&gt;):
  medication m
  return Medication{
    id: FHIR.id {value: 'LCR-' + m.id},
    meta: SharedResource.MetaElement(m, profileURLs),
    extension: m.extension,
    code: m.code,
    status: m.status,
    form: m.form,
    amount: m.amount,
    ingredient: SharedResource.MedicationIngredient(m.ingredient)
  }

define function MedicationAdministrationDosage(dosage FHIR.MedicationAdministration.Dosage):
  dosage d
  return FHIR.MedicationAdministration.Dosage{
    text: d.text,
    route: d.route,
    method: d.method,
    dose: d.dose
  }

define function MedicationAdministrationResource(medicationAdministration MedicationAdministration, profileURLs List&lt;FHIR.canonical&gt;):
  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: m.category,
    medication: m.medication,
    subject: m.subject,
    context: m.context,
    supportingInformation: m.supportingInformation,
    effective: m.effective,
    reasonCode: m.reasonCode,
    reasonReference: m.reasonReference,
    request: m.request,
    dosage: MedicationAdministrationDosage(m.dosage),
    eventHistory: m.eventHistory
  }

define function MedicationRequestDoseAndRate(doseAndRate List&lt;FHIR.Dosage.DoseAndRate&gt;):
  doseAndRate dR
  return FHIR.Dosage.DoseAndRate{
    type: dR.type,
    dose: dR.dose,
    rate: dR.rate
  }

define function MedicationRequestDosageInstruction(dosageInstruction List&lt;FHIR.Dosage&gt;):
  dosageInstruction dI
  return FHIR.Dosage{
    text: dI.text,
    timing: dI.timing,
    asNeeded: dI.asNeeded,
    route: dI.route,
    method: dI.method,
    doseAndRate: MedicationRequestDoseAndRate(dI.doseAndRate)
  }

define function MedicationRequestResource(medicationRequest MedicationRequest, profileURLs List&lt;FHIR.canonical&gt;):
  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: m.category,
    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: MedicationRequestDosageInstruction(m.dosageInstruction)
  }

define function ObservationLabCoding(coding List&lt;Coding&gt;):
  coding c
  return Coding{
    id: c.id,
    extension: c.extension,
    system: c.system,
    code: c.code
  }

define function ObservationLabCategory(category List&lt;CodeableConcept&gt;):
  category c
  return CodeableConcept{
    coding: ObservationLabCoding(c.coding),
    text: c.text
  }

define function ObservationLabResource(observation Observation, profileURLs List&lt;FHIR.canonical&gt;):
  observation o
  return Observation{
    id: FHIR.id {value: 'LCR-' + o.id},
    meta: SharedResource.MetaElement(o, profileURLs),
    extension: o.extension,
    basedOn: o.basedOn,
    partOf: o.partOf,
    status: o.status,
    category: ObservationLabCategory(o.category),
    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: SharedResource.ObservationComponent(o.component)
  }

define function &quot;GetPatientExtensions&quot;(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-tribal-affiliation'
    or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex'
    or E.url.value = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex'
  return E

define function PatientLink(link List&lt;FHIR.Patient.Link&gt;):
  link l
  return FHIR.Patient.Link{
    id: l.id,
    other: l.other,
    type: l.type
  }

/*define function PatientResource(patient Patient, profileURLs List&lt;FHIR.canonical&gt;):
  patient p
  return Patient{
    id: FHIR.id{value: 'LCR-' + p.id},
    meta: SharedResource.MetaElement(p, profileURLs),
    extension: GetPatientExtensions(p),
    identifier: p.identifier,
    active: p.active,
    name: SharedResource.PatientName(p.name),
    telecom: SharedResource.PatientTelecom(p.telecom),
    gender: p.gender,
    birthDate: p.birthDate,
    deceased: p.deceased,
    address: SharedResource.PatientAddress(p.address),
    maritalStatus: p.maritalStatus,
    multipleBirth: p.multipleBirth,
    photo: p.photo,
    generalPractitioner: p.generalPractitioner,
    managingOrganization: p.managingOrganization,
    link: PatientLink(p.link)
  }*/</code></pre>
      </td>
    </tr>
    
  

<tr>
  <th colspan="2" scope="row" class="row-header">Generated using version 0.5.6-cibuild of the sample-content-ig Liquid templates</th>
</tr>

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Parameters>
      <id value="options"/>
      <parameter>
        <name value="translatorVersion"/>
        <valueString value="3.27.0"/>
      </parameter>
      <parameter>
        <name value="option"/>
        <valueString value="EnableDateRangeOptimization"/>
      </parameter>
      <parameter>
        <name value="option"/>
        <valueString value="EnableAnnotations"/>
      </parameter>
      <parameter>
        <name value="option"/>
        <valueString value="EnableLocators"/>
      </parameter>
      <parameter>
        <name value="option"/>
        <valueString value="DisableListDemotion"/>
      </parameter>
      <parameter>
        <name value="option"/>
        <valueString value="DisableListPromotion"/>
      </parameter>
      <parameter>
        <name value="analyzeDataRequirements"/>
        <valueBoolean value="false"/>
      </parameter>
      <parameter>
        <name value="collapseDataRequirements"/>
        <valueBoolean value="true"/>
      </parameter>
      <parameter>
        <name value="compatibilityLevel"/>
        <valueString value="1.5"/>
      </parameter>
      <parameter>
        <name value="enableCqlOnly"/>
        <valueBoolean value="false"/>
      </parameter>
      <parameter>
        <name value="errorLevel"/>
        <valueString value="Info"/>
      </parameter>
      <parameter>
        <name value="signatureLevel"/>
        <valueString value="Overloads"/>
      </parameter>
      <parameter>
        <name value="validateUnits"/>
        <valueBoolean value="true"/>
      </parameter>
      <parameter>
        <name value="verifyOnly"/>
        <valueBoolean value="false"/>
      </parameter>
    </Parameters>
  </contained>
  <extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions">
    <valueReference>
      <reference value="#options"/>
    </valueReference>
  </extension>
  <url
       value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNLongTermCareMonthlyInitialPopulation"/>
  <version value="3.0.0"/>
  <name value="NHSNLongTermCareMonthlyInitialPopulation"/>
  <status value="draft"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
      <code value="logic-library"/>
    </coding>
  </type>
  <date value="2026-08-14T18:33:45+00: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>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
    </coding>
  </jurisdiction>
  <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-cibuild"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <display value="Code system Observation Category"/>
    <resource
              value="http://terminology.hl7.org/CodeSystem/observation-category|2.0.0"/>
  </relatedArtifact>
  <parameter>
    <name value="Measurement Period"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <type value="Period"/>
  </parameter>
  <parameter>
    <name value="Patient"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <type value="Patient"/>
  </parameter>
  <parameter>
    <name value="Initial Population"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Encounter"/>
  </parameter>
  <parameter>
    <name value="SDE Coverage"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Coverage"/>
  </parameter>
  <parameter>
    <name value="SDE IP Encounters"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Encounter"/>
  </parameter>
  <parameter>
    <name value="SDE Medication Administration"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="MedicationAdministration"/>
  </parameter>
  <parameter>
    <name value="SDE Medication Request"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="MedicationRequest"/>
  </parameter>
  <parameter>
    <name value="SDE Medication"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Medication"/>
  </parameter>
  <parameter>
    <name value="SDE Observation Lab Category"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Observation"/>
  </parameter>
  <parameter>
    <name value="SDE Minimal Patient"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <type value="Patient"/>
  </parameter>
  <parameter>
    <name value="SDE Specimen"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <type value="Specimen"/>
  </parameter>
  <dataRequirement>
    <type value="Patient"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
  </dataRequirement>
  <dataRequirement>
    <type value="Encounter"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
    <mustSupport value="period"/>
    <mustSupport value="id"/>
    <mustSupport value="extension"/>
    <mustSupport value="identifier"/>
    <mustSupport value="status"/>
    <mustSupport value="statusHistory"/>
    <mustSupport value="class"/>
    <mustSupport value="classHistory"/>
    <mustSupport value="type"/>
    <mustSupport value="subject"/>
    <mustSupport value="length"/>
    <mustSupport value="reasonCode"/>
    <mustSupport value="reasonReference"/>
    <mustSupport value="hospitalization"/>
    <mustSupport value="partOf"/>
  </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="subscriber"/>
  </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="reasonCode"/>
    <mustSupport value="reasonReference"/>
    <mustSupport value="request"/>
    <mustSupport value="dosage"/>
    <mustSupport value="eventHistory"/>
  </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="recorder"/>
    <mustSupport value="reasonCode"/>
    <mustSupport value="reasonReference"/>
    <mustSupport value="instantiatesCanonical"/>
    <mustSupport value="instantiatesUri"/>
    <mustSupport value="courseOfTherapyType"/>
    <mustSupport value="dosageInstruction"/>
  </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="form"/>
    <mustSupport value="amount"/>
    <mustSupport value="ingredient"/>
  </dataRequirement>
  <dataRequirement>
    <type value="Observation"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mustSupport value="category"/>
    <mustSupport value="effective"/>
    <mustSupport value="id"/>
    <mustSupport value="extension"/>
    <mustSupport value="basedOn"/>
    <mustSupport value="partOf"/>
    <mustSupport value="status"/>
    <mustSupport value="code"/>
    <mustSupport value="subject"/>
    <mustSupport value="focus"/>
    <mustSupport value="encounter"/>
    <mustSupport value="issued"/>
    <mustSupport value="value"/>
    <mustSupport value="dataAbsentReason"/>
    <mustSupport value="interpretation"/>
    <mustSupport value="note"/>
    <mustSupport value="bodySite"/>
    <mustSupport value="method"/>
    <mustSupport value="specimen"/>
    <mustSupport value="device"/>
    <mustSupport value="referenceRange"/>
    <mustSupport value="hasMember"/>
    <mustSupport value="derivedFrom"/>
    <mustSupport value="component"/>
  </dataRequirement>
  <dataRequirement>
    <type value="Specimen"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Specimen"/>
    <mustSupport value="collection"/>
    <mustSupport value="collection.collected"/>
  </dataRequirement>
  <content>
    <contentType value="text/cql"/>
    <data
          value="bGlicmFyeSBOSFNOTG9uZ1Rlcm1DYXJlTW9udGhseUluaXRpYWxQb3B1bGF0aW9uIHZlcnNpb24gJzIuMC4xLWNpYnVpbGQnCgp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwoKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMicgY2FsbGVkIEZISVJIZWxwZXJzCmluY2x1ZGUgTkhTTkhlbHBlcnMgdmVyc2lvbiAnMC4wLjAwMicgY2FsbGVkIE5IU05IZWxwZXJzCmluY2x1ZGUgU2hhcmVkUmVzb3VyY2VDcmVhdGlvbiB2ZXJzaW9uICcwLjEuMDEwLWNpYnVpbGQnIGNhbGxlZCBTaGFyZWRSZXNvdXJjZSAKCmNvZGVzeXN0ZW0gIk9ic2VydmF0aW9uIENhdGVnb3J5IjogJ2h0dHA6Ly90ZXJtaW5vbG9neS5obDcub3JnL0NvZGVTeX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CiAgICBnZW5kZXI6IHAuZ2VuZGVyLAogICAgYmlydGhEYXRlOiBwLmJpcnRoRGF0ZSwKICAgIGRlY2Vhc2VkOiBwLmRlY2Vhc2VkLAogICAgYWRkcmVzczogU2hhcmVkUmVzb3VyY2UuUGF0aWVudEFkZHJlc3MocC5hZGRyZXNzKSwKICAgIG1hcml0YWxTdGF0dXM6IHAubWFyaXRhbFN0YXR1cywKICAgIG11bHRpcGxlQmlydGg6IHAubXVsdGlwbGVCaXJ0aCwKICAgIHBob3RvOiBwLnBob3RvLAogICAgZ2VuZXJhbFByYWN0aXRpb25lcjogcC5nZW5lcmFsUHJhY3RpdGlvbmVyLAogICAgbWFuYWdpbmdPcmdhbml6YXRpb246IHAubWFuYWdpbmdPcmdhbml6YXRpb24sCiAgICBsaW5rOiBQYXRpZW50TGluayhwLmxpbmspCiAgfSov"/>
    <url
         value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/NHSNLongTermCareMonthlyInitialPopulation.cql"/>
  </content>
</Library>