Skip to main content
Version: v0.0.3

Variable: KNOWN_SEGMENTS

const KNOWN_SEGMENTS: ReadonlySet<string>

Frozen set of every standard HL7 v2 segment name the library recognises. Consumers parsing any segment whose name is neither in this set nor declared by the active profile will see UNKNOWN_SEGMENT in msg.warnings.

Example

import { KNOWN_SEGMENTS } from "@cosyte/hl7";
console.log(KNOWN_SEGMENTS.has("PID")); // true
console.log(KNOWN_SEGMENTS.has("ZPI")); // false