The fromUnit on a UnitConversion identifies the starting unit of the conversion. When an AnalyticalResult is imported with a unit that differs from the Analyte's defaultUnit, piper looks for a UnitConversion where fromUnit matches the result's unit and toUnit matches the target. If no matching UnitConversion exists, piper flags a UnitMismatch issue during import validation so the discrepancy is reviewed before results are committed to the database.
Technical section
Data model, API, and internals — visible to developers.
