You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the hosp.admissions table contains ED visits without admission to an inpatient unit, what is the best way to determine an inpatient admission, regardless of the patient journey starting in the ED or otherwise?
--SQL demonstrates ED visits without a transfer to an inpatient unit
select count(*)
from hosp.admissions a
where a.admission_location = 'EMERGENCY ROOM'
-- transfer to a non-ED unit does not exist
and not exists (select 1 from hosp.transfers t where a.hadm_id = t.hadm_id and careunit not in ('Emergency Department Observation', 'Emergency Department'))
Should I simply do the below? It defines inpatient admission as having a transfer to a non-ED unit. I assume a patient that only stays in one unit still has a row in hosp.transfers.
select count(*)
from hosp.admissions a
-- transfer exists to a non-ED unit
where exists (select 1 from hosp.transfers t where a.hadm_id = t.hadm_id and careunit not in ('Emergency Department Observation', 'Emergency Department'))
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Given the hosp.admissions table contains ED visits without admission to an inpatient unit, what is the best way to determine an inpatient admission, regardless of the patient journey starting in the ED or otherwise?
--SQL demonstrates ED visits without a transfer to an inpatient unit
select count(*)
from hosp.admissions a
where a.admission_location = 'EMERGENCY ROOM'
-- transfer to a non-ED unit does not exist
and not exists (select 1 from hosp.transfers t where a.hadm_id = t.hadm_id and careunit not in ('Emergency Department Observation', 'Emergency Department'))
Should I simply do the below? It defines inpatient admission as having a transfer to a non-ED unit. I assume a patient that only stays in one unit still has a row in hosp.transfers.
select count(*)
from hosp.admissions a
-- transfer exists to a non-ED unit
where exists (select 1 from hosp.transfers t where a.hadm_id = t.hadm_id and careunit not in ('Emergency Department Observation', 'Emergency Department'))
Thank you!
Matthew
Beta Was this translation helpful? Give feedback.
All reactions