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 in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
The url for this measure is http://hl7.org/fhir/uv/saner/Measure/ComputableCDCPatientImpactAndHospitalCapacity
.
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.
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.
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.
( %Base + 'Encounter?' + '_include=Encounter:subject&_include=Encounter:Condition&' + '_include=Encounter:reasonReference' + '&status=in-progress,finished' + '&date=ge' + %ReportingPeriod.start.toString() + '&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' + '&status=registered,preliminary,final,amended,corrected' + '&patient=' + $this.id + '&date=gt' + (dateSubtract(%ReportingPeriod.start, 14 'days')).toString() + '&code:in=' + %Covid19Labs.url + '&value-concept:in=' + %PositiveResults.url ).resolve().select(entry.resource as Observation).exists(), true, Patient.distinct().where( %Base + 'Condition?_count=1'+ '&status:not=refuted&status:not=entered-in-error' + '&patient=' + $this.id + '&verificationStatus:not=refuted,entered-in-error' + '&date=gt' + (dateSubtract(%ReportingPeriod.start, 14 'days')).toString() + '&code:in=' + SuspectedOrConfirmedCOVID19Diagnoses.url ).resolve().select(entry.resource as Condition).exists() ) ) ) .distinct() .aggregate( iif($total.subject contains $this.subject, $total, $total | $this ) )
Stratifies the population by Location (inpatient vs ED/Overflow/Other) and Ventilator Status (Ventilated vs Not Ventilated)
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') )
Patients with suspected or confirmed COVID-19 in an inpatient location
Uses the value of NumC19Pat as the initial population
%NumC19Pats.entry.resource.location.location.resolve().where(myMemberOf(type, %InpatientLocations.url))
Hospital Onset COVID-19 Patients
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.
Encounter.where( iif(dateAdd(period.start,14 'days') > today(), false, iif( (%Base + 'Condition?_count=1'+ '&status:not=refuted&status:not=entered-in-error' + '&patient=' + $this.subject + '&verificationStatus:not=refuted,entered-in-error' + '&date=gt' + (dateAdd($this.period.start,14 'days')).toString() + '&date=le' + (dateSubtract($this.period.start,14 'days')).toString() + '&code:in=' + %SuspectedOrConfirmedCOVID19Diagnoses.url ).resolve().select(entry.resource as Condition).exists(), false, (%Base + 'Observation?_count=1' + '&status=registered,preliminary,final,amended,corrected' + '&patient=' + $this.subject + '&date=gt' + (dateSubtract($this.period.start, 14 'days')).toString() + '&date=le' + (dateAdd($this.period.start,14 'days')).toString() + '&code:in=' + %Covid19Labs.url + '&value-concept:in=' + %PositiveResults.url ).resolve().select(entry.resource as Observation) .empty() ) ) ).select(patient).resolve().trace('patients', id)
Cumulative Hospital Onset COVID-19 Patients
omputes the cumulative total from the prior measure report and the number of new infections detected in the current reporting period.
iif(%PriorReport.empty(), 0, %PriorReport.group[1].population[2].count + %NumC19HOPats.total)
Stratifies the population by Age Group
Patient.select( iif(dateAdd(birthDate, 20 'years') < today(), 'P0Y--P20Y', iif(dateAdd(birthDate, 30 'years') < today(), 'P20Y--P30Y', iif(dateAdd(birthDate, 40 'years') < today(), 'P30Y--P40Y', iif(dateAdd(birthDate, 50 'years') < today(), 'P40Y--P50Y', iif(dateAdd(birthDate, 60 'years') < today(), 'P50Y--P60Y', iif(dateAdd(birthDate, 70 'years') < today(), 'P60Y--P70Y', iif(dateAdd(birthDate, 80 'years') < today(), 'P70Y--P80Y', 'P80Y-P9999Y') ) ) ) ) ) ) )
Stratifies the population by Gender
Patient.gender
Stratifies the population by Ethnicity
Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code
Stratifies the population by Race
Patient .extension('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race') .extension('ombCategory') .select( iif(valueCoding.count() > 1, 'Mixed', iif(valueCoding.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor', 'Unknown', valueCoding.code ) ) )
Patients with suspected or confirmed COVID-19 in any location.
COVID-19 Patients in an inpatient setting
%NumC19Pats.entry.resource
Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location
Filters the initial population by selecting those who have died.
Encounter.where( iif( hospitalization.where( myMemberOf(dispositionCode, %PatientExpired) ), true, subject.resolve().where(deceasedBoolean = true | deceasedDateTime.exists()) ) ).select(subject).resolve()
Cumulative total of Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location
Computes the cumulative total from the prior measure report and the number of new deaths in the current reporting period.
iif(%PriorReport.empty(), 0, %PriorReport.group[2].population[2].count + %NumC29Died.count())
Stratifies the population by Age Group
Patient.select( iif(dateAdd(birthDate, 20 'years') < today(), 'P0Y--P20Y', iif(dateAdd(birthDate, 30 'years') < today(), 'P20Y--P30Y', iif(dateAdd(birthDate, 40 'years') < today(), 'P30Y--P40Y', iif(dateAdd(birthDate, 50 'years') < today(), 'P40Y--P50Y', iif(dateAdd(birthDate, 60 'years') < today(), 'P50Y--P60Y', iif(dateAdd(birthDate, 70 'years') < today(), 'P60Y--P70Y', iif(dateAdd(birthDate, 80 'years') < today(), 'P70Y--P80Y', 'P80Y-P9999Y') ) ) ) ) ) ) )
Stratifies the population by Gender
Patient.gender
Stratifies the population by Ethnicity
Patient.extension('http://hl7.org/fhir/us/core/StructureDefinition/us-ethnicity-category').extension('ombCategory').valueCoding.code
Stratifies the population by Race
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', ' ') )
Count of all ventilators that can support patient care, whether or not they are presently in use.
Computes the total number of ventilators from the previously reported MeasureReport
iif(trace('PriorReport exists:', %PriorReport.exists()), %PriorReport.group[3].population[0].count, 0)
Count of all ventilators in use.
dentifies the number of ventilators in use by counting Patient with an Observation or Procedure resource from an appropriate value set indicating ventilator use.
( %Base + 'Encounter?' + 'status=in-progress,finished' + '&_include=Encounter:subject' + '&date=ge' + %ReportingPeriod.start.toString() + '&date=lt' + %ReportingPeriod.end.toString() ).resolve() .select(entry.resource as Patient) .where( iif( ( %Base + 'Observation?_count=1'+ '&status=registered,preliminary,final,amended,corrected' + '&patient=' + $this.id + '&verificationStatus:not=refuted,entered-in-error' + '&date=gt' + %ReportingPeriod.start.toString() + '&date=le' + %ReportingPeriod.end.toString() + '&code:in=' + %VentilatorObservations.url ).resolve().select(entry.resource as Observation).exists(), true, ( %Base + 'Procedure?_count=1'+ '&status=in-progress,competed' + '&patient=' + $this.id + '&date=gt' + %ReportingPeriod.start.toString() + '&date=le' + %ReportingPeriod.end.toString() + '&code:in=' + %VentilatorProcedures.url ).resolve().select(entry.resource as Procedure).exists() ) )
Count of all ventilators not presently in use.
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
%NumVent - %NumVentUse.total.toInteger()
Total number of all Inpatient and outpatient beds, including all staffed, ICU, licensed, and overflow (surge) beds used for inpatients or outpatients
Computes the total number of beds from the previously reported MeasureReport
iif(%PriorReport.exists(),%PriorReport.group[3].population[0].count,0)
Total number of all Inpatient and outpatient beds that are occupied
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.
( %Base + 'Encounter?' + 'status=in-progress' + '&date=ge' + %ReportingPeriod.start.toString() + '&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 ) )
Total number of all hospital inpatient and outpatient beds that are available
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
%NumTotBeds - %NumTotBedsOcc.count()
Inpatient Non-ICU, Inpatient ICU, Other
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
Encounter.location.location.resolve() .iif(myMemberOf(type, %InpatientLocations.url), iif (myMemberOf(type, %ICULocations.url), 'Inpatient ICU', 'Inpatient Non-ICU' ), 'Other' )