Function: duplicateRequiredSegment()
duplicateRequiredSegment(
position,segmentName):Hl7ParseWarning
Build a DUPLICATE_REQUIRED_SEGMENT warning. Emitted when a segment the
profile marks as singleton appears more than once (e.g. two MSH
segments). The parser keeps both; the warning alerts the consumer to
potential sender bugs.
Parameters
position
segmentName
string
Returns
Example
import { duplicateRequiredSegment } from "@cosyte/hl7";
const w = duplicateRequiredSegment({ segmentIndex: 1 }, "MSH");