MIT-LCP / MIT-LCP/mimic-code

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

Open
#1,349 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
3.4k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

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()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MIMIC documentation linked in the issue, then inspect the MIMIC-IV admissions and MIMIC-IV-ED tables, especially ed_diagnoses and the admission_location field. Reproduce the provided pandas comparison and determine whether the datasets are expected to contain the same patients; done means documenting the relationship and explaining the observed difference.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data, databases
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.