Heaping screen of all variables¶
Every hand-entered clinical value and every lab analyte was screened for mixed resolution and heaping, to decide which need a rounding model and which need only a registry entry.
| Date | 2026-10-13 |
| Status | current |
| Methods | Rounding, heaping and value resolution |
Background¶
- Every clinical-table field labelled "EMR" was entered by people. Only the vital-sign tracks were recorded automatically.
- Variables were ordered by how likely they are to be hand-entered and heaped.
Data¶
clinical_data.csv(6,388 cases) andlab_data.csv(34 analytes, 928,448 results), plus the pre-operative copies (preop_*).
Method¶
- Clinical values: share of values on each anchor family against the flat expectation, plus an MWI-style index with a binomial threshold.
- Lab analytes: finest resolution (the finest number of decimal places held by at least 1% of values) and the coarser share. Because results are stored without trailing zeros, about 10% of values should look one step coarser at a single resolution.
- Whole-number analytes: preference at multiples of 10 and 5, per analyser, with expected counts from a local quadratic fit to the neighbouring values (skipping other multiples of 5). Ratio = observed ÷ expected; z is the Poisson z-score.
Results¶
- Heaped clinical values: urine output (91% end in 0), blood loss (85% multiples of 50), crystalloid (98% multiples of 50), colloid, height (21% whole centimetres, 10% expected) and weight.
- Age is not heaped: 19.2% end in 0 or 5 (20% expected), and last digits are flat.
- Red-cell and plasma units, ICU days and length of stay show no heaping.
- Lab analytes with decimals sit near the 10% coarser share. Exceptions: haematocrit (32.4%, two analysers), total bilirubin (6.5%), lactate (12.5%) and bicarbonate (7.9%).
- No whole-number analyte shows a preference for multiples of 5 or 10 once the shape of the distribution is allowed for.
- Sodium and SaO₂ only look heaped, because 140, 135 and 95 sit at a peak or on a steep slope. Simulating a smooth peaked distribution gives deviations of the same size at the mode.
- Total bilirubin's low range (0.2–1.0 mg/dL, 22,240 results) shows no excess at any value: each count is within about 10% of the mean of its neighbours. Its lower coarser share comes from the shape of the distribution.
- Lactate is measured on the blood-gas analysers only (14,512 of 14,516 results share a timestamp with a pH), so there is no second instrument to compare, and era cannot be tested. No value below 15 is heaped. Its excess is a reporting limit: 317 results (28 cases) are exactly 15.0 mmol/L, against at most 16 for any other value near the top (Three lab analytes stop at a reporting limit).
- Two more analytes have reporting limits: aPTT at 400.0 s (226 results, 87 cases) and ESR at 2 mm/h (89 results, 72 cases).
- Since vitaldb-resolution v0.6.0 (18 October; model version 2): lactate at 15.0 and aPTT at 400.0 (and pre-
operative aPTT) are
top_coded, ESR at 2bottom_coded, andpis described as probably phosphorus (unconfirmed).
Discussion¶
- Apart from computed values, every lab analyte is single resolution per source and needs a registry entry, not a rounding model.
- Pre-operative copies behave like the lab data: platelets, glucose, AST, ALT and BUN show no heaping; pre-op PT % and sodium show the same artefacts. Pre-op PaO₂ is the exception.
Observations it supports¶
| Observation | Status | Summary |
|---|---|---|
| Three lab analytes stop at a reporting limit | likely | Lactate is capped at 15.0 mmol/L, aPTT at 400.0 s, and ESR does not go below 2 mm/h: the values at the limit stand for "this or beyond", not for the number itself. |
Limitations¶
- ESR, ammonia and creatinine clearance have too few results to judge (537–1,415).
Open questions¶
- Analyte p as phosphorus (weakly supported hypothesis). The analyte coded
p(16,440 results) is missing fromlab_parameters.csv. Its median of 3.2 (IQR 2.7–3.8, p5–p95 1.9–5.0) fits phosphorus in mg/dL, the only common analyte with that range, but only the VitalDB team can confirm it.
Tags: from the resolution work