
Physiologic plausibility bounds and rescaling for single vital / lab measurements
Source:R/benchmark_features.R
DEFAULT_BOUNDS.RdDEFAULT_BOUNDS is list(name = c(min, max)) in conventional US units (mg/dL, g/dL, 10^3/uL, degrees Celsius). A single
measurement outside its bounds is dropped (not clipped) before the stay's mean and latest value are taken, so one artifact
such as a BMI of 562000 cannot dominate a stay. DEFAULT_RESCALE is list(name = c(above, up_to, divisor)): a value in
(above, up_to] is divided first (WBC is a count per uL at some sites, 10^3/uL at others).
Details
DEFAULT_UNIT_CONVERSIONS (0.35.0) is list(name = list(list(unit_concept_ids, unit_texts, factor))): a lab value whose
unit_concept_id is one of the UCUM ids (8753 mmol/L, 8749 umol/L, 8636 g/L), or whose unit_concept_id is empty and whose
unit_source_value (lower case, no spaces, the micro sign read as "u") is one of the texts, is multiplied by factor before the bounds:
glucose and BUN mmol/L, creatinine umol/L, albumin and hemoglobin g/L, to mg/dL or g/dL.