From 61226d36b6cf6543263167d58f8dc90ef005e1d1 Mon Sep 17 00:00:00 2001 From: ani Date: Mon, 20 Jul 2026 00:38:07 +0000 Subject: [PATCH 1/2] fix(lods): remove incorrect BUN >= 7.50 renal point Le Gall LODS awards renal +1 for BUN 17-27 mg/dL (then 28-55 -> 3, >=56 -> 5). The extra `bun_max >= 7.50 then 1` branch incorrectly scored BUN 7.5-16.9 as organ dysfunction. Remove it in MIMIC-III and MIMIC-IV sources and their dialect copies. Fixes #1065 --- mimic-iii/concepts/severityscores/lods.sql | 1 - mimic-iii/concepts_duckdb/severityscores/lods.sql | 2 -- mimic-iii/concepts_postgres/severityscores/lods.sql | 2 -- mimic-iv/concepts/score/lods.sql | 1 - mimic-iv/concepts_duckdb/score/lods.sql | 2 -- mimic-iv/concepts_postgres/score/lods.sql | 2 -- 6 files changed, 10 deletions(-) diff --git a/mimic-iii/concepts/severityscores/lods.sql b/mimic-iii/concepts/severityscores/lods.sql index b5c3a7cbb..46cebb7a4 100644 --- a/mimic-iii/concepts/severityscores/lods.sql +++ b/mimic-iii/concepts/severityscores/lods.sql @@ -174,7 +174,6 @@ select when urineoutput >= 10000.0 then 3 when creatinine_max >= 1.20 then 1 when bun_max >= 17.0 then 1 - when bun_max >= 7.50 then 1 else 0 end as renal diff --git a/mimic-iii/concepts_duckdb/severityscores/lods.sql b/mimic-iii/concepts_duckdb/severityscores/lods.sql index d7f62ce3e..c9d4b093c 100644 --- a/mimic-iii/concepts_duckdb/severityscores/lods.sql +++ b/mimic-iii/concepts_duckdb/severityscores/lods.sql @@ -145,8 +145,6 @@ WITH cpap AS ( THEN 1 WHEN bun_max >= 17.0 THEN 1 - WHEN bun_max >= 7.50 - THEN 1 ELSE 0 END AS renal, CASE diff --git a/mimic-iii/concepts_postgres/severityscores/lods.sql b/mimic-iii/concepts_postgres/severityscores/lods.sql index 55422d676..502740f0a 100644 --- a/mimic-iii/concepts_postgres/severityscores/lods.sql +++ b/mimic-iii/concepts_postgres/severityscores/lods.sql @@ -154,8 +154,6 @@ WITH cpap AS ( THEN 1 WHEN bun_max >= 17.0 THEN 1 - WHEN bun_max >= 7.50 - THEN 1 ELSE 0 END AS renal, /* pulmonary */ CASE diff --git a/mimic-iv/concepts/score/lods.sql b/mimic-iv/concepts/score/lods.sql index bc1054023..ab86160f1 100644 --- a/mimic-iv/concepts/score/lods.sql +++ b/mimic-iv/concepts/score/lods.sql @@ -168,7 +168,6 @@ WITH cpap AS ( WHEN urineoutput >= 10000.0 THEN 3 WHEN creatinine_max >= 1.20 THEN 1 WHEN bun_max >= 17.0 THEN 1 - WHEN bun_max >= 7.50 THEN 1 ELSE 0 END AS renal diff --git a/mimic-iv/concepts_duckdb/score/lods.sql b/mimic-iv/concepts_duckdb/score/lods.sql index c3889ca5d..5c1d1c42c 100644 --- a/mimic-iv/concepts_duckdb/score/lods.sql +++ b/mimic-iv/concepts_duckdb/score/lods.sql @@ -148,8 +148,6 @@ WITH cpap AS ( THEN 1 WHEN bun_max >= 17.0 THEN 1 - WHEN bun_max >= 7.50 - THEN 1 ELSE 0 END AS renal, CASE diff --git a/mimic-iv/concepts_postgres/score/lods.sql b/mimic-iv/concepts_postgres/score/lods.sql index db27acc26..8e12232a7 100644 --- a/mimic-iv/concepts_postgres/score/lods.sql +++ b/mimic-iv/concepts_postgres/score/lods.sql @@ -153,8 +153,6 @@ WITH cpap AS ( THEN 1 WHEN bun_max >= 17.0 THEN 1 - WHEN bun_max >= 7.50 - THEN 1 ELSE 0 END AS renal, /* pulmonary */ CASE From 55bf38ba75da5bb177338a1c0d38deb4aabbbb34 Mon Sep 17 00:00:00 2001 From: ani Date: Thu, 6 Aug 2026 12:29:18 -0500 Subject: [PATCH 2/2] docs(lods): note BUN mg/dL cutoffs beside renal CASE Document Le Gall 17/28/56 mg/dL thresholds next to the renal score so mmol/L-style arms (e.g. 7.50) are not reintroduced. Mirror in postgres. --- mimic-iii/concepts/severityscores/lods.sql | 2 ++ mimic-iii/concepts_postgres/severityscores/lods.sql | 2 +- mimic-iv/concepts/score/lods.sql | 2 ++ mimic-iv/concepts_postgres/score/lods.sql | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mimic-iii/concepts/severityscores/lods.sql b/mimic-iii/concepts/severityscores/lods.sql index 46cebb7a4..c5c820169 100644 --- a/mimic-iii/concepts/severityscores/lods.sql +++ b/mimic-iii/concepts/severityscores/lods.sql @@ -161,6 +161,8 @@ select end as cardiovascular -- renal + -- BUN cutoffs are mg/dL (Le Gall et al., JAMA 1996): 0 if <17, 1 if 17-27, + -- 3 if 28-55, 5 if >=56. Do not add mmol/L-style thresholds (e.g. 7.50). , case when bun_max is null or urineoutput is null diff --git a/mimic-iii/concepts_postgres/severityscores/lods.sql b/mimic-iii/concepts_postgres/severityscores/lods.sql index 502740f0a..6d3ced70b 100644 --- a/mimic-iii/concepts_postgres/severityscores/lods.sql +++ b/mimic-iii/concepts_postgres/severityscores/lods.sql @@ -134,7 +134,7 @@ WITH cpap AS ( WHEN sysbp_min < 90 THEN 1 ELSE 0 - END AS cardiovascular, /* renal */ + END AS cardiovascular, /* renal */ /* BUN cutoffs are mg/dL (Le Gall et al., JAMA 1996): 0 if <17, 1 if 17-27, */ /* 3 if 28-55, 5 if >=56. Do not add mmol/L-style thresholds (e.g. 7.50). */ CASE WHEN bun_max IS NULL OR urineoutput IS NULL OR creatinine_max IS NULL THEN NULL diff --git a/mimic-iv/concepts/score/lods.sql b/mimic-iv/concepts/score/lods.sql index ab86160f1..89adccd1d 100644 --- a/mimic-iv/concepts/score/lods.sql +++ b/mimic-iv/concepts/score/lods.sql @@ -155,6 +155,8 @@ WITH cpap AS ( END AS cardiovascular -- renal + -- BUN cutoffs are mg/dL (Le Gall et al., JAMA 1996): 0 if <17, 1 if 17-27, + -- 3 if 28-55, 5 if >=56. Do not add mmol/L-style thresholds (e.g. 7.50). , CASE WHEN bun_max IS NULL OR urineoutput IS NULL diff --git a/mimic-iv/concepts_postgres/score/lods.sql b/mimic-iv/concepts_postgres/score/lods.sql index 8e12232a7..1f29df1db 100644 --- a/mimic-iv/concepts_postgres/score/lods.sql +++ b/mimic-iv/concepts_postgres/score/lods.sql @@ -133,7 +133,7 @@ WITH cpap AS ( WHEN sbp_min < 90 THEN 1 ELSE 0 - END AS cardiovascular, /* renal */ + END AS cardiovascular, /* renal */ /* BUN cutoffs are mg/dL (Le Gall et al., JAMA 1996): 0 if <17, 1 if 17-27, */ /* 3 if 28-55, 5 if >=56. Do not add mmol/L-style thresholds (e.g. 7.50). */ CASE WHEN bun_max IS NULL OR urineoutput IS NULL OR creatinine_max IS NULL THEN NULL