File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
mimic-iv/concepts/measurement Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ with ce_stg1 as
66 , ce .charttime
77 , CASE
88 -- merge o2 flows into a single row
9- WHEN itemid IN (223834 , 227582 , 224691 ) THEN 223834
9+ WHEN itemid IN (223834 , 227582 ) THEN 223834
1010 ELSE itemid END AS itemid
1111 , value
1212 , valuenum
@@ -18,9 +18,10 @@ with ce_stg1 as
1818 (
1919 223834 -- o2 flow
2020 , 227582 -- bipap o2 flow
21- , 224691 -- Flow Rate (L)
2221 -- additional o2 flow is its own column
2322 , 227287 -- additional o2 flow
23+ -- below flow rate is *not* o2 flow, and not included
24+ -- , 224691 -- Flow Rate (L)
2425 )
2526)
2627, ce_stg2 AS
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ with ce as
4848 , 223849 -- vent mode
4949 , 229314 -- vent mode (Hamilton)
5050 , 223848 -- vent type
51+ , 224691 -- Flow Rate (L)
5152 )
5253)
5354SELECT
6465 , MAX (CASE WHEN itemid = 224696 THEN valuenum ELSE NULL END) AS plateau_pressure
6566 , MAX (CASE WHEN itemid in (220339 , 224700 ) THEN valuenum ELSE NULL END) AS peep
6667 , MAX (CASE WHEN itemid = 223835 THEN valuenum ELSE NULL END) AS fio2
68+ , MAX (CASE WHEN itemid = 224691 THEN valuenum ELSE NULL END) AS flow_rate
6769 , MAX (CASE WHEN itemid = 223849 THEN value ELSE NULL END) AS ventilator_mode
6870 , MAX (CASE WHEN itemid = 229314 THEN value ELSE NULL END) AS ventilator_mode_hamilton
6971 , MAX (CASE WHEN itemid = 223848 THEN value ELSE NULL END) AS ventilator_type
You can’t perform that action at this time.
0 commit comments