Function: ackNoCorrelationId()
ackNoCorrelationId(
position):Hl7ParseWarning
Build an ACK_NO_CORRELATION_ID warning. Emitted by buildAck,
not by the parser: the inbound message carried no MSH-10 message control ID,
so the generated ACK leaves MSA-2 empty and, when a positive accept was
requested, downgrades it to an error code rather than fabricating an
unverifiable AA/CA. The position references the inbound MSH segment.
The message NEVER echoes a PHI value: only the structural fact.
Parameters
position
Returns
Example
import { buildAck, WARNING_CODES } from "@cosyte/hl7";
const ack = buildAck(inbound, { code: "AA" }); // inbound has no MSH-10
ack.warnings.some((w) => w.code === WARNING_CODES.ACK_NO_CORRELATION_ID); // true