Skip to main content
Version: v0.0.7

Function: hlParentMismatch()

hlParentMismatch(position): X12ParseWarning

Build an X12_HL_PARENT_MISMATCH warning. Emitted when an HL segment's HL-02 (parent id) does not match any earlier-emitted HL-01 in the same transaction. The walker NEVER silently re-numbers the hierarchy (HL parent-pointer integrity is the safety primitive of the 837), so the declared pointer stays verbatim on hierarchy.parentHlId and the warning reports only that the pointer is dangling, and where.

Parameters

position

X12Position

Returns

X12ParseWarning

Example

import { hlParentMismatch } from "@cosyte/x12";
const w = hlParentMismatch({ segmentIndex: 14, groupIndex: 0, transactionIndex: 0 });