Skip to content

Commit 5eb083e

Browse files
committed
add cast as numeric to round statement
1 parent 842e1b6 commit 5eb083e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mimic-iv/concepts/measurement/vitalsign.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ select
1212
, AVG(case when itemid = 220180 and valuenum > 0 and valuenum < 300 then valuenum else null end) as dbp_ni
1313
, AVG(case when itemid = 220181 and valuenum > 0 and valuenum < 300 then valuenum else null end) as mbp_ni
1414
, AVG(case when itemid in (220210,224690) and valuenum > 0 and valuenum < 70 then valuenum else null end) as resp_rate
15-
, ROUND(
15+
, ROUND(CAST(
1616
AVG(case when itemid in (223761) and valuenum > 70 and valuenum < 120 then (valuenum-32)/1.8 -- converted to degC in valuenum call
1717
when itemid in (223762) and valuenum > 10 and valuenum < 50 then valuenum else null end)
18-
, 2) as temperature
18+
AS NUMERIC), 2) as temperature
1919
, MAX(CASE WHEN itemid = 224642 THEN value ELSE NULL END) AS temperature_site
2020
, AVG(case when itemid in (220277) and valuenum > 0 and valuenum <= 100 then valuenum else null end) as spo2
2121
, AVG(case when itemid in (225664,220621,226537) and valuenum > 0 then valuenum else null end) as glucose

0 commit comments

Comments
 (0)