mimic-code icon indicating copy to clipboard operation
mimic-code copied to clipboard

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

Open aishiterulife opened this issue 7 months ago • 0 comments

---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?

aishiterulife avatar May 25 '25 17:05 aishiterulife