The defaultUnit on an Analyte is applied during lab report import when a result row does not include an explicit unit. It also serves as the canonical unit for threshold comparisons: if an imported result uses a different unit, piper uses the UnitConversion table to normalize the value before checking against regulatory limits. Setting an accurate defaultUnit prevents unit-mismatch import issues and ensures exceedance ratios are calculated correctly.
Technical section
Data model, API, and internals — visible to developers.
