Clinical Decision Support Systems (CDSS) & Healthcare AI

KidneyCare: Explainable Clinical Decision Support System for Nephrology

Deterministic 33-Situation Clinical Classification and Longitudinal Lab Validity Handling

Author(s)

Muhammad Hammad Irfan

Academic / Industry Supervision

Dr. Syed Imran Ali (SEECS, NUST)

Institution & Collaborators

SEECS, National University of Sciences and Technology (NUST) • Kyung Hee University Hospital (South Korea) — collaborating domain-knowledge partner

Industry Project in collaboration with Kyung Hee University Hospital

Timeline & Funding

June 2025 – February 2026

Clinical Situations
33 States
Physician-validated deterministic classification derived from clinical group, PTH, calcium, and phosphate categories
Design Principle
Fully Explainable
Every recommendation is traceable to the specific rule and situation that produced it — no black-box prediction
Validity Windows
Per-Test
Each lab type enforces its own validity window before a result can inform a recommendation
Validation
Historical Records
Rule engine validated against historical patient records from Kyung Hee University Hospital

Abstract & Executive Summary

Managing Chronic Kidney Disease – Mineral and Bone Disorder (CKD-MBD) requires nephrologists to synthesize interdependent laboratory parameters — including intact Parathyroid Hormone (iPTH), serum calcium, and phosphate — across time-stamped patient visits, where correcting one biomarker frequently affects another. In safety-critical clinical contexts, black-box probabilistic models are difficult to justify due to a lack of explainability and auditability. In this project, developed with SEECS, NUST in collaboration with nephrologists at Kyung Hee University Hospital, we engineered a deterministic, rule-based clinical decision support system. The engine classifies patients into one of 33 physician-validated clinical situations, enforces validity windows on lab recency so outdated results cannot silently influence a recommendation, computes corrected calcium from serum albumin, and compares current results against a patient's most recent prior visit to support longitudinal, guideline-informed treatment recommendations.

#Clinical Decision Support#Healthcare Informatics#Deterministic AI#CKD-MBD Management#Explainable AI

1. Clinical Challenge & Nephrology Context

The Cognitive Load of CKD-MBD Management

Chronic Kidney Disease – Mineral and Bone Disorder (CKD-MBD) involves interconnected biochemical abnormalities in calcium, phosphorus, and PTH metabolism. In practice, nephrologists must: 1. Interpret interdependent biomarkers, where an intervention on one parameter (e.g. a phosphate binder) can affect another (e.g. serum calcium). 2. Work around missing or outdated lab values without making unsupported clinical assumptions. 3. Track longitudinal trends between visits — for example, whether iPTH is rising, stable, or responding to treatment. Manual review of fragmented lab histories under these constraints carries real cognitive load and risk of oversight.

Key Insights & Methodology

  • Multi-parameter feedback loops in CKD-MBD create real decision complexity.
  • Outdated lab results can lead to inappropriate treatment adjustments if used uncritically.
  • Clinical decision-support software needs to be explainable, not just accurate.

2. The 33-Situation Classification Matrix

Translating Physician-Validated Clinical Logic into Deterministic Rules

Working from clinical guidelines, rule matrices, and heuristic decision boundaries provided by nephrologists at Kyung Hee University Hospital, the clinical space was formalized into 33 discrete situations based on: - **Clinical Group**: derived from broader diagnostic classification. - **iPTH Thresholds and Trends**: target range vs. suppressed vs. elevated, evaluated alongside the direction of change from the prior visit. - **Corrected Calcium and Serum Phosphate**: threshold-based categories, with calcium corrected for serum albumin.

Corrected Calcium Formula

A standard clinical adjustment used when serum albumin is abnormal, since total measured calcium underestimates physiologically active calcium in that case: Corrected Calcium (mg/dL) = Total Measured Calcium + 0.8 × (4.0 − Serum Albumin [g/dL]) The engine applies this correction before evaluating any calcium-dependent branch of the rule matrix.

3. Longitudinal Trend Handling & Lab Validity Windows

Preventing Stale Data From Silently Influencing a Recommendation

Patients rarely have every lab test drawn on the same schedule — iPTH is typically tested far less frequently than calcium or phosphate. Treating a months-old iPTH value as current alongside a same-day phosphate result risks a misleading combined read. The system tracks each lab type against its own validity window, and flags a recommendation as needing a fresh draw when a relevant value has expired, rather than silently proceeding on stale data.

Note on specific validity-window lengths

Exact day-count thresholds per test type are implementation-specific — confirm the real values from the codebase before publishing specific numbers here, rather than listing placeholder figures.

4. System Engineering

Next.js, Supabase, and Role-Based Access

The clinical assistant is built with Next.js and Supabase (PostgreSQL), with role-based access control separating doctor and administrative workflows. Every generated recommendation is traceable back to the specific rule and clinical situation that produced it, and a physician can review, override, and re-save a recommendation without creating duplicate records, using an upsert-based persistence model.

Key Insights & Methodology

  • Rule-level traceability lets a physician inspect exactly why a recommendation was generated.
  • Deterministic logic avoids the unpredictability of a black-box model in a safety-critical context.
  • Row-Level Security policies scope data access appropriately by role.

Cite This Technical Report / Research

@misc{irfan2026kidneycare,
  title={KidneyCare: Explainable Clinical Decision Support System for Nephrology},
  author={Irfan, Muhammad Hammad},
  howpublished={SEECS, NUST — Industry Project with Kyung Hee University Hospital},
  year={2026},
  url={https://github.com/MuhammadHammadIrfan/kidneycare-assistant}
}