@@ -39,7 +39,7 @@ There are five distinct values for the code status order in the ICU data:
3939 SELECT p .subject_id
4040 , p .hadm_id
4141 , ie .stay_id
42- , p .order_time
42+ , p .ordertime
4343 , CASE
4444 WHEN pd .field_value = ' Resuscitate (Full code)' THEN 1
4545 WHEN pd .field_value = ' Full code (attempt resuscitation)' THEN 1
@@ -56,10 +56,10 @@ There are five distinct values for the code status order in the ICU data:
5656 FROM ` physionet-data.mimiciv_hosp.poe` p
5757 INNER JOIN ` physionet-data.mimiciv_hosp.poe_detail` pd
5858 ON p .poe_id = pd .poe_id
59- LEFT JOIN ` physiont -data.mimiciv_icu.icustays` ie
59+ LEFT JOIN ` physionet -data.mimiciv_icu.icustays` ie
6060 ON p .hadm_id = ie .hadm_id
61- AND p .order_time >= ie .intime
62- AND p .order_time <= ie .outtime
61+ AND p .ordertime >= ie .intime
62+ AND p .ordertime <= ie .outtime
6363 WHERE p .order_type = ' General Care'
6464 AND order_subtype = ' Code status'
6565)
@@ -72,7 +72,7 @@ SELECT t1.subject_id, t1.hadm_id, t1.stay_id
7272FROM t1
7373UNION ALL
7474SELECT poe .subject_id , poe .hadm_id , poe .stay_id
75- , poe .order_time AS charttime
75+ , poe .ordertime AS charttime
7676 , poe .fullcode , 0 AS cmo, poe .dni , poe .dnr
7777FROM poe
7878;
0 commit comments