Thank you for question on CMS871v3: Hospital Harm - Severe Hyperglycemia. The measure is looking for emergency department (ED) admission (not arrival time), as well as relevantPeriod (not locationPeriod). Per the Quality Data Model (QDM), version 5.6 (
https://ecqi.healthit.gov/sites/default/files/QDM-v5.6-508.pdf), relevantPeriod addresses the concept principal diagnosis as “Encounter, Performed” diagnosis with rank=1:
startTime – The time the encounter began (admission time)
stopTime – The time the encounter ended (discharge time)
Per the logic below:
"Inpatient hospitalizations include the time in the emergency department and observation when the transition between these encounters (if they exist) and the inpatient encounter are within an hour or less of each other”. Therefore, if there is an ED admission and visit that ends within one hour of the start of the inpatient encounter, then the start of the inpatient hospitalization will begin at the start of the ED admission.
Global.HospitalizationWithObservation(Encounter "Encounter, Performed")
Encounter Visit
let ObsVisit: Last(["Encounter, Performed": "Observation Services"] LastObs
where LastObs.relevantPeriod ends 1 hour or less on or before start of Visit.relevantPeriod
sort by
end of relevantPeriod),
VisitStart: Coalesce(start of ObsVisit.relevantPeriod, start of Visit.relevantPeriod),
EDVisit: Last(["Encounter, Performed": "Emergency Department Visit"] LastED
where LastED.relevantPeriod ends 1 hour or less on or before VisitStart
sort by
end of relevantPeriod )
return Interval[Coalesce(start of EDVisit.relevantPeriod, VisitStart),
end of Visit.relevantPeriod]