Skip to main content
Version: v0.0.4

Interface: NM

HL7 v2 Numeric (NM) composite. Carries both the raw HL7 numeric string and the parsed JS number. .value is undefined when the raw string is empty or not fully numeric: NEVER throws.

Unlike most composites in this phase, both raw and value are ALWAYS-PRESENT keys (not optional): value is explicitly typed as number | undefined so callers can destructure uniformly.

Example

import type { NM } from "@cosyte/hl7";
const glucose: NM = { raw: "120", value: 120 };
const bad: NM = { raw: "N/A", value: undefined };

Properties

raw

readonly raw: string


value

readonly value: number | undefined