Skip to content

Commit 4a3621f

Browse files
committed
round to 4 decimal places, fix null values forcing result to be null
1 parent ddf4d70 commit 4a3621f

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

mimic-iv/concepts/medication/norepinephrine_equivalent_dose.sql

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
-- by Goradia et al. 2020.
44
SELECT stay_id, starttime, endtime
55
-- calculate the dose
6-
, norepinephrine
7-
+ epinephrine
8-
+ phenylephrine/10
9-
+ dopamine/100
6+
, ROUND(COALESCE(norepinephrine, 0)
7+
+ COALESCE(epinephrine, 0)
8+
+ COALESCE(phenylephrine/10, 0)
9+
+ COALESCE(dopamine/100, 0)
1010
-- + metaraminol/8 -- metaraminol not used in BIDMC
11-
+ vasopressin*2.5
11+
+ COALESCE(vasopressin*2.5, 0)
12+
-- angotensin_ii*10 -- angitensin ii rarely used, currently not incorporated
13+
-- (it could be included due to norepinephrine sparing effects)
14+
, 4) AS norepinephrine_equivalent_dose
1215
-- angotensin_ii*10 -- angitensin ii rarely used, currently not incorporated
1316
-- (it could be included due to norepinephrine sparing effects)
1417
AS norepinephrine_equivalent_dose

0 commit comments

Comments
 (0)