CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG
2.0.0-cibuild - Release 2 ci-build United States of America flag

CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG - Local Development build (v2.0.0-cibuild) 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: 1

Raw xml | Download


<Library xmlns="http://hl7.org/fhir">
  <id value="NHSNLongTermCareMonthlyInitialPopulation"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
        

        
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">NHSNLongTermCareMonthlyInitialPopulation</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">2.0.0-cibuild</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="Library-NHSNLongTermCareMonthlyInitialPopulation.html">NHSNLongTermCareMonthlyInitialPopulation</a></td>
        </tr>
        

        

        

        
        <tr>
            <th scope="row"><b>Status: </b></th>
            <td style="padding-left: 4px;">draft</td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="http://terminology.hl7.org/6.5.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>logic-library</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2025-11-10 16:09:20+0000</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">CDC National Healthcare Safety Network (NHSN)</td>
        </tr>
        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Jurisdiction: </b></th>
            <td style="padding-left: 4px;">US</td>
        </tr>
        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Related Artifacts: </b></th>
            <td style="padding-left: 4px;">
                
                
                
                <p><b>Dependencies</b></p>
                <ul>
                  
                    <li><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></li>
                  
                    <li><code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2</code></li>
                  
                    <li><code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNHelpers|0.0.002</code></li>
                  
                    <li><code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/SharedResourceCreation|0.1.010</code></li>
                  
                    <li><a href="http://terminology.hl7.org/6.5.0/CodeSystem-observation-category.html">Observation Category Codesversion: null1.0.1)</a></li>
                  
                </ul>
                
                
                
                
                
            </td>
        </tr>
        

        
        <tr>
          <th scope="row"><b>Parameters: </b></th>
          <td style="padding-left: 4px;">
            <table class="grid-dict">
              <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>
              
                <tr><th>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>In</th></tr>
              
                <tr><th>Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>
              
                <tr><th>Initial Population</th><th>Encounter</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Coverage</th><th>Coverage</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE IP Encounters</th><th>Encounter</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Medication Administration</th><th>MedicationAdministration</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Medication Request</th><th>MedicationRequest</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Medication</th><th>Medication</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Observation Lab Category</th><th>Observation</th><th>0</th><th>*</th><th>Out</th></tr>
              
                <tr><th>SDE Minimal Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>
              
                <tr><th>SDE Specimen</th><th>Specimen</th><th>0</th><th>*</th><th>Out</th></tr>
              
            </table>
          </td>
        </tr>
        

        
        <tr>
          <th scope="row"><b>Data Requirements:</b></th>
          <td style="padding-left: 4px;">
            <table class="grid-dict">
              <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>
              
                <tr>
                  <th>Patient</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Patient</th>
                  <th>;;;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>Encounter</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Encounter</th>
                  <th>;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>Coverage</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Coverage</th>
                  <th>;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>MedicationAdministration</th>
                  <th>http://hl7.org/fhir/StructureDefinition/MedicationAdministration</th>
                  <th>;;;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>MedicationRequest</th>
                  <th>http://hl7.org/fhir/StructureDefinition/MedicationRequest</th>
                  <th>;;;;;;;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>Medication</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Medication</th>
                  <th>;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>Observation</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Observation</th>
                  <th>;;;;;;;;;;;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
                <tr>
                  <th>Specimen</th>
                  <th>http://hl7.org/fhir/StructureDefinition/Specimen</th>
                  <th>;;;;;;;;;;;;;;;;</th>
                  <th>
                    
                  </th>
                </tr>
              
            </table>
          </td>
        </tr>
        

        
        
        <tr>
          <td colspan="2">
            <table>
              <tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
              <tr><td><pre><code class="language-cql">library NHSNLongTermCareMonthlyInitialPopulation version '2.0.0-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' 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 PatientResource(p,
  {FHIR.canonical{value: ''}})

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{
    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,
    contact: SharedResource.PatientContact(p.contact),
    communication: SharedResource.PatientCommunication(p.communication),
    generalPractitioner: p.generalPractitioner,
    managingOrganization: p.managingOrganization,
    link: PatientLink(p.link)
  }</code></pre></td></tr>
            </table>
          </td>
        </tr>
        
        
        
    </table>
</div>
</div>
  </text>
  <contained>
    <Parameters>
      <id value="options"/>
      <parameter>
        <name value="translatorVersion"/>
        <valueString value="3.11.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>
  <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/Library/NHSNLongTermCareMonthlyInitialPopulation"/>
  <version value="2.0.0-cibuild"/>
  <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="2025-11-10T16:09:20+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="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 Observation Category"/>
    <resource
              value="http://terminology.hl7.org/CodeSystem/observation-category|1.0.1"/>
  </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"/>
    <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="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="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="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="performer"/>
    <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"/>
    <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>
  <content>
    <contentType value="text/cql"/>
    <data
          value="bGlicmFyeSBOSFNOT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NZXRhRWxlbWVudChwLCBwcm9maWxlVVJMcyksCiAgICBleHRlbnNpb246IEdldFBhdGllbnRFeHRlbnNpb25zKHApLAogICAgaWRlbnRpZmllcjogcC5pZGVudGlmaWVyLAogICAgYWN0aXZlOiBwLmFjdGl2ZSwKICAgIG5hbWU6IFNoYXJlZFJlc291cmNlLlBhdGllbnROYW1lKHAubmFtZSksCiAgICB0ZWxlY29tOiBTaGFyZWRSZXNvdXJjZS5QYXRpZW50VGVsZWNvbShwLnRlbGVjb20pLAogICAgZ2VuZGVyOiBwLmdlbmRlciwKICAgIGJpcnRoRGF0ZTogcC5iaXJ0aERhdGUsCiAgICBkZWNlYXNlZDogcC5kZWNlYXNlZCwKICAgIGFkZHJlc3M6IFNoYXJlZFJlc291cmNlLlBhdGllbnRBZGRyZXNzKHAuYWRkcmVzcyksCiAgICBtYXJpdGFsU3RhdHVzOiBwLm1hcml0YWxTdGF0dXMsCiAgICBtdWx0aXBsZUJpcnRoOiBwLm11bHRpcGxlQmlydGgsCiAgICBwaG90bzogcC5waG90bywKICAgIGNvbnRhY3Q6IFNoYXJlZFJlc291cmNlLlBhdGllbnRDb250YWN0KHAuY29udGFjdCksCiAgICBjb21tdW5pY2F0aW9uOiBTaGFyZWRSZXNvdXJjZS5QYXRpZW50Q29tbXVuaWNhdGlvbihwLmNvbW11bmljYXRpb24pLAogICAgZ2VuZXJhbFByYWN0aXRpb25lcjogcC5nZW5lcmFsUHJhY3RpdGlvbmVyLAogICAgbWFuYWdpbmdPcmdhbml6YXRpb246IHAubWFuYWdpbmdPcmdhbml6YXRpb24sCiAgICBsaW5rOiBQYXRpZW50TGluayhwLmxpbmspCiAgfQ=="/>
    <url
         value="http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library-NHSNLongTermCareMonthlyInitialPopulation.cql"/>
  </content>
</Library>