Skip to content

vitaldb-resolution

Every recorded VitalDB time and value as a probability distribution of the true value: native resolution, or a mixture of resolutions recovered from heaped data.

Repository github.com/metrology-atlas/vitaldb-resolution
Branch main
Visibility public
Licence MIT
Language Python (numpy, scipy)
Related vitaldb-bench

What it is

Models are JSON files evaluated by one generic engine. For timing, it describes the resolution of each kind of time stamp: its grid, one component of each timing form's uncertainty.

Studies that use it

Study Code Summary
Admission, discharge and length of stay tools/screens.py Admission and discharge are dates at 1-day resolution, so length of stay is a derived triangular distribution, and discharge days show a weekly pattern rather than rounding.
Bias in charted intervals tools/screens.py Charted intervals are biased because each end is rounded with a different anchor, and their per-case uncertainty is large relative to short intervals.
Blood products, age and ICU days tools/screens.py Red-cell and plasma units, age and ICU days are not heaped and get registry entries with a few flags rather than rounding models.
Body mass index, derived from its inputs vitaldb_resolution/engine.py Body mass index computed from the posteriors of height, weight.
Bolus drugs as unit-dose counts tools/screens.py Most bolus drug totals are exact counts of standard doses, not rounded estimates; propofol is the exception, and zeros are ambiguous.
Charted-time clock reconstruction tools/screens.py The absolute clock time of every event can be recovered from the admission date, which makes minute-of-hour distributions possible despite de-identification.
Colloid container rules tools/screens.py Colloid is a mix of products given in whole containers that depend on the operation, so values are treated as container counts rather than rounded volumes.
Computed lab values on reachable grids tools/screens.py PT %, INR and fibrinogen are computed from a finer measurement, so some integers are unreachable and a heaping screen misreads the comb as heaping.
Haematocrit from two analysers tools/screens.py Apparent heaping in haematocrit is two analysers with different resolutions, identifiable record by record from the co-timestamped panel.
Heaping screen of all variables tools/screens.py 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.
How the anesthesia end time was charted tools/fit_timestamps.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py The charted anesthesia end time is a mixture of 4 ways of writing a clock time (ceiling_30min, ceiling_10min, ceiling_5min, clock_minute), modelled as an offset from a device time.
How the anesthesia start time was charted tools/fit_timestamps.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py The charted anesthesia start time is a mixture of 5 ways of writing a clock time (nominal_0740, nominal_0730, nearest_10min, nearest_5min, clock_minute), modelled as an offset from a device time.
How the operation end time was charted tools/fit_timestamps.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py The charted operation end time is a mixture of 4 ways of writing a clock time (floor_30min, floor_10min, floor_5min, clock_minute), modelled as an offset from a device time.
How the operation start time was charted tools/fit_timestamps.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py The charted operation start time is a mixture of 3 ways of writing a clock time (nearest_10min, nearest_5min, clock_minute), modelled as an offset from a device time.
Imputed times, conformance failures and exclusion rules tools/screens.py About one in twelve op ends was set from the recording rather than charted, and a small set of times fail basic conformance checks; all are encoded as exclusion rules.
Package validation and Monte Carlo cache tools/validate.py, tools/precision_study.py The vitaldb_resolution package returns a status for every value in the dataset, reproduces each fitted likelihood, and can precompute every posterior for fast Monte Carlo draws.
Pre-operative PaO₂ decimal rule tools/screens.py Pre-operative PaO₂ in the clinical table mixes 0.1 and 1 mmHg records, so its resolution is set per record by whether a decimal is present.
Rounding and heaping of estimated blood loss tools/fit_volume.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded estimated blood loss is a mixture of 5 rounding modes (preferred small values, 500 mL, 100 mL, 50 mL, 10 mL (base)); the model gives the true value's distribution for each record.
Rounding and heaping of height tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded height is a mixture of 5 rounding modes (tens, whole_cm, half_cm, round_up_from_x9, measured_0.1); the model gives the true value's distribution for each record.
Rounding and heaping of intraoperative crystalloid tools/fit_volume.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded intraoperative crystalloid is a mixture of 3 rounding modes (100 mL, 50 mL, 10 mL (base)); the model gives the true value's distribution for each record.
Rounding and heaping of intraoperative urine output tools/fit_volume.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded intraoperative urine output is a mixture of 4 rounding modes (100 mL, 50 mL, 10 mL, 5 mL (base)); the model gives the true value's distribution for each record.
Rounding and heaping of propofol bolus tools/reevaluate_fit.py, tools/fit_logt.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded propofol bolus is a mixture of 3 rounding modes (preferred values, 50 mg, 10 mg (base)); the model gives the true value's distribution for each record.
Rounding and heaping of weight tools/reevaluate_fit.py, tests/test_fit_consistency.py, vitaldb_resolution/engine.py Recorded weight is a mixture of 3 rounding modes (whole_kg, scale_0.1, scale_0.05); the model gives the true value's distribution for each record.
What lab timestamps mark tools/screens.py Merged into "What the lab timestamp marks" on 18 October 2026; kept so old links still work. The original finding: central-lab timestamps most likely mark specimen receipt in the lab, about 10 minutes after the draw.

Mentioned in

References

  • Harris CR, Millman KJ, van der Walt SJ, et al. Array programming with NumPy. Nature. 2020;585(7825):357-362. ↗
  • Virtanen P, Gommers R, Oliphant TE, et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods. 2020;17(3):261-272. ↗
  • McKinney W. Data structures for statistical computing in Python. In: Proceedings of the 9th Python in Science Conference. 2010. p. 56-61. ↗
  • Bradbury J, Frostig R, Hawkins P, Johnson MJ, Katariya Y, Leary C, Maclaurin D, Necula G, Paszke A, VanderPlas J, Wanderman-Milne S, Zhang Q. JAX: composable transformations of Python+NumPy programs. 2018. ↗
  • Krekel H, Oliveira B, Pfannschmidt R, Bruynooghe F, Laugher B, Bruhin F. pytest. 2004. ↗