Interface: SN
HL7 v2 Structured Numeric (SN) composite. num1 and num2 are
ALWAYS-PRESENT keys (typed number | undefined) so callers can destructure
uniformly, mirroring NM; comparator and separatorOrSuffix are OMITTED
when absent (exactOptionalPropertyTypes).
An absent comparator means the default = relation per HL7 Chapter 2A.
This library surfaces the structure only: it does not evaluate the
inequality, validate the unit, or convert values.
Example
import type { SN } from "@cosyte/hl7";
const gfr: SN = { comparator: ">", num1: 90, num2: undefined }; // >90
const range: SN = { num1: 100, separatorOrSuffix: "-", num2: 200 }; // 100-200
Properties
comparator?
readonlyoptionalcomparator?:string
SN.1 comparator: one of > < >= <= = <>. Omitted ⇒ default =.
num1
readonlynum1:number|undefined
SN.2 first numeric value. undefined when absent or non-numeric (never NaN).
num2
readonlynum2:number|undefined
SN.4 second numeric value. undefined when absent or non-numeric (never NaN).
separatorOrSuffix?
readonlyoptionalseparatorOrSuffix?:string
SN.3 separator/suffix: - (range), :// (ratio), + (suffix), .. Omitted when absent.