Situational Awareness for Novel Epidemic Response
1.0.0 - STU Release

This page is part of the Situational Awareness for Novel Epidemic Response (v1.0.0: STU 1) based on FHIR R4. This is the current published version. For a full list of available versions, see the Directory of published versions

: Computable CDC Patient Impact and Hospital Capacity - TTL Representation

Raw ttl | Download


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

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

 a fhir:Measure;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "ComputableCDCPatientImpactAndHospitalCapacity"];
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/PublicHealthMeasure";
       fhir:index 0;
       fhir:link <http://hl7.org/fhir/uv/saner/StructureDefinition/PublicHealthMeasure>     ]
  ];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h3>Patient Impact and Hospital Capacity</h3><p>The url for this measure is <code>http://hl7.org/fhir/uv/saner/Measure/ComputableCDCPatientImpactAndHospitalCapacity</code>.</p><p>This measure demonstrates automated reporting on bed availability and use at a facility location based on CDC/NHSN reporting requirements. It is used to illustrate automation of measure reporting using the SANER Implementation guide.</p><dl><dt>Frequency</dt><dd>This measure is expected to be reported every 1 day.</dd><dt>Publisher</dt><dd>HL7 International</dd><dt>Contacts</dt><dd>HL7 Public Health Workgroup (http://hl7.org/Special/committees/pher/index.cfm)</dd><dd>Keith W. Boone (mailto:kboone@ainq.com)</dd><dt>Status</dt><dd>draft</dd></dl><h4>Definitions</h4><dl><dt>Ventilator</dt><dd>Any device used to support, assist or control respiration (inclusive of the weaning period) through the application of positive pressure to the airway when delivered via an artificial airway, specifically an oral/nasal endotracheal or tracheostomy tube. Note: Ventilation and lung expansion devices that deliver positive pressure to the airway (for example: CPAP, BiPAP, bi-level, IPPB and PEEP) via non-invasive means (for example: nasal prongs, nasal mask, full face mask, total mask, etc.) are not considered ventilators unless positive pressure is delivered via an artificial airway (oral/nasal endotracheal or tracheostomy tube).</dd><dt>Beds</dt><dd>Baby beds in mom's room count as 1 bed, even if there are multiple baby beds Follow-up in progress if staffed is less than licensed. Total includes all beds, even if with surge beds it exceeds licensed beds.</dd><dt>ICU beds</dt><dd>Include NICU</dd></dl><h4>Group: Hospital COVID-19 Patient Encounters Reporting</h4><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem#Encounters Encounters</li></ul></dd></dl><dl><dt>subject</dt><dd>Patient in room</dd><dt>scoring</dt><dd>queue-length</dd><dt>type</dt><dd>structure</dd><dt>improvementNotation</dt><dd>decrease</dd></dl><h5>Population: Patients with suspected or confirmed COVID-19 in any location.</h5><p>Active encounters where the encounter diagnosis is suspected or confirmed COVID-19, or a Condition of suspected or confirmed COVID-19 was created during that encounter. This includes the patients with laboratory-confirmed or clinically diagnosed COVID-19.</p><dl><dt>Confirmed</dt><dd>A patient with a laboratory confirmed COVID-19 diagnosis</dd><dt>Suspected</dt><dd>A patient without a laboratory confirmed COVID-19 diagnosis who, in accordance with CDC’s Interim Public Health Guidance for Evaluating Persons Under Investigation (PUIs), has signs and symptoms compatible with COVID-19 (most patients with confirmed COVID-19 have developed fever and/or symptoms of acute respiratory illness, such as cough, shortness of breath or myalgia/fatigue).</dd></dl><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numC19Pats All COVID-19 Confirmed or Suspected Patients</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#initial-population</li></ul></dd></dl><h5>Expression: NumC19Pats</h5><p>This expression finds encounters that were active or finished in the reporting period, and their referenced Patient, Condition and Observation resources. It filters these based on cases where Encounter reports a reason or condition in the SuspectedOrDiagnosedCOVID19 value set, or where a positive lab test from the Covid19Labs valueset, or where the patient has any such associated Condition or Observation resources in the prior two weeks.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre> ( %Base + 'Encounter?' +     '_include=Encounter:subject&amp;_include=Encounter:Condition&amp;' +     '_include=Encounter:reasonReference' +     '&amp;status=in-progress,finished' +     '&amp;date=ge' + %ReportingPeriod.start.toString() +     '&amp;date=lt' + %ReportingPeriod.end.toString()  ).resolve().select(entry.resource).  where(    iif(myMemberOf((Encounter.reasonCode | Condition.code), %SuspectedOrConfirmedCOVID19Diagnoses.url) |        Observation.where((myMemberOf(code, %Covid19Labs.url) and myMemberOf(value, %PositiveResults.url))      ),      true,      iif(        Patient.distinct().where(          %Base + 'Observation?_count=1' +          '&amp;status=registered,preliminary,final,amended,corrected' +          '&amp;patient=' + $this.id +          '&amp;date=gt' + (dateSubtract(%ReportingPeriod.start, 14 'days')).toString() +          '&amp;code:in=' + %Covid19Labs.url +          '&amp;value-concept:in=' + %PositiveResults.url        ).resolve().select(entry.resource as Observation).exists(), true,        Patient.distinct().where(          %Base + 'Condition?_count=1'+          '&amp;status:not=refuted&amp;status:not=entered-in-error' +          '&amp;patient=' + $this.id +          '&amp;verificationStatus:not=refuted,entered-in-error' +          '&amp;date=gt' + (dateSubtract(%ReportingPeriod.start, 14 'days')).toString() +          '&amp;code:in=' + SuspectedOrConfirmedCOVID19Diagnoses.url        ).resolve().select(entry.resource as Condition).exists()      )   ) ) .distinct() .aggregate(   iif($total.subject contains $this.subject,       $total, $total | $this   ) )</pre><h5>Stratifier: By Location and Ventilator Status</h5><p>Stratifies the population by Location (inpatient vs ED/Overflow/Other) and Ventilator Status (Ventilated vs Not Ventilated)</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>iif(%NumVentUse.id contains Encounter.subject,     iif(myMemberOf(Encounter.location.location.resolve().type, %InpatientLocations.url), 'InpVentilated', 'OFVentilated'),     iif(myMemberOf(Encounter.location.location.resolve().type, %InpatientLocations.url), 'InpNotVentilated', 'OFNotVentilated') )</pre><h4>Group: Hospital Onset COVID-19 Patient Encounters Reporting</h4><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem#AcquiredCovid Acquired COVID-19 in Hospital</li></ul></dd></dl><dl><dt>subject</dt><dd>Hospital Acquired COVID-19</dd><dt>scoring</dt><dd>event-growth</dd><dt>type</dt><dd>outcome</dd><dt>improvementNotation</dt><dd>decrease</dd></dl><h5>Population: Patients with suspected or confirmed COVID-19 in an inpatient location</h5><p>Patients with suspected or confirmed COVID-19 in an inpatient location</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numC19HospPats Hospitalized COVID-19 Patients</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#initial-population</li></ul></dd></dl><h5>Expression: NumC19HospPats</h5><p>Uses the value of NumC19Pat as the initial population</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>%NumC19Pats.entry.resource.location.location.resolve().where(myMemberOf(type, %InpatientLocations.url))</pre><h5>Population: Hospital Onset COVID-19 Patients</h5><p>Hospital Onset COVID-19 Patients</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numC19HOPats Hospital Onset COVID-19 Patients</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#numerator</li></ul></dd></dl><h5>Expression: NumC19HOPats</h5><p>Filters the initial population by ruling out those patients whose first suspected or confirmed diagnosis or lab result appears less than 14 days from admission.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Encounter.where(   iif(dateAdd(period.start,14 'days') &gt; today(),     false,     iif( (%Base + 'Condition?_count=1'+        '&amp;status:not=refuted&amp;status:not=entered-in-error' +        '&amp;patient=' + $this.subject +        '&amp;verificationStatus:not=refuted,entered-in-error' +        '&amp;date=gt' + (dateAdd($this.period.start,14 'days')).toString() +        '&amp;date=le' + (dateSubtract($this.period.start,14 'days')).toString() +        '&amp;code:in=' + %SuspectedOrConfirmedCOVID19Diagnoses.url       ).resolve().select(entry.resource as Condition).exists(),       false,       (%Base + 'Observation?_count=1' +        '&amp;status=registered,preliminary,final,amended,corrected' +        '&amp;patient=' + $this.subject +        '&amp;date=gt' + (dateSubtract($this.period.start, 14 'days')).toString() +        '&amp;date=le' + (dateAdd($this.period.start,14 'days')).toString() +        '&amp;code:in=' + %Covid19Labs.url +        '&amp;value-concept:in=' + %PositiveResults.url       ).resolve().select(entry.resource as Observation)      .empty()     )   ) ).select(patient).resolve().trace('patients', id)</pre><h5>Population: Cumulative Hospital Onset COVID-19 Patients</h5><p>Cumulative Hospital Onset COVID-19 Patients</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#cumC19HOPats Cumulative Hospital Onset COVID-19 Patients</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#denominator</li></ul></dd></dl><h5>Expression: CumC19HOPats</h5><p>omputes the cumulative total from the prior measure report and the number of new infections detected in the current reporting period.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>iif(%PriorReport.empty(), 0, %PriorReport.group[1].population[2].count + %NumC19HOPats.total)</pre><h5>Stratifier: By Age Group</h5><p>Stratifies the population by Age Group</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.select(   iif(dateAdd(birthDate, 20 'years') &lt; today(), 'P0Y--P20Y',     iif(dateAdd(birthDate, 30 'years') &lt; today(), 'P20Y--P30Y',       iif(dateAdd(birthDate, 40 'years') &lt; today(), 'P30Y--P40Y',         iif(dateAdd(birthDate, 50 'years') &lt; today(), 'P40Y--P50Y',           iif(dateAdd(birthDate, 60 'years') &lt; today(), 'P50Y--P60Y',             iif(dateAdd(birthDate, 70 'years') &lt; today(), 'P60Y--P70Y',               iif(dateAdd(birthDate, 80 'years') &lt; today(), 'P70Y--P80Y', 'P80Y-P9999Y')             )           )         )       )     )   ) )</pre><h5>Stratifier: By Gender</h5><p>Stratifies the population by Gender</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.gender</pre><h5>Stratifier: By Ethnicity</h5><p>Stratifies the population by Ethnicity</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code</pre><h5>Stratifier: By Race</h5><p>Stratifies the population by Race</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient .extension('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race') .extension('ombCategory') .select(   iif(valueCoding.count() &gt; 1,      'Mixed',      iif(valueCoding.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor',          'Unknown',          valueCoding.code      )   ) )</pre><h4>Group: COVID-19 Patient Death Reporting</h4><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem#CovidDeaths COVID-19 Deaths</li></ul></dd></dl><dl><dt>subject</dt><dd>Patients with conformed or suspected COVID-19 who have died</dd><dt>scoring</dt><dd>event-growth</dd><dt>type</dt><dd>outcome</dd><dt>improvementNotation</dt><dd>decrease</dd></dl><h5>Population: Patients with suspected or confirmed COVID-19 in any location.</h5><p>Patients with suspected or confirmed COVID-19 in any location.</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numC19Pats All COVID-19 Confirmed or Suspected Patients</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#initial-population</li></ul></dd></dl><h5>Expression</h5><p>COVID-19 Patients in an inpatient setting</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>%NumC19Pats.entry.resource</pre><h5>Population: Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location</h5><p>Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numC19Died COVID-19 Patient Deaths</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#numerator</li></ul></dd></dl><h5>Expression: NumC19Died</h5><p>Filters the initial population by selecting those who have died.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Encounter.where(   iif(     hospitalization.where(       myMemberOf(dispositionCode, %PatientExpired)     ),     true,     subject.resolve().where(deceasedBoolean = true | deceasedDateTime.exists())   ) ).select(subject).resolve()</pre><h5>Population: Cumulative total of Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location</h5><p>Cumulative total of Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#cumC19Died Cumulative COVID-19 Patient Deaths</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#denominator</li></ul></dd></dl><h5>Expression: CumC19Died</h5><p>Computes the cumulative total from the prior measure report and the number of new deaths in the current reporting period.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>iif(%PriorReport.empty(), 0, %PriorReport.group[2].population[2].count + %NumC29Died.count())</pre><h5>Stratifier: By Age Group</h5><p>Stratifies the population by Age Group</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.select(   iif(dateAdd(birthDate, 20 'years') &lt; today(), 'P0Y--P20Y',     iif(dateAdd(birthDate, 30 'years') &lt; today(), 'P20Y--P30Y',       iif(dateAdd(birthDate, 40 'years') &lt; today(), 'P30Y--P40Y',         iif(dateAdd(birthDate, 50 'years') &lt; today(), 'P40Y--P50Y',           iif(dateAdd(birthDate, 60 'years') &lt; today(), 'P50Y--P60Y',             iif(dateAdd(birthDate, 70 'years') &lt; today(), 'P60Y--P70Y',               iif(dateAdd(birthDate, 80 'years') &lt; today(), 'P70Y--P80Y', 'P80Y-P9999Y')             )           )         )       )     )   ) )</pre><h5>Stratifier: By Gender</h5><p>Stratifies the population by Gender</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.gender</pre><h5>Stratifier: By Ethnicity</h5><p>Stratifies the population by Ethnicity</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code</pre><h5>Stratifier: By Race</h5><p>Stratifies the population by Race</p><h5>Expression</h5><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Patient .extension('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race') .extension('ombCategory') .select(   iif(valueCoding.code contains '1992-5', 'A', ' ') +   iif(valueCoding.code contains '2054-5', 'B', ' ') +   iif(valueCoding.code contains '2076-8', 'H', ' ') +   iif(valueCoding.code contains '2028-9', 'S', ' ') +   iif(valueCoding.code contains '2106-3', 'W', ' ') )</pre><h4>Group: Ventilator Reporting</h4><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem#Ventilators Ventilators</li></ul></dd></dl><dl><dt>subject</dt><dd>Ventilator capacity</dd><dt>scoring</dt><dd>capacity</dd><dt>type</dt><dd>structure</dd><dt>improvementNotation</dt><dd>decrease</dd></dl><h5>Population: Total number of ventilators</h5><p>Count of all ventilators that can support patient care, whether or not they are presently in use.</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numVent Mechanical Ventilators</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#denominator</li></ul></dd></dl><h5>Expression: NumVent</h5><p>Computes the total number of ventilators from the previously reported MeasureReport</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>iif(trace('PriorReport exists:', %PriorReport.exists()), %PriorReport.group[3].population[0].count, 0)</pre><h5>Population: Total number of ventilators in use</h5><p>Count of all ventilators in use.</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numVentUse Mechanical Ventilators in Use</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#numerator</li></ul></dd></dl><h5>Expression: NumVentUse</h5><p>dentifies the number of ventilators in use by counting Patient with an Observation or Procedure resource from an appropriate value set indicating ventilator use.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>( %Base + 'Encounter?' +   'status=in-progress,finished' +   '&amp;_include=Encounter:subject' +   '&amp;date=ge' + %ReportingPeriod.start.toString() +   '&amp;date=lt' + %ReportingPeriod.end.toString() ).resolve() .select(entry.resource as Patient) .where(   iif(     ( %Base + 'Observation?_count=1'+       '&amp;status=registered,preliminary,final,amended,corrected' +       '&amp;patient=' + $this.id +       '&amp;verificationStatus:not=refuted,entered-in-error' +       '&amp;date=gt' + %ReportingPeriod.start.toString()  +       '&amp;date=le' + %ReportingPeriod.end.toString() +       '&amp;code:in=' + %VentilatorObservations.url     ).resolve().select(entry.resource as Observation).exists(),     true,     ( %Base + 'Procedure?_count=1'+       '&amp;status=in-progress,competed' +       '&amp;patient=' + $this.id +       '&amp;date=gt' + %ReportingPeriod.start.toString()  +       '&amp;date=le' + %ReportingPeriod.end.toString()  +       '&amp;code:in=' + %VentilatorProcedures.url     ).resolve().select(entry.resource as Procedure).exists()   ) )</pre><h5>Population: Total number of ventilators not presently in use.</h5><p>Count of all ventilators not presently in use.</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numVentAvail Mechanical Ventilators Available</li></ul><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasurePopulationSystem#numerator-complement</li></ul></dd></dl><h5>Expression: NumVentAvail</h5><p>omputes the number of ventilators available by substracting the number of ventilators in use determined by population 1 from thee total number of ventilators given in population 0</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>%NumVent - %NumVentUse.total.toInteger()</pre><h4>Group: Bed Reporting</h4><p/><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem#Beds Beds</li></ul></dd></dl><dl><dt>subject</dt><dd>Bed capacity</dd><dt>scoring</dt><dd>capacity</dd><dt>type</dt><dd>structure</dd><dt>improvementNotation</dt><dd>decrease</dd></dl><h5>Population: Total number of beds</h5><p>Total number of all Inpatient and outpatient beds, including all staffed, ICU, licensed, and overflow (surge) beds used for inpatients or outpatients</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numTotBeds All Hospital Beds</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#denominator</li></ul></dd></dl><h5>Expression: NumTotBeds</h5><p>Computes the total number of beds from the previously reported MeasureReport</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>iif(%PriorReport.exists(),%PriorReport.group[3].population[0].count,0)</pre><h5>Population: Total number of beds in use</h5><p>Total number of all Inpatient and outpatient beds that are occupied</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numTotBedsOcc Hospital Beds Occupied</li></ul><ul><li>http://terminology.hl7.org/CodeSystem/measure-population#numerator</li></ul></dd></dl><h5>Expression: NumTotBedsOcc</h5><p>Identifies the number of beds in use by counting the most recent Encounter for each patient where the encounter was in-progress or finished within the period.</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>( %Base + 'Encounter?' +   'status=in-progress' +   '&amp;date=ge' + %ReportingPeriod.start.toString() +   '&amp;date=lt' + %ReportingPeriod.end.toString() ).resolve().select(entry.resource as Encounter) .aggregate(    iif($total.select(location[0]).location contains $this.location.location.first(),        $total,        $total | $this    ) )</pre><h5>Population: Total number of hospital beds available</h5><p>Total number of all hospital inpatient and outpatient beds that are available</p><dl><dt>Codes</dt><dd><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues#numTotBedsAvail Hospital Beds Available</li></ul><ul><li>http://hl7.org/fhir/uv/saner/CodeSystem/MeasurePopulationSystem#numerator-complement</li></ul></dd></dl><h5>Expression: NumTotBedsAvail</h5><p>omputes the number of beds available by substracting the number of beds in use determined by population 1 from the total number of beds given in population 0</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>%NumTotBeds - %NumTotBedsOcc.count()</pre><h5>Stratifier: By Type of Location</h5><p>Inpatient Non-ICU, Inpatient ICU, Other</p><h5>Expression</h5><p>Determines the location of the encounter based on the membership of location.type in the InpatientLocations and ICULocations ValueSet resources. When location.type is assigned to any other value, it is reported to be Other</p><dl><dt>Language</dt><dd>text/fhirpath</dd></dl><pre>Encounter.location.location.resolve() .iif(myMemberOf(type, %InpatientLocations.url),     iif (myMemberOf(type, %ICULocations.url),         'Inpatient ICU',         'Inpatient Non-ICU'     ),     'Other' )</pre><h5>References</h5><ul><li><a href=\"https://www.cdc.gov/nhsn/pdfs/commup/email-covid19-pihc-508.pdf\" title=\"CDC/NHSN COVID-19 Patient Impact &amp; Hospital Capacity Module Home Page\">NHSN COVID-19 Reporting</a></li><li><a href=\"https://web.archive.org/web/20200407141902/https://www.cdc.gov/nhsn/pdfs/covid19/import-covid19-data-508.pdf\" title=\"Importing COVID-19 Patient Module Denominator data for Patient Safety Component\">How to import COVID-19 Summary Data</a></li><li><a href=\"https://www.ohsu.edu/sites/default/files/2020-03/NHSN%20COVID-19%20Patient%20Impact%20and%20Hospital%20Capacity%20Module-%20Data%20Elements....pdf\" title=\"Instructions for Completion of the COVID-19 Patient Impact and Hospital Capacity Module Form (CDC 57.130)\">Table of Instructions</a></li><li><a href=\"https://www.cdc.gov/nhsn/pdfs/covid19/ltcf/fac-import-csv-508.pdf\" title=\"CDC/NHSN COVID-19 Reporting CSV File Template\">CSV File Template</a></li></ul></div>"
  ];
  fhir:DomainResource.extension [
     fhir:index 0;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/ReportingPeriod" ];
     fhir:Extension.valueTiming [
       fhir:Timing.repeat [
         fhir:Timing.repeat.frequency [ fhir:value "1"^^xsd:positiveInteger ];
         fhir:Timing.repeat.period [ fhir:value "1"^^xsd:decimal ];
         fhir:Timing.repeat.periodUnit [ fhir:value "d" ]       ]     ]
  ];
  fhir:Measure.url [ fhir:value "http://hl7.org/fhir/uv/saner/Measure/ComputableCDCPatientImpactAndHospitalCapacity"];
  fhir:Measure.version [ fhir:value "1.0.0"];
  fhir:Measure.name [ fhir:value "ComputableCDCPatientImpactAndHospitalCapacity"];
  fhir:Measure.title [ fhir:value "Patient Impact and Hospital Capacity"];
  fhir:Measure.status [ fhir:value "draft"];
  fhir:Measure.experimental [ fhir:value "true"^^xsd:boolean];
  fhir:Measure.date [ fhir:value "2021-09-07T19:19:32+00:00"^^xsd:dateTime];
  fhir:Measure.publisher [ fhir:value "HL7 International Public Health Workgroup"];
  fhir:Measure.contact [
     fhir:index 0;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://hl7.org/Special/committees/pher" ]     ]
  ], [
     fhir:index 1;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "pher@lists.hl7.org" ]     ]
  ], [
     fhir:index 2;
     fhir:ContactDetail.name [ fhir:value "Keith W. Boone" ];
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "mailto:kboone@ainq.com" ]     ]
  ];
  fhir:Measure.description [ fhir:value "This measure demonstrates automated reporting on bed availability and use at a facility location based on CDC/NHSN reporting requirements.\nIt is used to illustrate automation of measure reporting using the SANER Implementation guide."];
  fhir:Measure.useContext [
     fhir:index 0;
     fhir:UsageContext.code [
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/usage-context-type" ];
       fhir:Coding.code [ fhir:value "focus" ]     ];
     fhir:UsageContext.valueCodeableConcept [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         a sct:840539006;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
         fhir:Coding.code [ fhir:value "840539006" ];
         fhir:Coding.display [ fhir:value "COVID-19" ]       ]     ]
  ];
  fhir:Measure.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://unstats.un.org/unsd/methods/m49/m49.htm" ];
       fhir:Coding.code [ fhir:value "001" ]     ]
  ];
  fhir:Measure.author [
     fhir:index 0;
     fhir:ContactDetail.name [ fhir:value "Centers for Disease Control/National Healthcare Safety Network (CDC/NHSN)" ];
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "mailto:nhsn@cdc.gov" ]     ]
  ];
  fhir:Measure.relatedArtifact [
     fhir:index 0;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.label [ fhir:value "NHSN COVID-19 Reporting" ];
     fhir:RelatedArtifact.display [ fhir:value "CDC/NHSN COVID-19 Patient Impact & Hospital Capacity Module Home Page" ];
     fhir:RelatedArtifact.url [ fhir:value "https://web.archive.org/web/20200501215043/https://www.cdc.gov/nhsn/acute-care-hospital/covid19/" ]
  ], [
     fhir:index 1;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.label [ fhir:value "How to import COVID-19 Summary Data" ];
     fhir:RelatedArtifact.display [ fhir:value "Importing COVID-19 Patient Module Denominator data for Patient Safety Component" ];
     fhir:RelatedArtifact.url [ fhir:value "https://web.archive.org/web/20200501215043/https://www.cdc.gov/nhsn/pdfs/covid19/import-covid19-data-508.pdf" ]
  ], [
     fhir:index 2;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.label [ fhir:value "Table of Instructions" ];
     fhir:RelatedArtifact.display [ fhir:value "Instructions for Completion of the COVID-19 Patient Impact and Hospital Capacity Module Form (CDC 57.130)" ];
     fhir:RelatedArtifact.url [ fhir:value "https://web.archive.org/web/20200501215043/https://www.cdc.gov/nhsn/pdfs/covid19/57.130-toi-508.pdf" ]
  ], [
     fhir:index 3;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.label [ fhir:value "CSV File Template" ];
     fhir:RelatedArtifact.display [ fhir:value "CDC/NHSN COVID-19 Reporting CSV File Template" ];
     fhir:RelatedArtifact.url [ fhir:value "https://web.archive.org/web/20200501215043/https://www.cdc.gov/nhsn/pdfs/covid19/covid19-test-csv-import.csv" ]
  ];
  fhir:Measure.library [
     fhir:value "http://hl7.org/fhir/uv/saner/Library/ComputableNHSNMeasureLibrary";
     fhir:index 0;
     fhir:link <http://hl7.org/fhir/uv/saner/Library/ComputableNHSNMeasureLibrary>
  ];
  fhir:Measure.definition [
     fhir:value "<dl><dt>Ventilator</dt>\n<dd>Any device used to support, assist or control respiration (inclusive of the weaning period) through the application of positive\npressure to the airway when delivered via an artificial airway, specifically an oral/nasal endotracheal or tracheostomy tube.\nNote: Ventilation and lung expansion devices that deliver positive pressure to the airway (for example: CPAP, BiPAP, bi-level, IPPB and\nPEEP) via non-invasive means (for example: nasal prongs, nasal mask, full face mask, total mask, etc.) are not considered ventilators\nunless positive pressure is delivered via an artificial airway (oral/nasal endotracheal or tracheostomy tube).\n</dd>\n<dt>Beds</dt>\n<dd>Baby beds in mom's room count as 1 bed, even if there are multiple baby beds\nFollow-up in progress if staffed is less than licensed.\nTotal includes all beds, even if with surge beds it exceeds licensed beds.\n</dd>\n<dt>ICU beds</dt>\n<dd>Include NICU</dd>\n</dl>";
     fhir:index 0
  ];
  fhir:Measure.group [
     fhir:index 0;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Element.extension [
         fhir:index 0;
         fhir:Extension.url [ fhir:value "subject" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/resource-types" ];
             fhir:Coding.code [ fhir:value "Encounter" ]           ], [
             fhir:index 1;
             a sct:398284004;
             fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
             fhir:Coding.code [ fhir:value "398284004" ];
             fhir:Coding.display [ fhir:value "Patient in room" ]           ];
           fhir:CodeableConcept.text [ fhir:value "Patient in room" ]         ]       ], [
         fhir:index 1;
         fhir:Extension.url [ fhir:value "scoring" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/PublicHealthMeasureScoring" ];
             fhir:Coding.code [ fhir:value "queue-length" ]           ]         ]       ], [
         fhir:index 2;
         fhir:Extension.url [ fhir:value "type" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ];
             fhir:Coding.code [ fhir:value "structure" ]           ]         ]       ], [
         fhir:index 3;
         fhir:Extension.url [ fhir:value "improvementNotation" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ];
             fhir:Coding.code [ fhir:value "decrease" ]           ]         ]       ], [
         fhir:index 4;
         fhir:Extension.url [ fhir:value "rateAggregation" ];
         fhir:Extension.valueString [ fhir:value "point-in-time" ]       ];
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureGroupAttributes" ]     ];
     fhir:Measure.group.code [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem" ];
         fhir:Coding.code [ fhir:value "Encounters" ];
         fhir:Coding.display [ fhir:value "Encounters" ]       ];
       fhir:CodeableConcept.text [ fhir:value "Hospital COVID-19 Patient Encounters Reporting" ]     ];
     fhir:Measure.group.population [
       fhir:index 0;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numC19Pats" ];
           fhir:Coding.display [ fhir:value "All COVID-19 Confirmed or Suspected Patients" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "initial-population" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Patients with suspected or confirmed COVID-19 in any location." ]       ];
       fhir:Measure.group.population.description [ fhir:value "Active encounters where the encounter diagnosis is suspected or confirmed COVID-19,\n or a Condition of suspected or confirmed COVID-19 was created during that encounter.  This includes the patients with laboratory-confirmed\n or clinically diagnosed COVID-19.\n\nConfirmed\n: A patient with a laboratory confirmed COVID-19 diagnosis\n\nSuspected\n: A patient without a laboratory confirmed COVID-19 diagnosis who, in accordance with CDC’s Interim Public Health Guidance\nfor Evaluating Persons Under Investigation (PUIs), has signs and symptoms compatible with COVID-19 (most patients with confirmed\nCOVID-19 have developed fever and/or symptoms of acute respiratory illness, such as cough, shortness of breath or myalgia/fatigue)." ];
       fhir:Measure.group.population.criteria [
         fhir:Element.extension [
           fhir:index 0;
           fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureAlternateCriteria" ];
           fhir:Extension.valueExpression [
             fhir:Expression.description [ fhir:value "Alternate definition for Active encounters using CQL" ];
             fhir:Expression.name [ fhir:value "NumC19Pats" ];
             fhir:Expression.language [ fhir:value "text/cql" ];
             fhir:Expression.expression [ fhir:value "NumberOfCOVID19Patients" ]           ]         ];
         fhir:Expression.description [ fhir:value "This expression finds encounters that were active or finished in the reporting period, and their referenced Patient, Condition and Observation resources.\nIt filters these based on cases where Encounter reports a reason or condition in the SuspectedOrConfirmedCOVID19Diagnoses value set, or\nwhere a positive lab test from the Covid19Labs valueset, or where the patient has any such associated Condition or Observation resources\nin the prior two weeks." ];
         fhir:Expression.name [ fhir:value "NumC19Pats" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "findAll('Encounter',\n        including('subject','condition','reasonReference'),\n        with('status').equalTo('in-progress'|'finished'),\n        with('date').within(%ReportingPeriod)\n     ).onServers(%Base).\n     where(\n       iif(myMemberOf((Encounter.reasonCode | Condition.code), %SuspectedOrConfirmedCOVID19Diagnoses.url) |\n           Observation.where((myMemberOf(code, %Covid19Labs.url) and myMemberOf(value, %PositiveResults.url))\n         ), true,\n         iif(\n           Patient.distinct()\n              .whereExists('Observation',\n                for('patient', $this),\n                with('status').equalTo(\n                    'registered' | 'preliminary' | 'final' | 'amended' | 'corrected'),\n                with('date').greaterThan(%ReportingPeriod.start - 14 'days'),\n                with('code').in(%Covid19Labs),\n                with('value-concept).in(%PositiveResults)\n           ).onServers(%Base), true,\n           Patient.distinct()\n              .whereExists('Condition',\n                for('patient', $this),\n                with('verification-status').notEqualTo('refuted'|'entered-in-error').\n                with('date').greaterThan(%ReportingPeriod.start - 14 'days'),\n                with('code').in(%SuspectedOrConfirmedCOVID19Diagnoses.url)\n           ).exists()\n         )\n      )\n    )\n    .distinct()\n    .aggregate(\n      iif($total.subject contains $this.subject,\n          $total, $total | $this\n      )\n    )" ]       ]     ];
     fhir:Measure.group.stratifier [
       fhir:index 0;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Location and Ventilator Status" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Location (inpatient vs ED/Overflow/Other) and Ventilator Status (Ventilated vs Not Ventilated)" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "For each Encounter,\n  if the encounter subject has been ventilated\n    if the Encounter location is an inpatient loocation,\n      return InpVentilated\n    Otherwise\n      return OFVentilated\n  else\n    if the Encounter location is an inpatient loocation,\n      return InpNotVentilated\n    Otherwise\n      return OFNotVentilated\n  end if" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "iif(%NumVentUse.id contains Encounter.subject,\n    iif(myMemberOf(Encounter.location.location.resolve().type, %InpatientLocations.url), 'InpVentilated', 'OFVentilated'),\n    iif(myMemberOf(Encounter.location.location.resolve().type, %InpatientLocations.url), 'InpNotVentilated', 'OFNotVentilated')\n)" ]       ]     ]
  ], [
     fhir:index 1;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Element.extension [
         fhir:index 0;
         fhir:Extension.url [ fhir:value "subject" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/resource-types" ];
             fhir:Coding.code [ fhir:value "Patient" ]           ], [
             fhir:index 1;
             fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
             fhir:Coding.code [ fhir:value "116154003|Patient|: 20401003|With| = (840539006|Disease caused by 2019 novel coronavirus|: 246512002|Timing| = 277056009|Hospital Acquired|)" ];
             fhir:Coding.display [ fhir:value "Patient where With = Disease caused by 2019 novel coronavirus where Timing = Hospital acquired" ]           ];
           fhir:CodeableConcept.text [ fhir:value "Hospital Acquired COVID-19" ]         ]       ], [
         fhir:index 1;
         fhir:Extension.url [ fhir:value "scoring" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/PublicHealthMeasureScoring" ];
             fhir:Coding.code [ fhir:value "event-growth" ]           ]         ]       ], [
         fhir:index 2;
         fhir:Extension.url [ fhir:value "type" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ];
             fhir:Coding.code [ fhir:value "outcome" ]           ]         ]       ], [
         fhir:index 3;
         fhir:Extension.url [ fhir:value "improvementNotation" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ];
             fhir:Coding.code [ fhir:value "decrease" ]           ]         ]       ], [
         fhir:index 4;
         fhir:Extension.url [ fhir:value "rateAggregation" ];
         fhir:Extension.valueString [ fhir:value "cumulative" ]       ];
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureGroupAttributes" ]     ];
     fhir:Measure.group.code [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem" ];
         fhir:Coding.code [ fhir:value "AcquiredCovid" ];
         fhir:Coding.display [ fhir:value "Acquired COVID-19 in Hospital" ]       ];
       fhir:CodeableConcept.text [ fhir:value "Hospital Onset COVID-19 Patient Encounters Reporting" ]     ];
     fhir:Measure.group.population [
       fhir:index 0;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numC19HospPats" ];
           fhir:Coding.display [ fhir:value "Hospitalized COVID-19 Patients" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "initial-population" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Patients with suspected or confirmed COVID-19 in an inpatient location" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Patients with suspected or confirmed COVID-19 in an inpatient location" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Uses the value of NumC19Pat as the initial population" ];
         fhir:Expression.name [ fhir:value "NumC19HospPats" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "%NumC19Pats.entry.resource.location.location.resolve().where(myMemberOf(type, %InpatientLocations.url))" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numC19HOPats" ];
           fhir:Coding.display [ fhir:value "Hospital Onset COVID-19 Patients" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "numerator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Hospital Onset COVID-19 Patients" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Hospital Onset COVID-19 Patients" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Filters the initial population by ruling out those patients whose first suspected or\nconfirmed diagnosis or lab result appears less than 14 days from admission." ];
         fhir:Expression.name [ fhir:value "NumC19HOPats" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Encounter.where(\n  iif(dateAdd(period.start,14 'days') > today(),\n    false,\n    iif(\n      whereExists('Condition',\n        with('status').notEqualTo('refuted'|'entered-in-error'),\n        with('patient').equalTo($this.subject),\n        with('verificationStatus').notEqualTo('refuted'|'entered-in-error'),\n        with('date').greaterThan($this.period.start - 14 'days'),\n        with('date').lessThanOrEqualTo($this.period.start - 14 'days'),\n        with('code').in(%SuspectedOrConfirmedCOVID19Diagnoses.url)\n      ).onServers(%Base),\n      false,\n      whereExists('Observation',\n        with('status').equalTo('registered'|'preliminary'|'final'|'amended'|'corrected'),\n        with('patient').equalTo($this.subject),\n        with('date').greaterThan($this.period.start - 14 'days'),\n        with('date').lessThanOrEqualTo($this.period.start - 14 'days'),\n        with('code').in(%Covid19Labs.url)\n        with('value-concept').in(%PositiveResults.url)\n      ).onServers(%Base).not()\n    )\n  )\n).select(patient).resolve().trace('patients', id)" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "cumC19HOPats" ];
           fhir:Coding.display [ fhir:value "Cumulative Hospital Onset COVID-19 Patients" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "denominator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Cumulative Hospital Onset COVID-19 Patients" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Cumulative Hospital Onset COVID-19 Patients" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the cumulative total from the prior measure report and the number of new\n infections detected in the current reporting period." ];
         fhir:Expression.name [ fhir:value "CumC19HOPats" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "iif(%PriorReport.empty(), 0, %PriorReport.group[1].population[2].count + %NumC19HOPats.total)" ]       ]     ];
     fhir:Measure.group.stratifier [
       fhir:index 0;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Age Group" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Age Group" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "If birth date + N years < today, return the code for the patient < N Years of age for values\n of N from 20, 30, 40, 50, 60, 70 and 80, otherise return the code for over 80" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.select(\n  iif(dateAdd(birthDate, 20 'years') < today(), 'P0Y--P20Y',\n    iif(dateAdd(birthDate, 30 'years') < today(), 'P20Y--P30Y',\n      iif(dateAdd(birthDate, 40 'years') < today(), 'P30Y--P40Y',\n        iif(dateAdd(birthDate, 50 'years') < today(), 'P40Y--P50Y',\n          iif(dateAdd(birthDate, 60 'years') < today(), 'P50Y--P60Y',\n            iif(dateAdd(birthDate, 70 'years') < today(), 'P60Y--P70Y',\n              iif(dateAdd(birthDate, 80 'years') < today(), 'P70Y--P80Y', 'P80Y-P9999Y')\n            )\n          )\n        )\n      )\n    )\n  )\n)" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Gender" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Gender" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient gender" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.gender" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Ethnicity" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Ethnicity" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient enthnicity code" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code" ]       ]     ], [
       fhir:index 3;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Race" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Race" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient race code" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient\n.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')\n.extension('ombCategory')\n.select(\n  iif(valueCoding.count() > 1,\n     'Mixed',\n     iif(valueCoding.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor',\n         'Unknown',\n         valueCoding.code\n     )\n  )\n)" ]       ]     ]
  ], [
     fhir:index 2;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Element.extension [
         fhir:index 0;
         fhir:Extension.url [ fhir:value "subject" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/resource-types" ];
             fhir:Coding.code [ fhir:value "Patient" ]           ], [
             fhir:index 1;
             a sct:419620001;
             fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
             fhir:Coding.code [ fhir:value "419620001" ];
             fhir:Coding.display [ fhir:value "Death" ]           ];
           fhir:CodeableConcept.text [ fhir:value "Patients with conformed or suspected COVID-19 who have died" ]         ]       ], [
         fhir:index 1;
         fhir:Extension.url [ fhir:value "scoring" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/PublicHealthMeasureScoring" ];
             fhir:Coding.code [ fhir:value "event-growth" ]           ]         ]       ], [
         fhir:index 2;
         fhir:Extension.url [ fhir:value "type" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ];
             fhir:Coding.code [ fhir:value "outcome" ]           ]         ]       ], [
         fhir:index 3;
         fhir:Extension.url [ fhir:value "improvementNotation" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ];
             fhir:Coding.code [ fhir:value "decrease" ]           ]         ]       ], [
         fhir:index 4;
         fhir:Extension.url [ fhir:value "rateAggregation" ];
         fhir:Extension.valueString [ fhir:value "cumulative" ]       ];
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureGroupAttributes" ]     ];
     fhir:Measure.group.code [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem" ];
         fhir:Coding.code [ fhir:value "CovidDeaths" ];
         fhir:Coding.display [ fhir:value "COVID-19 Deaths" ]       ];
       fhir:CodeableConcept.text [ fhir:value "COVID-19 Patient Death Reporting" ]     ];
     fhir:Measure.group.population [
       fhir:index 0;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numC19Pats" ];
           fhir:Coding.display [ fhir:value "All COVID-19 Confirmed or Suspected Patients" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "initial-population" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Patients with suspected or confirmed COVID-19 in any location." ]       ];
       fhir:Measure.group.population.description [ fhir:value "Patients with suspected or confirmed COVID-19 in any location." ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "COVID-19 Patients in an inpatient setting" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "%NumC19Pats.entry.resource" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numC19Died" ];
           fhir:Coding.display [ fhir:value "COVID-19 Patient Deaths" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "numerator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Filters the initial population by selecting those who have died." ];
         fhir:Expression.name [ fhir:value "NumC19Died" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Encounter.where(\n  iif(\n    hospitalization.where(\n      myMemberOf(dispositionCode, %PatientExpired)\n    ),\n    true,\n    subject.resolve().where(deceasedBoolean = true | deceasedDateTime.exists())\n  )\n).select(subject).resolve()" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "cumC19Died" ];
           fhir:Coding.display [ fhir:value "Cumulative COVID-19 Patient Deaths" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "denominator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Cumulative total of Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Cumulative total of Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the cumulative total from the prior measure report and the number of new deaths in the current reporting period." ];
         fhir:Expression.name [ fhir:value "CumC19Died" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "iif(%PriorReport.empty(), 0, %PriorReport.group[2].population[2].count + %NumC29Died.count())" ]       ]     ];
     fhir:Measure.group.stratifier [
       fhir:index 0;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Age Group" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Age Group" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "If birth date + N years < today, return the code for the patient < N Years of age for values\n of N from 20, 30, 40, 50, 60, 70 and 80, otherise return the code for over 80" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.select(\n  iif(dateAdd(birthDate, 20 'years') < today(), 'P0Y--P20Y',\n    iif(dateAdd(birthDate, 30 'years') < today(), 'P20Y--P30Y',\n      iif(dateAdd(birthDate, 40 'years') < today(), 'P30Y--P40Y',\n        iif(dateAdd(birthDate, 50 'years') < today(), 'P40Y--P50Y',\n          iif(dateAdd(birthDate, 60 'years') < today(), 'P50Y--P60Y',\n            iif(dateAdd(birthDate, 70 'years') < today(), 'P60Y--P70Y',\n              iif(dateAdd(birthDate, 80 'years') < today(), 'P70Y--P80Y', 'P80Y-P9999Y')\n            )\n          )\n        )\n      )\n    )\n  )\n)" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Gender" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Gender" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient gender" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.gender" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Ethnicity" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Ethnicity" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient ethnicity code" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code" ]       ]     ], [
       fhir:index 3;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Race" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Stratifies the population by Race" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Return the patient race code" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Patient\n.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')\n.extension('ombCategory')\n.select(\n  iif(valueCoding.code contains '1992-5', 'A', ' ') +\n  iif(valueCoding.code contains '2054-5', 'B', ' ') +\n  iif(valueCoding.code contains '2076-8', 'H', ' ') +\n  iif(valueCoding.code contains '2028-9', 'S', ' ') +\n  iif(valueCoding.code contains '2106-3', 'W', ' ')\n)" ]       ]     ]
  ], [
     fhir:index 3;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureExpectation" ];
       fhir:Extension.valueCode [ fhir:value "SHOULD" ]     ], [
       fhir:index 1;
       fhir:Element.extension [
         fhir:index 0;
         fhir:Extension.url [ fhir:value "subject" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/resource-types" ];
             fhir:Coding.code [ fhir:value "Device" ]           ], [
             fhir:index 1;
             a sct:257463002;
             fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
             fhir:Coding.code [ fhir:value "257463002" ];
             fhir:Coding.display [ fhir:value "Ventilator Outlet" ]           ];
           fhir:CodeableConcept.text [ fhir:value "Ventilator capacity" ]         ]       ], [
         fhir:index 1;
         fhir:Extension.url [ fhir:value "scoring" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/PublicHealthMeasureScoring" ];
             fhir:Coding.code [ fhir:value "capacity" ]           ]         ]       ], [
         fhir:index 2;
         fhir:Extension.url [ fhir:value "type" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ];
             fhir:Coding.code [ fhir:value "structure" ]           ]         ]       ], [
         fhir:index 3;
         fhir:Extension.url [ fhir:value "improvementNotation" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ];
             fhir:Coding.code [ fhir:value "decrease" ]           ]         ]       ], [
         fhir:index 4;
         fhir:Extension.url [ fhir:value "rateAggregation" ];
         fhir:Extension.valueString [ fhir:value "point-in-time" ]       ];
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureGroupAttributes" ]     ];
     fhir:Measure.group.code [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem" ];
         fhir:Coding.code [ fhir:value "Ventilators" ];
         fhir:Coding.display [ fhir:value "Ventilators" ]       ];
       fhir:CodeableConcept.text [ fhir:value "Ventilator Reporting" ]     ];
     fhir:Measure.group.population [
       fhir:index 0;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numVent" ];
           fhir:Coding.display [ fhir:value "Mechanical Ventilators" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "denominator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of ventilators" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Count of all ventilators that can support patient care, whether or not they are presently in use." ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the total number of ventilators from the previously reported MeasureReport" ];
         fhir:Expression.name [ fhir:value "NumVent" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "iif(trace('PriorReport exists:', %PriorReport.exists()), %PriorReport.group[3].population[0].count, 0)" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numVentUse" ];
           fhir:Coding.display [ fhir:value "Mechanical Ventilators in Use" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "numerator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of ventilators in use" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Count of all ventilators in use." ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Identifies the number of ventilators in use by counting Patient with an Observation\n or Procedure resource from an appropriate value set indicating ventilator use." ];
         fhir:Expression.name [ fhir:value "NumVentUse" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "findAll('Encounter',\n including('subject'),\n with('status').equalTo('in-progress'|'finished'),\n with('date').within(%ReportingPeriod)\n).onServers(%Base)\n.select(entry.resource as Patient)\n.where(\n  iif(\n    whereExists('Observation',\n      with('status').equalTo('registered'|'preliminary'|'final'|'amended'|'corrected'),\n      with('patient').equalTo($this.id),\n      with('verificationStatus').notEqualTo('refuted'|'entered-in-error'),\n      with('date').within(%ReportingPeriod),\n      with('code').in(%VentilatorObservations.url)\n    ).onServers(%Base)\n    true,\n    whereExists('Procedure',\n      with('status').equalTo('in-progress'|'completed'),\n      with('patient').equalTo($this.id),\n      with('date').within(%ReportingPeriod),\n      with('code').in(%VentilatorProcedures.url)\n    ).onServers(%Base)\n  )\n)" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numVentAvail" ];
           fhir:Coding.display [ fhir:value "Mechanical Ventilators Available" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasurePopulationSystem" ];
           fhir:Coding.code [ fhir:value "numerator-complement" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of ventilators not presently in use." ]       ];
       fhir:Measure.group.population.description [ fhir:value "Count of all ventilators not presently in use." ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the number of ventilators available by substracting the number of ventilators in use\n determined by population 1 from thee total number of ventilators given in population 0" ];
         fhir:Expression.name [ fhir:value "NumVentAvail" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "%NumVent - %NumVentUse.total.toInteger()" ]       ]     ]
  ], [
     fhir:index 4;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Element.extension [
         fhir:index 0;
         fhir:Extension.url [ fhir:value "subject" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/resource-types" ];
             fhir:Coding.code [ fhir:value "Device" ]           ], [
             fhir:index 1;
             a sct:91537007;
             fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
             fhir:Coding.code [ fhir:value "91537007" ];
             fhir:Coding.display [ fhir:value "Hospital Bed" ]           ];
           fhir:CodeableConcept.text [ fhir:value "Bed capacity" ]         ]       ], [
         fhir:index 1;
         fhir:Extension.url [ fhir:value "scoring" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/PublicHealthMeasureScoring" ];
             fhir:Coding.code [ fhir:value "capacity" ]           ]         ]       ], [
         fhir:index 2;
         fhir:Extension.url [ fhir:value "type" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ];
             fhir:Coding.code [ fhir:value "structure" ]           ]         ]       ], [
         fhir:index 3;
         fhir:Extension.url [ fhir:value "improvementNotation" ];
         fhir:Extension.valueCodeableConcept [
           fhir:CodeableConcept.coding [
             fhir:index 0;
             fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ];
             fhir:Coding.code [ fhir:value "decrease" ]           ]         ]       ], [
         fhir:index 4;
         fhir:Extension.url [ fhir:value "rateAggregation" ];
         fhir:Extension.valueString [ fhir:value "point-in-time" ]       ];
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/saner/StructureDefinition/MeasureGroupAttributes" ]     ];
     fhir:Measure.group.code [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasureGroupSystem" ];
         fhir:Coding.code [ fhir:value "Beds" ];
         fhir:Coding.display [ fhir:value "Beds" ]       ];
       fhir:CodeableConcept.text [ fhir:value "Bed Reporting" ]     ];
     fhir:Measure.group.population [
       fhir:index 0;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numTotBeds" ];
           fhir:Coding.display [ fhir:value "All Hospital Beds" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "denominator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of beds" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Total number of all Inpatient and outpatient beds, including all staffed, ICU,\nlicensed, and overflow (surge) beds used for inpatients or outpatients" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the total number of beds from the previously reported MeasureReport" ];
         fhir:Expression.name [ fhir:value "NumTotBeds" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "iif(%PriorReport.exists(),%PriorReport.group[3].population[0].count,0)" ]       ]     ], [
       fhir:index 1;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numTotBedsOcc" ];
           fhir:Coding.display [ fhir:value "Hospital Beds Occupied" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ];
           fhir:Coding.code [ fhir:value "numerator" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of beds in use" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Total number of all Inpatient and outpatient beds that are occupied" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Identifies the number of beds in use by counting the most recent Encounter for each patient where the encounter\nwas in-progress or finished within the period." ];
         fhir:Expression.name [ fhir:value "NumTotBedsOcc" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "findAll('Encounter',\n  with('status').equalTo('in-progress'),\n  with('date').within(%ReportingPeriod)\n).onServers(%Base)\n.aggregate(\n   iif($total.select(location[0]).location contains $this.location.location.first(),\n       $total,\n       $total | $this\n   )\n)" ]       ]     ], [
       fhir:index 2;
       fhir:Measure.group.population.code [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasuredValues" ];
           fhir:Coding.code [ fhir:value "numTotBedsAvail" ];
           fhir:Coding.display [ fhir:value "Hospital Beds Available" ]         ], [
           fhir:index 1;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/uv/saner/CodeSystem/MeasurePopulationSystem" ];
           fhir:Coding.code [ fhir:value "numerator-complement" ]         ];
         fhir:CodeableConcept.text [ fhir:value "Total number of hospital beds available" ]       ];
       fhir:Measure.group.population.description [ fhir:value "Total number of all hospital inpatient and outpatient beds that are available" ];
       fhir:Measure.group.population.criteria [
         fhir:Expression.description [ fhir:value "Computes the number of beds  available by substracting the number of beds in use\n determined by population 1 from the total number of beds given in population 0" ];
         fhir:Expression.name [ fhir:value "NumTotBedsAvail" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "%NumTotBeds - %NumTotBedsOcc.count()" ]       ]     ];
     fhir:Measure.group.stratifier [
       fhir:index 0;
       fhir:Measure.group.stratifier.code [
         fhir:CodeableConcept.text [ fhir:value "By Type of Location" ]       ];
       fhir:Measure.group.stratifier.description [ fhir:value "Inpatient Non-ICU, Inpatient ICU, Other" ];
       fhir:Measure.group.stratifier.criteria [
         fhir:Expression.description [ fhir:value "Determines the location of the encounter based on the membership\nof location.type in the InpatientLocations and ICULocations ValueSet resources.\nWhen location.type is assigned to any other value, it is reported to be Other" ];
         fhir:Expression.language [ fhir:value "text/fhirpath" ];
         fhir:Expression.expression [ fhir:value "Encounter.location.location.resolve()\n.iif(myMemberOf(type, %InpatientLocations.url),\n    iif (myMemberOf(type, %ICULocations.url),\n        'Inpatient ICU',\n        'Inpatient Non-ICU'\n    ),\n    'Other'\n)" ]       ]     ]
  ].

# - ontology header ------------------------------------------------------------

 a owl:Ontology;
  owl:imports fhir:fhir.ttl.