Skip to main content
Version: v0.0.2

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 (typically U) 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\n which is silently tolerated.

Example

import type { Delimiters } from "@cosyte/x12";
const medicare: Delimiters = {
element: "*",
repetition: "^",
component: ":",
segment: "~",
};

Properties

component

readonly component: string


element

readonly element: string


repetition

readonly repetition: string


segment

readonly segment: string