About this work

Purpose
Turn a routine electrolyte panel (sodium, chloride, bicarbonate; optional potassium and albumin) into a computed anion gap — (Na + K) − (Cl + HCO₃), or Na − (Cl + HCO₃) without potassium — an albumin-corrected gap (+ 0.25 × (40 − albumin)), a classification band (normal, low < 8 mmol/L, high, or very high ≥ 20 mmol/L, with a high gap flagged for a HAGMA differential), and flagged issues that direct further investigation. It is a decision-support prompt, not a diagnosis.
Specification
Spec-driven: the living domain spec defines the data model, the anion-gap formula and albumin correction, and the classification and flag rules. The same engine grades both the form and the dashboard.
Documentation
Drawn from Kraut & Madias (CJASN 2007) and Figge et al. (Crit Care Med 1998). A high gap should trigger a structured search for the cause (GOLDMARK / MUDPILES). A normal gap does not exclude a normal-gap (hyperchloraemic) acidosis.