Skip to content

fix(lods): remove incorrect BUN >= 7.50 renal point - #2119

Open
acnimma wants to merge 2 commits into
MIT-LCP:mainfrom
acnimma:fix/lods-bun-threshold-7-50
Open

fix(lods): remove incorrect BUN >= 7.50 renal point#2119
acnimma wants to merge 2 commits into
MIT-LCP:mainfrom
acnimma:fix/lods-bun-threshold-7-50

Conversation

@acnimma

@acnimma acnimma commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the erroneous bun_max >= 7.50 THEN 1 branch from MIMIC-III and MIMIC-IV lods.sql
  • Mirror the deletion in postgres and duckdb dialect copies
  • Document intended BUN mg/dL cutoffs (17 / 28 / 56) beside the renal CASE so a mmol/L-style arm is not reintroduced

Why

Le Gall et al. (JAMA 1996) score serum urea nitrogen as:

  • 0 for BUN < 17 mg/dL
  • 1 for 17–27
  • 3 for 28–55
  • 5 for ≥56

MIMIC stores BUN in mg/dL. The extra >= 7.50 arm incorrectly awarded renal points for BUN ~7.5–16.9 (and sat under the >= 17 check in the same CASE).

Test plan

  • No 7.50 threshold remains in any lods.sql
  • Inline comment cites Le Gall mg/dL cutoffs next to renal scoring
  • LODS renal: BUN 10 → 0; BUN 20 → 1; BUN 30 → 3; BUN 60 → 5 (when other renal inputs allow)

Fixes #1065

@acnimma
acnimma force-pushed the fix/lods-bun-threshold-7-50 branch from ea8536c to 55f3046 Compare July 20, 2026 00:37
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 MIT-LCP#1065
@acnimma
acnimma force-pushed the fix/lods-bun-threshold-7-50 branch from 55f3046 to 61226d3 Compare July 20, 2026 00:38

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this tracks — that >= 7.50 arm was sitting under the >= 17 check so it was quietly giving renal points for bun ~7.5–16.9, which isn't in le gall. deleting it is cleaner than rewriting thresholds. good that you hit both iii and iv + dialects.

@Chessing234

Copy link
Copy Markdown
Contributor

that bun >= 7.50 arm looks like a unit mixup. glad it's gone — maybe add a one-line comment with the intended mg/dl cutoff.

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bun_max >= 7.50 arm was unreachable under bun_max >= 17.0 in the same case, so deleting it is correct for lods. mirrored across iii/iv and all dialects — nice. a short pr note citing the lods paper threshold table would help reviewers who weren't in the original bug report.

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.
@acnimma

acnimma commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Added an inline note beside the renal CASE documenting the Le Gall BUN cutoffs in mg/dL (0 if <17, 1 if 17–27, 3 if 28–55, 5 if ≥56) and warning not to reintroduce mmol/L-style arms like 7.50.

Mirrored in MIMIC-III + MIMIC-IV BigQuery sources and the postgres dialect copies (duckdb transpile drops comments by design). PR body already cites Le Gall et al., JAMA 1996.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lods.sql BUN value

2 participants