MIT-LCP / mimic-code

MIMIC Code Repository: Code shared by the research community for the MIMIC family of databases
https://mimic.mit.edu
MIT License
2.52k stars 1.51k forks source link

Question on the relationship between admissions from "EMERGENCY ROOM" and the MIMIC-ED #1349

Open VoyagerWSH opened 2 years ago

VoyagerWSH commented 2 years ago

Prerequisites

Description

Hi, in the admissions table of MIMIC-IV_v2.0, we noticed that there are 123,879 patients with an admission_location of "EMERGENCY ROOM", and 36,808 (29.71%) of these patients do not have any records in the MIMIC-IV-ED_v2.0 dataset. We are wondering if we should expect patients admitted through the emergency room to be present in the MIMIC-IV-ED dataset? If not, what are the differences between the patients that are included in the ED dataset and the patients that are not included? Thanks in advance!

Here are some code that we used to discover this question:

ed_diagnoses = pd.read_csv(ed_diagnoses_path)
admissions = pd.read_csv(admissions_path)
ed_admits = admissions[admissions['admission_location'] == 'EMERGENCY ROOM']

fig = plt.figure(figsize=(8, 6), dpi=100)
plt.title('Breakdown of patients with admissions that came from the "EMERGENCY ROOM"')
pts_in_ed_diagnoses = set(ed_admits['subject_id']).intersection(set(ed_diagnoses['subject_id']))
pts_not_in_ed_diagnoses = set(ed_admits['subject_id']).difference(set(ed_diagnoses['subject_id']))

assert(len(pts_in_ed_diagnoses)+len(pts_not_in_ed_diagnoses) == len(set(ed_admits['subject_id'])))
sizes = [len(pts_in_ed_diagnoses), len(pts_not_in_ed_diagnoses)]
labels = ['# of patients appeared in ed_diagnoses' + '\n(' + str(len(pts_in_ed_diagnoses)) + ')', '# of patients did not appear in ed_diagnoses' + '\n(' + str(len(pts_not_in_ed_diagnoses)) + ')']
plt.pie(sizes,labels = labels, explode = [0, 0.1], shadow = True, autopct='%1.2f%%')
plt.show()
VoyagerWSH commented 2 years ago

Hi, just following up on this issue:

We are thinking if this is a problem related with the way that the patients are being admitted: for example, if a patient is brought to the hospital by an ambulance and is seriously ill/injured, this patient might be directly admitted without being diagnosed in the ED first. As a result, this visit is admitted from the ED but never have a diagnosis record in the ED, and hence this visit doesn't appear in the ed_diagnoses dataset.

However, there are some potential problems with this hypothesis: as we mentioned in the question, about 30% of the "EMERGENCY ROOM"-admitted patients don't appear in the ed_diagnoses dataset. It seems a little unlikely that such large proportion of patients are that severely ill/injured for immediate admission.

We would love to hear some insights/suggestions on this. Thanks in advance!

alistairewj commented 2 years ago

All emergency admissions should go through the ED. Can you group the admissions by anchor_year_group (offsetting by the difference between admittime and anchor_year as appropriate)? MIMIC-IV-ED only starts in 2011, so these may be admissions between 2008 - 2011. It's a bit under 30% (3 years / 11 years) - but probably it's the major factor.

VoyagerWSH commented 2 years ago

Thank you Alistair! I grouped the subject_id in MIMIC_IV that did not occur in MIMIC-IV-ED by anchor_year_group, and it does seem that more than 80% of these subject_id is anchored between year 2008 and 2011: Screen Shot 2022-09-05 at 8 36 43 PM

One thing to note is that though the numbers are decreasing, there still are some subject_id from MIMIC-IV that does not show up in MIMIC-IV-ED in the later years. Is there a reason why this would happen? Thanks a lot for your time!