Laboratory·Shipped·

Storing what the paper says, and computing the rest

Reading a lab report is the most load-bearing step in the product: trends, charts, and everything the AI reasons over inherit whatever that reading concluded. And a wrong reading stops looking like an error the moment it lands — it just looks like your result.

The bug that only shows up later

Canonical values used to be stored with the printed ones discarded. That meant a wrong conversion factor or an unrecognised unit spelling was permanently wrong, and — worse — indistinguishable from a right one. Nothing in the record said which values had been transformed or how.

Every observation now keeps the raw name, value, reference range, and report flag beside the derived ones, and re-runs them through the same normalizer on demand. Correct a rule and the stored rows heal themselves.

What a backfill is allowed to invent: nothing

Applying that change to existing data meant re-deriving rows from whatever raw information had been retained. The backfill recovered what could be explained and refused the rest — re-deriving ten particular rows would have conjured an abnormal RDW and a low lymphocyte count out of nothing. Those were left alone rather than filled in.

Reading numbers that are not quite numbers

Censored results — a suppressed TSH printed as "<0.01" — are stored as a number with an operator rather than as unplottable text, so they can finally trend, and the operator travels to every surface that renders the value, including the ones that assemble facts for the model.

Reports are also checked against their own arithmetic: a differential that does not sum, or a value that contradicts its own printed range, is flagged rather than trusted. Blank result cells no longer commit as valueless observations.

What this deliberately does not do

  • Normalization covers the unit spellings real reports print; an unrecognised one is flagged for confirmation, not guessed
  • Extraction is always shown for confirmation before it joins the record
  • Flagging an inconsistent report tells you to look, not what is wrong with you