Skip to main content
Version: v0.0.4

Function: outOfOrderSegment()

outOfOrderSegment(position, segmentName): Hl7ParseWarning

Build an OUT_OF_ORDER_SEGMENT warning. Emitted when a segment appears outside the order the active profile declares (e.g. EVN appearing before MSH in a typical ADT message).

Parameters

position

Hl7Position

segmentName

string

Returns

Hl7ParseWarning

Example

import { outOfOrderSegment } from "@cosyte/hl7";
const w = outOfOrderSegment({ segmentIndex: 2 }, "EVN");