PREPROD
ReaderAuthor

piper

Target Unit

`UnitConversion.toUnit` is the target unit label — the unit that the converted value will be expressed in after applying the conversion factor.

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

The toUnit on a UnitConversion is typically the canonical unit for the analyte or the unit required by the regulatory threshold. After piper multiplies an incoming result value by the factor, it stores the result in toUnit. This ensures that all AnalyticalResult values in the database use a consistent unit, making trend analysis and threshold comparisons accurate across lab reports that may have used different units for the same chemical and matrix.

Technical section
Data model, API, and internals — visible to developers.
View as developer →
Was this helpful?