Skip to content

Commit 1fe4366

Browse files
fix: include CCO/Arctic Sun temps in III vitals
Same itemids as IV vitalsign (MIT-LCP#1358): 226329, 227632, 227634. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d7ec3d5 commit 1fe4366

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

mimic-iii/concepts/firstday/vitals_first_day.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ FROM (
3838
when itemid in (456,52,6702,443,220052,220181,225312) and valuenum > 0 and valuenum < 300 then 4 -- MeanBP
3939
when itemid in (615,618,220210,224690) and valuenum > 0 and valuenum < 70 then 5 -- RespRate
4040
when itemid in (223761,678) and valuenum > 70 and valuenum < 120 then 6 -- TempF, converted to degC in valuenum call
41-
when itemid in (223762,676) and valuenum > 10 and valuenum < 50 then 6 -- TempC
41+
when itemid in (223762,676,226329,227632,227634) and valuenum > 10 and valuenum < 50 then 6 -- TempC
4242
when itemid in (646,220277) and valuenum > 0 and valuenum <= 100 then 7 -- SpO2
4343
when itemid in (807,811,1529,3745,3744,225664,220621,226537) and valuenum > 0 then 8 -- Glucose
4444

@@ -110,7 +110,10 @@ FROM (
110110
223762, -- "Temperature Celsius"
111111
676, -- "Temperature C"
112112
223761, -- "Temperature Fahrenheit"
113-
678 -- "Temperature F"
113+
678, -- "Temperature F"
114+
226329, -- Blood Temperature CCO (C)
115+
227632, -- Arctic Sun/Alsius Temp # 1 C
116+
227634 -- Arctic Sun/Alsius Temp # 2 C
114117

115118
)
116119
) pvt

mimic-iii/concepts/pivot/pivoted_vital.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ with ce as
1111
, (case when itemid in (456,52,6702,443,220052,220181,225312) and valuenum > 0 and valuenum < 300 then valuenum else null end) as meanbp
1212
, (case when itemid in (615,618,220210,224690) and valuenum > 0 and valuenum < 70 then valuenum else null end) as resprate
1313
, (case when itemid in (223761,678) and valuenum > 70 and valuenum < 120 then (valuenum-32)/1.8 -- converted to degC in valuenum call
14-
when itemid in (223762,676) and valuenum > 10 and valuenum < 50 then valuenum else null end) as tempc
14+
when itemid in (223762,676,226329,227632,227634) and valuenum > 10 and valuenum < 50 then valuenum else null end) as tempc
1515
, (case when itemid in (646,220277) and valuenum > 0 and valuenum <= 100 then valuenum else null end) as spo2
1616
, (case when itemid in (807,811,1529,3745,3744,225664,220621,226537) and valuenum > 0 then valuenum else null end) as glucose
1717
FROM `physionet-data.mimiciii_clinical.chartevents` ce
@@ -74,7 +74,10 @@ with ce as
7474
223762, -- "Temperature Celsius"
7575
676, -- "Temperature C"
7676
223761, -- "Temperature Fahrenheit"
77-
678 -- "Temperature F"
77+
678, -- "Temperature F"
78+
226329, -- Blood Temperature CCO (C)
79+
227632, -- Arctic Sun/Alsius Temp # 1 C
80+
227634 -- Arctic Sun/Alsius Temp # 2 C
7881

7982
)
8083
)

0 commit comments

Comments
 (0)