Skip to main content
Version: v0.0.4

Function: missingRequiredField()

missingRequiredField(position, segmentName, fieldIndex): Hl7ParseWarning

Build a MISSING_REQUIRED_FIELD warning. Emitted when a field the active profile marks as required is empty or missing. Distinct from the NO_MSH_SEGMENT fatal, which escalates a missing MSH altogether.

Parameters

position

Hl7Position

segmentName

string

fieldIndex

number

Returns

Hl7ParseWarning

Example

import { missingRequiredField } from "@cosyte/hl7";
const w = missingRequiredField({ segmentIndex: 0, fieldIndex: 3 }, "MSH", 3);