Interface: DotPath
Parsed representation of a dot-path string. Produced by parsePath,
consumed by resolvePath. All numeric indices are normalized to the
internal convention (segmentIndex = 0-based occurrence, fieldIndex =
1-based HL7 field number, repetitionIndex = 0-based rep, componentIndex
and subcomponentIndex = 1-based HL7 positions).
Example
import { parsePath } from "@cosyte/hl7";
parsePath("OBX[2].5.1");
// { segmentType: "OBX", segmentIndex: 2, fieldIndex: 5,
// repetitionIndex: 0, componentIndex: 1 }
Properties
componentIndex?
readonlyoptionalcomponentIndex?:number
1-based HL7 component position (within a repetition).
fieldIndex
readonlyfieldIndex:number
1-based HL7 field number; maps to RawSegment.fields[fieldIndex].
repetitionIndex?
readonlyoptionalrepetitionIndex?:number
0-based repetition index; defaults to 0 when [N] is omitted.
segmentIndex
readonlysegmentIndex:number
0-based occurrence of this segment type in the message.
segmentType
readonlysegmentType:string
3-char segment identifier (e.g. "PID", "OBX", "ZPI").
subcomponentIndex?
readonlyoptionalsubcomponentIndex?:number
1-based HL7 subcomponent position (within a component).