Interface: EncodingCharacters
The HL7 delimiter characters discovered from MSH-1 (field separator) and
MSH-2 (encoding characters). The first four: component, repetition,
escape, subcomponent: are mandatory across all HL7 v2 versions. The fifth,
truncation, is the v2.7+ truncation character (default # per spec
§2.5.5.2): only present when MSH-2 actually carries 5 encoding characters,
so messages that pre-date v2.7 round-trip with a 4-char MSH-2 unchanged.
Example
import type { EncodingCharacters } from "@cosyte/hl7";
const v25: EncodingCharacters = {
field: "|",
component: "^",
repetition: "~",
escape: "\\",
subcomponent: "&",
};
const v27: EncodingCharacters = { ...v25, truncation: "#" };
Properties
component
readonlycomponent:string
escape
readonlyescape:string
field
readonlyfield:string
repetition
readonlyrepetition:string
subcomponent
readonlysubcomponent:string
truncation?
readonlyoptionaltruncation?:string