Skip to main content
Version: v0.0.4

Interface: BuildAckOptions

Options for buildAck.

Example

buildAck(inbound, { code: "AA" }); // bare accept
buildAck(inbound, { code: "AR", error: { conditionCode: "200" } });

Properties

code

readonly code: AckCode

The acknowledgment disposition to emit in MSA-1 (HL7 Table 0008). One of AA/AE/AR (original) or CA/CE/CR (enhanced accept-level). Required: buildAck builds the disposition it is told. An unknown code is a programming error and throws TypeError.


error?

readonly optional error?: AckErrorDetail | readonly AckErrorDetail[]

Optional error detail. A single AckErrorDetail or an array → one ERR segment each. Typically supplied for AE/AR/CE/CR.


mode?

readonly optional mode?: AckMode

Optional explicit acknowledgment mode. When omitted it is derived from the inbound MSH-15/16 via detectAckMode. buildAck emits code verbatim regardless of mode: this field is advisory metadata for adapters (e.g. @cosyte/mllp's commit-policy layer) that need the detected mode.