@welldot/utils
getLatestResult
Returns the most recent usable result of a parameter across the effective (non-retracted) samples, skipping field/trip/equipment blanks. code is a parameterKey (the welldot code, so a CAS-coded result with a published equivalence matches too). Within one sample the first matching result in file orde
getLatestResult(
well,code): {result:WaterQualityResult;sample:WaterSample; } |undefined
Returns the most recent usable result of a parameter across the effective
(non-retracted) samples, skipping field/trip/equipment blanks. code is a
parameterKey (the welldot code, so a CAS-coded result with a published
equivalence matches too). Within one sample the first matching result in
file order is returned. undefined when the parameter was never measured.
Parameters
well
Well
code
string
Returns
{ result: WaterQualityResult; sample: WaterSample; } | undefined