Skip to content
baseline-creatinine logo

Baseline Creatinine Estimation

baseline-creatinine

Estimate baseline serum creatinine for AKI assessment in MIMIC-IV. Use for KDIGO staging, AKI research, or renal function baseline establishment.

SKILL.md

Full skill instructions

Baseline Creatinine Estimation

Estimates the patient's baseline (pre-illness) serum creatinine, which is critical for accurate AKI staging. The true baseline is often unknown; this query uses a hierarchical approach.

When to Use This Skill

  • KDIGO AKI staging (requires baseline comparison)
  • AKI research cohorts
  • Chronic kidney disease identification
  • Renal function trajectory analysis

Baseline Determination Rules

The baseline creatinine is determined hierarchically:

  1. If lowest admission creatinine <= 1.1 mg/​dL: Use the lowest value (assumed normal)
  2. If patient has CKD diagnosis: Use the lowest admission value (even if elevated)
  3. Otherwise: Estimate baseline using MDRD equation assuming GFR = 75 mL/​min/​1.73m^2

Pre-computed Table

SELECT
    hadm_id,
    gender,
    age,
    scr_min,      -- Lowest creatinine during admission
    ckd,          -- 1 if CKD diagnosis present
    mdrd_est,     -- Estimated creatinine from MDRD
    scr_baseline  -- Final baseline determination
FROM mimiciv_derived.creatinine_baseline;

MDRD Estimation Formula

For patients without normal creatinine and without CKD, baseline is estimated:

Male patients:

scr_baseline = (75 / 186 / age^(-0.203))^(-1/​1.154)

Female patients:

scr_baseline = (75 / 186 / age^(-0.203) / 0.742)^(-1/​1.154)

This back-calculates creatinine assuming eGFR = 75 mL/​min/​1.73m^2 (lower limit of normal).

CKD Identification

CKD is identified from ICD codes:

  • ICD-9: 585 (Chronic kidney disease)
  • ICD-10: N18 (Chronic kidney disease)

Critical Implementation Notes

  1. Adults Only: Query filters to age >= 18 (pediatric creatinine norms differ).

  2. MDRD Limitations:

    • Less accurate in elderly, extremes of body size, or certain ethnicities
    • Assumes GFR = 75, which may underestimate for young healthy patients
  3. Admission Bias: Using admission creatinine as baseline may underestimate for patients admitted already in AKI (AKI-on-admission).

  4. CKD May Be Coded Late: ICD codes are assigned at discharge, so this technically uses future information. In most research this is acceptable.

  5. Missing Values: If no creatinine measured during admission, baseline will be NULL.

  6. Race Coefficient: The original MDRD had a race coefficient; this implementation does not use it, consistent with recent guidelines removing race from eGFR calculations.

Example: Baseline Distribution

SELECT
    CASE
        WHEN scr_min <= 1.1 THEN 'Normal admission Cr'
        WHEN ckd = 1 THEN 'CKD (using min)'
        ELSE 'MDRD estimated'
    END AS baseline_source,
    COUNT(*) AS n_admissions,
    ROUND(AVG(scr_baseline), 2) AS avg_baseline
FROM mimiciv_derived.creatinine_baseline
GROUP BY 1;

Example: Compare Baseline vs Admission Creatinine

SELECT
    cb.hadm_id,
    cb.scr_baseline,
    cb.scr_min AS admission_min_cr,
    ROUND(cb.scr_min / NULLIF(cb.scr_baseline, 0), 2) AS cr_ratio,
    CASE
        WHEN cb.scr_min >= cb.scr_baseline * 1.5 THEN 'AKI Stage 1+'
        ELSE 'No AKI at admission'
    END AS admission_aki_status
FROM mimiciv_derived.creatinine_baseline cb
WHERE cb.scr_baseline IS NOT NULL;

Example: Age-Stratified Estimated Baselines

SELECT
    CASE
        WHEN age < 40 THEN '<40'
        WHEN age < 60 THEN '40-59'
        WHEN age < 80 THEN '60-79'
        ELSE '80+'
    END AS age_group,
    gender,
    ROUND(AVG(mdrd_est), 2) AS avg_mdrd_baseline
FROM mimiciv_derived.creatinine_baseline
WHERE ckd = 0 AND scr_min > 1.1
GROUP BY 1, 2
ORDER BY 1, 2;

Alternative Baseline Methods

Other approaches used in literature (not implemented here):

  1. Outpatient creatinine: Use pre-admission ambulatory values (requires linked outpatient data)
  2. Rolling minimum: Lowest value in past 7-365 days
  3. First available: First creatinine of admission (problematic if AKI present)
  4. Fixed MDRD: Always use MDRD with assumed GFR (consistent but may miss true normal)

References

  • KDIGO Clinical Practice Guideline for Acute Kidney Injury. Kidney International Supplements. 2012.
  • Siew ED et al. "Estimating baseline kidney function in hospitalized patients with impaired kidney function." Clinical Journal of the American Society of Nephrology. 2012;7(5):712-719.

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View