This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v1.0.0: STU 1) based on FHIR R3. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions 
| Measure Title | Median ED Visit Duration | Measure ID | EXM55 |
| Description | |||
| Measurement Period | January 1 - December 31 | ||
| Characteristics | |||
| Scoring | Continuous-variable | ||
| Type | Process | ||
| Improvement Notation | A lower rate indicates better performance. | ||
| Definitions | |||
define "Initial Population" :
"Inpatient Encounter" Encounter
with ["Encounter" : "Emergency Department Visit"] ED
such that ED.status = 'finished'
and ED.period ends 1 hour or less before start of Encounter.period
define "Measure Population" : "Initial Population"
define "Measure Population Exclusion" :
"Inpatient Encounter" Encounter
with ["Encounter" : "Emergency Department Visit"] ED
such that ED.period ends 1 hour or less before start of Encounter.period
and ED.status = 'finished'
and ED.hospitalization.admitSource in "Hospital Settings"
define function "Measure Observation" (Encounter "Encounter" ) : duration in minutes of "Related ED Visit"(Encounter).period
define "Stratification 1" :
"Inpatient Encounter" Encounter
where not (PrincipalDiagnosis(Encounter).code in "Psychiatric/Mental Health Patient")
define "Stratification 2" :
"Inpatient Encounter" Encounter
where PrincipalDiagnosis(Encounter).code in "Psychiatric/Mental Health Patient"
define "Stratification 3" :
"Inpatient Encounter" Encounter
where PrincipalDiagnosis(Encounter) is null
define "Initial Population" :
"Inpatient Encounter" Encounter
with ["Encounter" : "Emergency Department Visit"] ED
such that ED.status = 'finished'
and ED.period ends 1 hour or less before start of Encounter.period
define "Inpatient Encounter" :
["Encounter"] Encounter
where LengthInDays(Encounter.period) <= 120
and Encounter.period ends during "Measurement Period"
define "Measure Population" : "Initial Population"
define "Measure Population Exclusion" :
"Inpatient Encounter" Encounter
with ["Encounter" : "Emergency Department Visit"] ED
such that ED.period ends 1 hour or less before start of Encounter.period
and ED.status = 'finished'
and ED.hospitalization.admitSource in "Hospital Settings"
define "Stratification 1" :
"Inpatient Encounter" Encounter
where not (PrincipalDiagnosis(Encounter).code in "Psychiatric/Mental Health Patient")
define "Stratification 2" :
"Inpatient Encounter" Encounter
where PrincipalDiagnosis(Encounter).code in "Psychiatric/Mental Health Patient"
define "Stratification 3" :
"Inpatient Encounter" Encounter
where PrincipalDiagnosis(Encounter) is null
Last(Split(uri, '/'))
difference in days between start of Value and end of Value
define function "Measure Observation" (Encounter "Encounter" ) : duration in minutes of "Related ED Visit"(Encounter).period
(singleton from (Encounter.diagnosis D where D.role ~ ToConcept("Billing") and D.rank = 1)) PD
return singleton from ([Condition: id in "GetId"(PD.condition.reference)])
define function "Related ED Visit" (Encounter "Encounter" ) :
Last(["Encounter" : "Emergency Department Visit"] ED
where ED.status = 'finished'
and ED.period ends 1 hour or less before start of Encounter.period
sort by start of period )