MIT-LCP / MIT-LCP/mimic-code

Querying the extraction of enteral nutrition data: In the mimiciv_icu database, is the extraction of all enteral nutrition data correct?

Open
#1,904 0 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

---method1:
WITH t1 AS(
SELECT subject_id, hadm_id, stay_id, itemid AS EN_itemid,starttime as EN_starttime, endtime as EN_endtime,amount
FROM mimiciv_icu.inputevents
WHERE ordercategoryname like '%Enteral Nutrition%'),--Enteral nutrition in the inputevents table
T1 AS(
SELECT subject_id,hadm_id,stay_id,itemid AS EN_itemid,starttime as EN_starttime, endtime as EN_endtime,amount
FROM mimiciv_icu.ingredientevents
WHERE itemid in (220490,226221,227075,227080)--Enteral nutrition in the ingredientevents table
SELECT *
FROM t1
UNION ALL
SELECT *
FROM t2
---method2:
SELECT subject_id, hadm_id, stay_id, itemid AS EN_itemid,starttime as EN_starttime, endtime as EN_endtime,amount
FROM mimiciv_icu.inputevents
WHERE ordercategoryname like '%Enteral Nutrition%'
Which of these two methods is correct, or are both of them wrong?

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

No files or tests are named. Start with the two SQL queries in the issue, then inspect the mimiciv_icu.inputevents and mimiciv_icu.ingredientevents table definitions and the listed item IDs. Done means determining whether either source, or their combination, correctly represents enteral nutrition data and documenting the validated query.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
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.