Skip to main content
Version: v0.0.3

Interface: Hl7Position

Positional context attached to every warning and fatal error. Fields are 1-indexed against the HL7 spec convention (see RawSegment.fields for the index 0 slot convention). All fields past segmentIndex are optional, for a top-level fatal like EMPTY_INPUT only segmentIndex: 0 is populated; for a tokenizer warning deep inside a subcomponent all five indices may be set.

Remarks

With exactOptionalPropertyTypes: true, do not pass fieldIndex: undefined explicitly: omit the key instead.

Example

import type { Hl7Position } from "@cosyte/hl7";
const pos: Hl7Position = { segmentIndex: 2, fieldIndex: 5 };

Properties

componentIndex?

readonly optional componentIndex?: number


fieldIndex?

readonly optional fieldIndex?: number


repetitionIndex?

readonly optional repetitionIndex?: number


segmentIndex

readonly segmentIndex: number


subcomponentIndex?

readonly optional subcomponentIndex?: number