CDC NHSN Situational Awareness Framework for Reporting (NHSN SAFR) Content Implementation Guide
1.0.0 - STU 1.0.0

CDC NHSN Situational Awareness Framework for Reporting (NHSN SAFR) Content Implementation Guide - Downloaded Version 1.0.0 See the Directory of published versions

## Measure: HRD Measure (Experimental)

Official URL: http://www.cdc.gov/nhsn/fhirportal/safr/ig/Measure/HRDMeasure | Version: 1.0.0
Standards status: Informative | Computable Name: HRDMeasure

Hospital Respiratory Data Measure

Knowledge Artifact Metadata
Name (machine-readable) | HRDMeasure
Title (human-readable) | HRD Measure
Status | Draft
Experimental | true
Description | Hospital Respiratory Data Measure
Measure Steward | CDC National Healthcare Safety Network (NHSN)
Steward Contact Details | CDC National Healthcare Safety Network (NHSN): http://www.cdc.gov/nhsn,nhsn@cdc.gov
Measure Metadata
Version Number | 1.0.0
Measure Scoring | Cohort
Population Basis | boolean
Measure Population Criteria
Initial Population | ID: d2e4301 Description: No description provided Logic Definition: Inpatient Beds Initial Population
Stratifier | ID: unknownC19 Code: Number new confirmed Covid-19 age unknown
Stratifier | ID: unknownFlu Code: Number new confirmed Flu age unknown
Stratifier | ID: unknownRsv Code: Number new confirmed RSV age unknown
Stratifier | ID: n95-3day Code: 3-day supply of N95 masks
Stratifier | ID: n95Mask Code: Days supply of N95 masks
Stratifier | ID: or-surgical-mask-3day Code: 3-day supply of surgical masks
Stratifier | ID: orSurgMask Code: or surgical masks
Stratifier | ID: face-shield-3-day Code: 3-day supply of face shields
Stratifier | ID: faceShield Code: Days supply of face shields
Stratifier | ID: gown-3-day Code: 3-day supply of gowns
Stratifier | ID: gown Code: Days supply of gowns
Stratifier | ID: glove-3-day Code: 3-day supply of gloves
Stratifier | ID: glove Code: Days supply of gloves
Measure Population Criteria
Initial Population | ID: d2e4301-occupied Description: No description provided Logic Definition: Occupied Inpatient Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-adult-inpatient Description: No description provided Logic Definition: Adult Inpatient Beds Initial Population
Stratifier | ID: adultInpC19 Code: Number confirmed Covid-19 adult hospital patients
Stratifier | ID: adultInpFlu Code: Number confirmed Flu adult hospital patients
Stratifier | ID: adultInpRsv Code: Number confirmed RSV adult hospital patients
Stratifier | ID: adult18to49C19 Code: Number new confirmed Covid-19 adult ages 18 to 49
Stratifier | ID: adult50to64C19 Code: Number new confirmed Covid-19 adult ages 50 to 64
Stratifier | ID: adult65to74C19 Code: Number new confirmed Covid-19 adult ages 65 to 74
Stratifier | ID: adult75andUpC19 Code: Number new confirmed Covid-19 adult ages 75 plus
Stratifier | ID: adult18to49Flu Code: Number new confirmed Flu adult ages 18 to 49
Stratifier | ID: adult50to64Flu Code: Number new confirmed Flu adult ages 50 to 64
Stratifier | ID: adult65to74Flu Code: Number new confirmed Flu adult ages 65 to 74
Stratifier | ID: adult75andUpFlu Code: Number new confirmed Flu adult ages 75 plus
Stratifier | ID: adult18to49Rsv Code: Number new confirmed RSV adult ages 18 to 49
Stratifier | ID: adult50to64Rsv Code: Number new confirmed RSV adult ages 50 to 64
Stratifier | ID: adult65to74Rsv Code: Number new confirmed RSV adult ages 65 to 74
Stratifier | ID: adult75andUpRsv Code: Number new confirmed RSV adult ages 75 plus
Measure Population Criteria
Initial Population | ID: d2e4301-occupied-adult-inpatient Description: No description provided Logic Definition: Occupied Adult Inpatient Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-ped-inpatient Description: No description provided Logic Definition: Pediatric Inpatient Beds Initial Population
Stratifier | ID: pedInpC19 Code: Number confirmed Covid-19 pediatric hospital patients
Stratifier | ID: pedInpFlu Code: Number confirmed Flu pediatric hospital patients
Stratifier | ID: pedInpRsv Code: Number confirmed RSV pediatric hospital patients
Stratifier | ID: ped0to4C19 Code: Number new confirmed Covid-19 pediatric ages 0 to 4
Stratifier | ID: ped5to17C19 Code: Number new confirmed Covid-19 pediatric ages 5 to 17
Stratifier | ID: ped0to4Flu Code: Number new confirmed Flu pediatric ages 0 to 4
Stratifier | ID: ped5to17Flu Code: Number new confirmed Flu pediatric ages 5 to 17
Stratifier | ID: ped0to4Rsv Code: Number new confirmed RSV pediatric ages 0 to 4
Stratifier | ID: ped5to17Rsv Code: Number new confirmed RSV pediatric ages 5 to 17
Measure Population Criteria
Initial Population | ID: d2e4301-occupied-ped-inpatient Description: No description provided Logic Definition: Occupied Pediatric Inpatient Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-icu Description: No description provided Logic Definition: ICU Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-occupied-icu Description: No description provided Logic Definition: Occupied ICU Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-adult-icu Description: No description provided Logic Definition: Adult ICU Beds Initial Population
Stratifier | ID: adultIcuC19 Code: Number confirmed Covid-19 adult ICU patients
Stratifier | ID: adultIcuFlu Code: Number confirmed Flu adult ICU patients
Stratifier | ID: adultIcuRsv Code: Number confirmed RSV adult ICU patients
Measure Population Criteria
Initial Population | ID: d2e4301-occupied-adult-icu Description: No description provided Logic Definition: Occupied Adult ICU Beds Initial Population
Measure Population Criteria
Initial Population | ID: d2e4301-ped-icu Description: No description provided Logic Definition: Pediatric ICU Beds Initial Population
Stratifier | ID: pedIcuC19 Code: Number confirmed Covid-19 pediatric ICU patients
Stratifier | ID: pedIcuFlu Code: Number confirmed Flu pediatric ICU patients
Stratifier | ID: pedIcuRsv Code: Number confirmed RSV pediatric ICU patients
Measure Population Criteria
Initial Population | ID: d2e4301-occupied-ped-icu Description: No description provided Logic Definition: Occupied Pediatric ICU Beds Initial Population
Measure Logic
Primary Library | HRDMeasure
Dependency | Description: Library FHIRHelpers Resource: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/Library/FHIRHelpers|4.0.1` Canonical URL: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/Library/FHIRHelpers|4.0.1`
Dependency | Description: Code system Time Period Ranges Resource: Time Period Ranges Canonical URL: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Dependency | Description: Code system SNOMEDCT Resource: SNOMED CT (all versions) Canonical URL: `http://snomed.info/sct`
Dependency | Description: Code system LocationPhysicalType Resource: Location type Canonical URL: `http://terminology.hl7.org/CodeSystem/location-physical-type`
Dependency | Description: Code system HealthcareCapacity Resource: Healthcare Bed Capacity Reporting Code System Canonical URL: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Dependency | Description: Code system Observation Category Resource: Observation Category Codes Canonical URL: `http://terminology.hl7.org/CodeSystem/observation-category`
Dependency | Description: Value set COVID_19 (Tests for SARS_CoV_2 Nucleic Acid) Resource: COVID_19 (Tests for SARS_CoV_2 Nucleic Acid) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1142`
Dependency | Description: Value set COVID_19 (Tests for SARS_CoV_2 Antigen) Resource: COVID_19 (Tests for SARS_CoV_2 Antigen) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1158`
Dependency | Description: Value set Influenza (Tests for influenza A or B virus Nucleic Acid) Resource: Influenza (Tests for influenza A or B virus Nucleic Acid) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.336`
Dependency | Description: Value set Influenza (Tests for influenza A or B virus Antigen) Resource: Influenza (Tests for influenza A or B virus Antigen) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.337`
Dependency | Description: Value set RSV (Tests for RSV Antigen) Resource: RSV (Tests for RSV Antigen) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1311`
Dependency | Description: Value set RSV (Tests for RSV Nucleic Acid) Resource: RSV (Tests for RSV Nucleic Acid) Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1312`
Direct Reference Code | Display: 0 DAYS Code: P0D--0D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 1-3 DAYS Code: P1D--3D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 4-6 DAYS Code: P4D--6D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 7-14 DAYS Code: P7D--14D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 15-30 DAYS Code: P15D--30D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: 0 DAYS Code: P30D--9999D System: `http://terminology.hl7.org/CodeSystem/time-period-ranges`
Direct Reference Code | Display: Surgical face mask (physical object) Code: 409528009 System: `http://snomed.info/sct`
Direct Reference Code | Display: Bed Code: bd System: `http://terminology.hl7.org/CodeSystem/location-physical-type`
Direct Reference Code | Display: Children's or Pediatric Code: CHLD System: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Direct Reference Code | Display: Hospital Code: HOSP System: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Direct Reference Code | Display: Other facility-within-facility or subunit Code: OTH System: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Direct Reference Code | Display: Patient gown (physical object) Code: 1141676007 System: `http://snomed.info/sct`
Direct Reference Code | Display: Laboratory Code: laboratory System: `http://terminology.hl7.org/CodeSystem/observation-category`
Direct Reference Code | Display: Detected Code: 260373001 System: `http://snomed.info/sct`
Direct Reference Code | Display: Positive Code: 10828004 System: `http://snomed.info/sct`
Direct Reference Code | Display: Nitrile surgical glove, powdered (physical object) Code: 462245005 System: `http://snomed.info/sct`
Direct Reference Code | Display: Face shield (physical object) Code: 706724001 System: `http://snomed.info/sct`
Direct Reference Code | Display: Inpatient Psychiatric Code: IPF System: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Direct Reference Code | Display: Inpatient Rehabilitation Code: IRF System: `http://www.cdc.gov/nhsn/fhirportal/safr/ig/CodeSystem/nhsn-safr-bed-capacity-codes`
Direct Reference Code | Display: Air-purifying respirator (physical object) Code: 409533008 System: `http://snomed.info/sct`
Parameter | Name: Measurement Period Use: In Min Cardinality: 0 Max Cardinality: 1 Type: Period
Parameter | Name: OR Surgical Mask Supply in Days Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding
Parameter | Name: Occupied Pediatric ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Adult ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Gown 3 Day Supply Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: string
Parameter | Name: Adult ICU COVID_19 Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Glove Supply in Days Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding
Parameter | Name: Face Shield 3 Day Supply Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: string
Parameter | Name: Pediatric Inpatient Influenza Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric ICU RSV Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Adult Inpatient COVID_19 Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Face Shield Supply in Days Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding
Parameter | Name: New RSV Patients with Unknown Age Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Occupied Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Pediatric ICU COVID_19 Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Gown Supply in Days Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding
Parameter | Name: New Adult RSV Patients Between 65 to 74 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Adult ICU Influenza Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Glove 3 Day Supply Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: string
Parameter | Name: New Adult COVID_19 Patients Between 50 to 64 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Occupied Adult ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Adult Inpatient Influenza Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Pediatric COVID_19 Patients Between 0 to 4 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric Inpatient RSV Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Pediatric RSV Patients Between 0 to 4 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: N95 Mask Supply in Days Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding
Parameter | Name: New Pediatric COVID_19 Patients Between 5 to 17 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult RSV Patients Between 50 to 64 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult COVID_19 Patients Between 65 to 74 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Pediatric Influenza Patients Between 5 to 17 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Adult ICU RSV Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult Influenza Patients Between 18 to 49 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult RSV Patients 75 and Above Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: New Adult Influenza Patients Between 50 to 64 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Pediatric Influenza Patients Between 0 to 4 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: N95 Mask 3 Day Supply Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: string
Parameter | Name: Adult Inpatient RSV Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: New Adult RSV Patients Between 18 to 49 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Occupied Adult Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: New Adult COVID_19 Patients Between 18 to 49 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: OR Surgical Mask 3 Day Supply Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: string
Parameter | Name: Adult Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Occupied ICU Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: New Influenza Patients with Unknown Age Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric ICU Influenza Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult Influenza Patients Between 65 to 74 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Pediatric RSV Patients Between 5 to 17 Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Pediatric Inpatient COVID_19 Patients Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: Occupied Pediatric Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: Inpatient Beds Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean
Parameter | Name: New Adult COVID_19 Patients 75 and Above Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New COVID_19 Patients with Unknown Age Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Parameter | Name: New Adult Influenza Patients 75 and Above Stratifier Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: integer
Measure Logic Data Requirements
Data Requirement | Type: Device Profile(s): Device
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: COVID_19 (Tests for SARS_CoV_2 Nucleic Acid)
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: COVID_19 (Tests for SARS_CoV_2 Antigen)
Data Requirement | Type: Location Profile(s): Location
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: Influenza (Tests for influenza A or B virus Nucleic Acid)
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: Influenza (Tests for influenza A or B virus Antigen)
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: RSV (Tests for RSV Antigen)
Data Requirement | Type: Observation Profile(s): Observation Must Support Elements: code Code Filter(s): Path: code ValueSet: RSV (Tests for RSV Nucleic Acid)
Data Requirement | Type: Patient Profile(s): Patient
Data Requirement | Type: Patient Profile(s): Patient Must Support Elements: id, birthDate
Data Requirement | Type: Device Profile(s): Device Must Support Elements: type
Data Requirement | Type: Patient Profile(s): Patient Must Support Elements: birthDate, id
Data Requirement | Type: Encounter Profile(s): Encounter
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: status
Measure Logic Definitions
Logic Definition | Library Name: HRDMeasure
    define "Devices":   [Device]
Logic Definition | Library Name: HRDMeasure
    define "OR Surgical Mask Supply in Days":   Floor( Count(     "Devices" Devices     where Devices.type ~ "Surgical mask"   ) / 10 )
Logic Definition | Library Name: HRDMeasure
    define "OR Surgical Mask Supply in Days Stratifier":   GetDayCode( "OR Surgical Mask Supply in Days" )
Logic Definition | Library Name: HRDMeasure
    define "IsBedLocation":   Location.physicalType ~ "Bed"
Logic Definition | Library Name: HRDMeasure
    define "LocationIsCHLD":   exists(     Location.type types     where types ~ "CHLD"   )
Logic Definition | Library Name: HRDMeasure
    define "LocationIsHOSP":   exists(     Location.type types     where types ~ "HOSP"   )
Logic Definition | Library Name: HRDMeasure
    define "LocationIsOTH":   exists(     Location.type types     where types ~ "OTH"   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric ICU Beds Initial Population":   IsBedLocation   and LocationIsCHLD   and (     LocationIsHOSP     or LocationIsOTH   )
Logic Definition | Library Name: HRDMeasure
    define "Encounters":   [Encounter]
Logic Definition | Library Name: HRDMeasure
    define "EncounterCheck":   exists("Encounters" Encounters   where Encounters.period overlaps "Measurement Period")
Logic Definition | Library Name: HRDMeasure
    define "Occupied Pediatric ICU Beds Initial Population":   "Pediatric ICU Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    define "Adult ICU Beds Initial Population":   IsBedLocation   and (     LocationIsHOSP     or LocationIsOTH   )   and not LocationIsCHLD
Logic Definition | Library Name: HRDMeasure
    define "Gown Supply in Days":   Floor( Count(     "Devices" Devices     where Devices.type ~ "Patient gown"   ) / 5 )
Logic Definition | Library Name: HRDMeasure
    define "Gown 3 Day Supply Stratifier":   if "Gown Supply in Days" > 3 then 'y'   else 'n'
Logic Definition | Library Name: HRDMeasure
    //Functions and Helpers define "COVID_19 Observations":   ( [Observation: "COVID_19 (Tests for SARS_CoV_2 Nucleic Acid)"]      union [Observation: "COVID_19 (Tests for SARS_CoV_2 Antigen)"] ) Observations     where Observations.value ~ "positive"
Logic Definition | Library Name: HRDMeasure
    define "Count Confirmed COVID_19 Patients in Bed Location":   Count(     "Get Confirmed Patient IDs"( "Encounters", "COVID_19 Observations" )   )
Logic Definition | Library Name: HRDMeasure
    define "Adult ICU COVID_19 Patients Stratifier":   if "Adult ICU Beds Initial Population" then     "Count Confirmed COVID_19 Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Glove Supply in Days":   Floor( Count(     "Devices" Devices     where Devices.type ~ "Surgical glove"   ) / 15 )
Logic Definition | Library Name: HRDMeasure
    define "Glove Supply in Days Stratifier":   GetDayCode( "Glove Supply in Days" )
Logic Definition | Library Name: HRDMeasure
    define "Face Shield Supply in Days":   Floor( Count(     "Devices" Devices     where Devices.type ~ "Face shield"   ) / 10 )
Logic Definition | Library Name: HRDMeasure
    define "Face Shield 3 Day Supply Stratifier":   if "Face Shield Supply in Days" > 3 then 'y'   else 'n'
Logic Definition | Library Name: HRDMeasure
    define "LocationIsIPF":   exists(     Location.type types     where types ~ "IPF"   )
Logic Definition | Library Name: HRDMeasure
    define "LocationIsIRF":   exists(     Location.type types     where types ~ "IRF"   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric Inpatient Beds Initial Population":   IsBedLocation   and LocationIsHOSP   and LocationIsCHLD   and not (     LocationIsIPF     or LocationIsIRF   )
Logic Definition | Library Name: HRDMeasure
    define "Influenza Observations":   ( [Observation: "Influenza (Tests for influenza A or B virus Nucleic Acid)"]      union [Observation: "Influenza (Tests for influenza A or B virus Antigen)"] ) Observations     where Observations.value ~ "positive"
Logic Definition | Library Name: HRDMeasure
    define "Count Confirmed Influenza Patients in Bed Location":   Count(     "Get Confirmed Patient IDs"( "Encounters", "Influenza Observations" )   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric Inpatient Influenza Patients Stratifier":   if "Pediatric Inpatient Beds Initial Population" then     "Count Confirmed Influenza Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "RSV Observations":   ( [Observation: "RSV (Tests for RSV Antigen)"]      union [Observation: "RSV (Tests for RSV Nucleic Acid)"] ) Observations     where Observations.value ~ "positive"
Logic Definition | Library Name: HRDMeasure
    define "Count Confirmed RSV Patients in Bed Location":   Count(     "Get Confirmed Patient IDs"( "Encounters", "RSV Observations" )   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric ICU RSV Patients Stratifier":   if "Pediatric ICU Beds Initial Population" then     "Count Confirmed RSV Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Adult Inpatient Beds Initial Population":   IsBedLocation   and LocationIsHOSP   and (     LocationIsIPF     or LocationIsIRF   )   and not LocationIsCHLD
Logic Definition | Library Name: HRDMeasure
    //Stratifiers //COVID_19 define "Adult Inpatient COVID_19 Patients Stratifier":   if "Adult Inpatient Beds Initial Population" then     "Count Confirmed COVID_19 Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Face Shield Supply in Days Stratifier":   GetDayCode( "Face Shield Supply in Days" )
Logic Definition | Library Name: HRDMeasure
    define "Patients":   [Patient]
Logic Definition | Library Name: HRDMeasure
    define "Newly Admitted Encounters":   "Encounters" Encounters   where Encounters.status in { 'in-progress', 'arrived', 'triaged' }
Logic Definition | Library Name: HRDMeasure
    define "Newly Admitted RSV Patient IDs":   "Get Confirmed Patient IDs"( "Newly Admitted Encounters", "RSV Observations" )
Logic Definition | Library Name: HRDMeasure
    define "New RSV Patients with Unknown Age Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location and Unknown Age"( "Newly Admitted RSV Patient IDs" )   )
Logic Definition | Library Name: HRDMeasure
    //Initial Populations define "Inpatient Beds Initial Population":   IsBedLocation   and LocationIsHOSP   and (     LocationIsIPF     or LocationIsIRF     or LocationIsCHLD   )
Logic Definition | Library Name: HRDMeasure
    define "Occupied Inpatient Beds Initial Population":   "Inpatient Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    define "Pediatric ICU COVID_19 Patients Stratifier":   if "Pediatric ICU Beds Initial Population" then     "Count Confirmed COVID_19 Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Gown Supply in Days Stratifier":   GetDayCode( "Gown Supply in Days" )
Logic Definition | Library Name: HRDMeasure
    define "New Adult RSV Patients Between 65 to 74 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted RSV Patient IDs", 65, 74 )   )
Logic Definition | Library Name: HRDMeasure
    define "Adult ICU Influenza Patients Stratifier":   if "Adult ICU Beds Initial Population" then     "Count Confirmed Influenza Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Glove 3 Day Supply Stratifier":   if "Glove Supply in Days" > 3 then 'y'   else 'n'
Logic Definition | Library Name: HRDMeasure
    define "Newly Admitted COVID_19 Patient IDs":   "Get Confirmed Patient IDs"( "Newly Admitted Encounters", "COVID_19 Observations" )
Logic Definition | Library Name: HRDMeasure
    define "New Adult COVID_19 Patients Between 50 to 64 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted COVID_19 Patient IDs", 50, 64 )   )
Logic Definition | Library Name: HRDMeasure
    define "Occupied Adult ICU Beds Initial Population":   "Adult ICU Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    //Influenza define "Adult Inpatient Influenza Patients Stratifier":   if "Adult Inpatient Beds Initial Population" then     "Count Confirmed Influenza Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric COVID_19 Patients Between 0 to 4 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted COVID_19 Patient IDs" , 0, 4 )   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric Inpatient RSV Patients Stratifier":   if "Pediatric Inpatient Beds Initial Population" then     "Count Confirmed RSV Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric RSV Patients Between 0 to 4 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted RSV Patient IDs" , 0, 4 )   )
Logic Definition | Library Name: HRDMeasure
    define "N95 Mask Supply in Days":   Floor( Count(     "Devices" Devices     where Devices.type ~ "N95 mask"   ) / 10 )
Logic Definition | Library Name: HRDMeasure
    //Devices (Supply is divided by average used per day (estimated)) define "N95 Mask Supply in Days Stratifier":   GetDayCode( "N95 Mask Supply in Days" )
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric COVID_19 Patients Between 5 to 17 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted COVID_19 Patient IDs", 5, 17 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Adult RSV Patients Between 50 to 64 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted RSV Patient IDs", 50, 64 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Adult COVID_19 Patients Between 65 to 74 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted COVID_19 Patient IDs", 65, 74 )   )
Logic Definition | Library Name: HRDMeasure
    define "Newly Admitted Influenza Patient IDs":   "Get Confirmed Patient IDs"( "Newly Admitted Encounters", "Influenza Observations" )
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric Influenza Patients Between 5 to 17 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted Influenza Patient IDs", 5, 17 )   )
Logic Definition | Library Name: HRDMeasure
    define "ICU Beds Initial Population":   IsBedLocation   and (     LocationIsHOSP     or LocationIsOTH   )
Logic Definition | Library Name: HRDMeasure
    define "Adult ICU RSV Patients Stratifier":   if "Adult ICU Beds Initial Population" then     "Count Confirmed RSV Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "New Adult Influenza Patients Between 18 to 49 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted Influenza Patient IDs", 18, 49 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Adult RSV Patients 75 and Above Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Above Specified Age"( "Newly Admitted RSV Patient IDs", 75 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Adult Influenza Patients Between 50 to 64 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted Influenza Patient IDs", 50, 64 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric Influenza Patients Between 0 to 4 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted Influenza Patient IDs" , 0, 4 )   )
Logic Definition | Library Name: HRDMeasure
    define "N95 Mask 3 Day Supply Stratifier":   if "N95 Mask Supply in Days" > 3 then 'y'   else 'n'
Logic Definition | Library Name: HRDMeasure
    //RSV define "Adult Inpatient RSV Patients Stratifier":   if "Adult Inpatient Beds Initial Population" then     "Count Confirmed RSV Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "New Adult RSV Patients Between 18 to 49 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted RSV Patient IDs", 18, 49 )   )
Logic Definition | Library Name: HRDMeasure
    define "Occupied Adult Inpatient Beds Initial Population":   "Adult Inpatient Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    define "New Adult COVID_19 Patients Between 18 to 49 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted COVID_19 Patient IDs", 18, 49 )   )
Logic Definition | Library Name: HRDMeasure
    define "OR Surgical Mask 3 Day Supply Stratifier":   if "OR Surgical Mask Supply in Days" > 3 then 'y'   else 'n'
Logic Definition | Library Name: HRDMeasure
    define "Occupied ICU Beds Initial Population":   "ICU Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    define "New Influenza Patients with Unknown Age Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location and Unknown Age"( "Newly Admitted Influenza Patient IDs" )   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric ICU Influenza Patients Stratifier":   if "Pediatric ICU Beds Initial Population" then     "Count Confirmed Influenza Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "New Adult Influenza Patients Between 65 to 74 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted Influenza Patient IDs", 65, 74 )   )
Logic Definition | Library Name: HRDMeasure
    define "New Pediatric RSV Patients Between 5 to 17 Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( "Newly Admitted RSV Patient IDs", 5, 17 )   )
Logic Definition | Library Name: HRDMeasure
    define "Pediatric Inpatient COVID_19 Patients Stratifier":   if "Pediatric Inpatient Beds Initial Population" then     "Count Confirmed COVID_19 Patients in Bed Location"   else 0
Logic Definition | Library Name: HRDMeasure
    define "Occupied Pediatric Inpatient Beds Initial Population":   "Pediatric Inpatient Beds Initial Population"   and EncounterCheck
Logic Definition | Library Name: HRDMeasure
    define "New Adult COVID_19 Patients 75 and Above Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Above Specified Age"( "Newly Admitted COVID_19 Patient IDs", 75 )   )
Logic Definition | Library Name: HRDMeasure
    define "New COVID_19 Patients with Unknown Age Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location and Unknown Age"( "Newly Admitted COVID_19 Patient IDs" )   )
Logic Definition | Library Name: HRDMeasure
    define "New Adult Influenza Patients 75 and Above Stratifier":   Count(     "Get Confirmed Patient IDs in Bed Location Above Specified Age"( "Newly Admitted Influenza Patient IDs", 75 )   )
Logic Definition | Library Name: HRDMeasure
    define function GetDayCode(count Integer):   case     when count = 0 then "0 Days"     when count >= 1 and count <= 3 then "1-3 Days"     when count >= 4 and count <= 6 then "4-6 Days"     when count >= 7 and count <= 14 then "7-14 Days"     when count >= 15 and count <= 30 then "15-30 Days"     when count > 30 then ">30 Days"     else null   end
Logic Definition | Library Name: FHIRHelpers
    define function ToConcept(concept FHIR.CodeableConcept):     if concept is null then         null     else         System.Concept {             codes: concept.coding C return ToCode(C),             display: concept.text.value         }
Logic Definition | Library Name: FHIRHelpers
    define function ToCode(coding FHIR.Coding):     if coding is null then         null     else         System.Code {           code: coding.code.value,           system: coding.system.value,           version: coding.version.value,           display: coding.display.value         }
Logic Definition | Library Name: FHIRHelpers
    define function ToInterval(period FHIR.Period):     if period is null then         null     else         if period."start" is null then             Interval(period."start".value, period."end".value]         else             Interval[period."start".value, period."end".value]
Logic Definition | Library Name: HRDMeasure
    define function "Get Confirmed Patient IDs"( Encounters List<FHIR.Encounter>, Observations List<FHIR.Observation> ):   Distinct(     Encounters Encounter     where exists(       Observations Labs       where exists(         Labs.category category         where category ~ "laboratory"       )       and Encounter.subject = Labs.subject       and Labs.value ~ "detected"       and "Normalize Interval"( Labs.effective ) overlaps Encounter.period     )     return Encounter.subject   )
Logic Definition | Library Name: HRDMeasure
    define function "Normalize Interval"( choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant> ):   case    when choice is FHIR.dateTime then      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]   when choice is FHIR.Period then     FHIRHelpers.ToInterval(choice as FHIR.Period)   when choice is FHIR.instant then    Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]   when choice is FHIR.Timing then     Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')   else    null as Interval<DateTime>  end
Logic Definition | Library Name: FHIRHelpers
    define function ToDateTime(value dateTime): value.value
Logic Definition | Library Name: HRDMeasure
    define function "Get Confirmed Patient IDs in Bed Location and Unknown Age"( PatientIDs List<FHIR.Reference> ):   PatientIDs PatientID   where exists(     "Patients" Patients     where Patients.id = GetId( PatientID.reference )     and Patients.birthDate = null   )
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value string): value.value
Logic Definition | Library Name: HRDMeasure
    define function "GetId"( uri String ):   Last(Split(uri, '/'))
Logic Definition | Library Name: HRDMeasure
    define function "Get Confirmed Patient IDs in Bed Location Between Specified Ages"( PatientIDs List<FHIR.Reference>, low System.Integer, high System.Integer ):   PatientIDs PatientID   where exists(     "Patients" Patients     let PatientAge: CalculateAgeInYearsAt( Patients.birthDate, start of "Measurement Period" )     where Patients.id = GetId( PatientID.reference )     and PatientAge >= low     and PatientAge <= high   )
Logic Definition | Library Name: FHIRHelpers
    define function ToDate(value date): value.value
Logic Definition | Library Name: HRDMeasure
    define function "Get Confirmed Patient IDs in Bed Location Above Specified Age"( PatientIDs List<FHIR.Reference>, age System.Integer ):   PatientIDs PatientID   where exists(     "Patients" Patients     let PatientAge: CalculateAgeInYearsAt( Patients.birthDate, start of "Measurement Period" )     where Patients.id = GetId( PatientID.reference )     and PatientAge >= age   )
Generated using version 0.4.6 of the sample-content-ig Liquid templates