PREPROD
ReaderAuthor

piper

Analyte Default Unit

`Analyte.defaultUnit` is the standard concentration unit for this chemical — typically "ug/L" for trace organics or "mg/L" for metals and nutrients.

1 min read · 2 depth levelsstratum-piper · vdevMatches production
Everyday

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.
View as developer →
Was this helpful?