Interface: Delimiters
The four X12 delimiter classes discovered from fixed byte positions inside
the ISA envelope. Phase 1 detects all four from the ISA itself - they are
NEVER assumed (in particular, component is rarely : outside Medicare).
element- ISA byte 4 (1-indexed); separates the 16 ISA elements.repetition- ISA-11 (byte 83, 1-indexed); separates repetitions inside an element. Carries the legacy Control Standards Identifier (typicallyU) for pre-005010 inputs; Phase 1 surfaces it verbatim.component- ISA-16 (byte 105, 1-indexed); separates sub-elements of a composite. Real-world senders use:,\\,^,|, and more.segment- the byte immediately after ISA-16 (byte 106, 1-indexed); terminates each segment. Typically~, often followed by optional\r\nwhich is silently tolerated.
Example
import type { Delimiters } from "@cosyte/x12";
const medicare: Delimiters = {
element: "*",
repetition: "^",
component: ":",
segment: "~",
};
Properties
component
readonlycomponent:string
element
readonlyelement:string
repetition
readonlyrepetition:string
segment
readonlysegment:string