Delegate independent tasks to specialized agents working concurrently with isolated context.
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:
- If lowest admission creatinine <= 1.1 mg/dL: Use the lowest value (assumed normal)
- If patient has CKD diagnosis: Use the lowest admission value (even if elevated)
- 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
-
Adults Only: Query filters to age >= 18 (pediatric creatinine norms differ).
-
MDRD Limitations:
- Less accurate in elderly, extremes of body size, or certain ethnicities
- Assumes GFR = 75, which may underestimate for young healthy patients
-
Admission Bias: Using admission creatinine as baseline may underestimate for patients admitted already in AKI (AKI-on-admission).
-
CKD May Be Coded Late: ICD codes are assigned at discharge, so this technically uses future information. In most research this is acceptable.
-
Missing Values: If no creatinine measured during admission, baseline will be NULL.
-
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):
- Outpatient creatinine: Use pre-admission ambulatory values (requires linked outpatient data)
- Rolling minimum: Lowest value in past 7-365 days
- First available: First creatinine of admission (problematic if AKI present)
- 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
brand-guidelines
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.
theme-factory
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.
internal-comms
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.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
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.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
