Skip to main content

validate_fhir_observation

Function validate_fhir_observation 

Source
pub fn validate_fhir_observation(obs: &FhirObservation) -> FhirValidationResult
Expand description

Classify a FHIR Observation value against built-in LOINC reference ranges, falling back to the caller-provided reference_low/high (with half-range critical margins) when the code is unlisted.

Returns ObservationStatus::{Normal, Low, High, CriticalLow, CriticalHigh, Unknown} plus the HL7 interpretation code (N/L/H/LL/HH/U). is_valid is false only when neither a known range nor caller references exist — the observation is then Unknown rather than guessed.