Skip to content

Fix KDIGO AKI Stage 3 SCr criterion to use a +0.3 increase instead of hardcoded 3.7#2006

Closed
Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/kdigo-stage3-scr-increase
Closed

Fix KDIGO AKI Stage 3 SCr criterion to use a +0.3 increase instead of hardcoded 3.7#2006
Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/kdigo-stage3-scr-increase

Conversation

@Chessing234
Copy link
Copy Markdown

Bug

In kdigo_stages.sql, the creatinine-based AKI Stage 3 branch for patients reaching SCr >= 4.0 mg/dL is meant to require an acute increase of >= 0.3 within 48 hours (or >= 1.5x baseline), per the KDIGO 2012 AKI guideline (p.21). It is implemented as:

when cr.creat >= 4
  and (cr.creat_low_past_48hr <= 3.7 OR cr.creat >= (1.5*cr.creat_low_past_7day))
  then 3

Root cause

The hardcoded creat_low_past_48hr <= 3.7 only encodes a 0.3 increase when creat is exactly 4.0 (4.0 − 3.7 = 0.3). For any creatinine above 4.0 the test no longer matches the intended threshold. For example, creat = 5.0 with a 48h low of 3.8 is a real increase of 1.2 mg/dL — clearly Stage 3 — yet 3.8 <= 3.7 is false and the 1.5x-baseline arm may also fail, so the patient is not flagged.

Fix

Replace the hardcoded 3.7 with the actual >= 0.3 increase condition, matching the comment directly above it:

and (cr.creat >= (cr.creat_low_past_48hr + 0.3) OR cr.creat >= (1.5*cr.creat_low_past_7day))

This is the change confirmed by the maintainer in #1357. Applied to both the MIMIC-IV and MIMIC-III BigQuery source files (the reporter noted both are affected). The concepts_postgres/concepts_duckdb copies are auto-generated from these sources and should be regenerated via the conversion scripts.

Fixes #1357

… hardcoded 3.7

The Stage 3 branch for patients reaching SCr >= 4.0 mg/dL is supposed to
require an acute increase of >= 0.3 within 48h (or >= 1.5x baseline). The
condition was written as creat_low_past_48hr <= 3.7, which only equals a
0.3 increase when creat is exactly 4.0. For any creatinine above 4.0 (e.g.
creat = 5.0 with a 48h low of 3.8) the real increase can be well above 0.3
yet still be missed, so genuine Stage 3 AKI is not flagged. Replace the
hardcoded 3.7 with creat >= creat_low_past_48hr + 0.3.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Chessing234 Chessing234 closed this by deleting the head repository May 29, 2026
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.

MIMIC-IV KDIGO AKI Stage 3 is wrongly defined

1 participant