Skip to content

Commit 1385ec4

Browse files
fix: score SAPS II fever before the normal-temp arm
tempc_min < 39 was checked first, so fever with max ≥ 39 almost never scored. Match MIMIC-IV / Le Gall: ≥39 → 3, else 0. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3a914fc commit 1385ec4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

mimic-iii/concepts/severityscores/sapsii.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ select
239239

240240
, case
241241
when tempc_max is null then null
242-
when tempc_min < 39.0 then 0
243242
when tempc_max >= 39.0 then 3
243+
when tempc_min < 39.0 then 0
244244
end as temp_score
245245

246246
, case

mimic-iii/concepts_duckdb/severityscores/sapsii.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ WITH cpap AS (
213213
CASE
214214
WHEN tempc_max IS NULL
215215
THEN NULL
216-
WHEN tempc_min < 39.0
217-
THEN 0
218216
WHEN tempc_max >= 39.0
219217
THEN 3
218+
WHEN tempc_min < 39.0
219+
THEN 0
220220
END AS temp_score,
221221
CASE
222222
WHEN pao2fio2_vent_min IS NULL

mimic-iii/concepts_postgres/severityscores/sapsii.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ WITH cpap AS (
222222
CASE
223223
WHEN tempc_max IS NULL
224224
THEN NULL
225-
WHEN tempc_min < 39.0
226-
THEN 0
227225
WHEN tempc_max >= 39.0
228226
THEN 3
227+
WHEN tempc_min < 39.0
228+
THEN 0
229229
END AS temp_score,
230230
CASE
231231
WHEN pao2fio2_vent_min IS NULL

0 commit comments

Comments
 (0)