Skip to main content
Version: v0.0.3

Type Alias: AckCode

AckCode = "AA" | "AE" | "AR" | "CA" | "CE" | "CR"

HL7 Table 0008, Acknowledgment Code. A stable public API.

Two families, by mode (HL7 v2.5.1 §2.9):

  • Original mode (§2.9.2): AA accept, AE application error, AR application reject. The single ACK reports application-level outcome.
  • Enhanced mode (§2.9.3): CA commit accept, CE commit error, CR commit reject, the accept acknowledgement, distinct from a later application ACK.

AE vs AR: AE is a processing error (the sender may resend later, e.g. a transient downstream outage); AR is a reject (the sender should not resend the message unchanged, e.g. it is structurally unacceptable). @cosyte/mllp builds original-mode ACKs; the C* codes are surfaced in the type for completeness and for callers that build their own enhanced-mode ACKs via autoAck: fn.

Example

import type { AckCode } from '@cosyte/mllp';
const code: AckCode = 'AE';