Skip to content
Contact Us

HL7 ACK Message: Acknowledgment & Errors

HL7 ACK (Acknowledgment) messages confirm receipt and processing of HL7 v2 messages. Every production HL7 interface relies on acknowledgment handling for reliable message delivery — without proper ACK processing, messages can be silently lost or duplicated.

SegmentNameRequiredPurpose
MSHMessage HeaderYesSender, receiver, message type, version
MSAMessage AcknowledgmentYesAccept/reject code and correlation ID
ERRErrorNoDetailed error information (when MSA-1 is AE or AR)

The ACK message is the simplest HL7 v2 message type — just 2-3 segments. However, its correct implementation is critical to interface reliability.

FieldIDData TypeDescription
Acknowledgment CodeMSA-1IDAA, AE, or AR
Message Control IDMSA-2STEchoes MSH-10 of the original message
Text MessageMSA-3STOptional error description
Expected Sequence NumberMSA-4NMSequence tracking (rare)
Error ConditionMSA-6CEDeprecated — use ERR segment
CodeMeaningAction Required
AAApplication AcceptMessage processed successfully — no action needed
AEApplication ErrorMessage parsed but could not be processed — review error and potentially resend
ARApplication RejectMessage rejected — structural or protocol problem, do not resend without fixing

MSA-2 echoes the MSH-10 (Message Control ID) of the original message. This is how the sending system correlates an ACK to the message that triggered it:

Original: MSH|...|MSG00001|P|2.5.1
Response: MSA|AA|MSG00001

If MSA-2 does not match any pending MSH-10, the sender should log a correlation error and alert operators.

When MSA-1 is AE or AR, the ERR segment provides diagnostic information:

FieldIDData TypeDescription
Error Code and LocationERR-1ELDDeprecated in v2.5+
Error LocationERR-2ERLSegment^Sequence^Field^Component
HL7 Error CodeERR-3CWEError category from HL7 Table 0357
SeverityERR-4IDW (Warning), I (Information), E (Error)
Application Error CodeERR-5CWEApplication-specific error code
Application Error ParameterERR-6STAdditional error context
Diagnostic InformationERR-7TXHuman-readable error description
User MessageERR-8TXMessage suitable for display to end user

ERR-3: Common HL7 Error Codes (Table 0357)

Section titled “ERR-3: Common HL7 Error Codes (Table 0357)”
CodeMeaningDescription
100Segment sequence errorSegments in wrong order
101Required field missingRequired field not populated
102Data type errorField value doesn’t match expected data type
103Table value not foundCoded value not in expected table
200Unsupported message typeReceiving system doesn’t handle this message type
201Unsupported event codeTrigger event not supported
202Unsupported processing IDProcessing ID (P/T/D) not accepted
203Unsupported version IDHL7 version not supported
207Application internal errorUnspecified processing failure

HL7 v2 supports two acknowledgment modes, controlled by MSH-15 and MSH-16:

A single ACK for each message. MSH-15 = AL (Always) means the receiver sends one ACK. MSH-16 = NE (Never) means no separate application-level ACK. This is the configuration used by the vast majority of HL7 interfaces.

Original Acknowledgment Mode
Sender Source System
Receiver Destination System
ADT^A01 MSH-15=AL, MSH-16=NE
ACK (MSA-1=AA) Single acknowledgment
sender receiver
ADT^A01 MSH-15=AL, MSH-16=NE
receiver sender
ACK (MSA-1=AA) Single acknowledgment

Two separate acknowledgments — one for transport, one for application. Enhanced mode adds complexity but provides confirmation that the message was both received (transport) and successfully processed (application). In practice, enhanced mode is rare.

Enhanced Acknowledgment Mode
Sender Source System
Receiver Destination System
ADT^A01 MSH-15=AL, MSH-16=AL
ACK (MSA-1=CA) Accept ACK (transport)
ACK (MSA-1=AA) Application ACK (processing)
Confirms message was both received AND processed
sender receiver
ADT^A01 MSH-15=AL, MSH-16=AL
receiver sender
ACK (MSA-1=CA) Accept ACK (transport)
receiver sender
ACK (MSA-1=AA) Application ACK (processing) Confirms message was both received AND processed
ACK — Application Accept (AA)
Header Patient Clinical Order/Result Financial
ACK — Application Error (AE)
Header Patient Clinical Order/Result Financial
ACK — Application Reject (AR)
Header Patient Clinical Order/Result Financial

When a sender does not receive an ACK within the configured timeout:

  1. Wait: Allow adequate time (typically 30-120 seconds depending on message type)
  2. Retry: Resend the original message with the same MSH-10 control ID
  3. Limit retries: Cap at 3-5 attempts before alerting operators
  4. Exponential backoff: Increase delay between retries (30s → 60s → 120s)

The receiving system should use MSH-10 deduplication to handle retransmitted messages — processing the first instance and returning AA for subsequent duplicates without reprocessing.

ACK CodeShould Resend?Rationale
AANoMessage processed successfully
AEMaybeData issue — fix the message content and resend, or investigate the error. Same message will likely fail again.
ARNoStructural/protocol rejection — message cannot be processed as-is. Fix the root cause before resending.

Integration engines (Mirth Connect, Rhapsody, etc.) typically manage ACK processing automatically:

  • Outbound channels: Track pending ACKs per message, trigger retry on timeout or AE/AR
  • Inbound channels: Generate ACK immediately after parsing (AA) or after processing (AA/AE depending on configuration)
  • Queue depth monitoring: Alert when unacknowledged messages exceed thresholds — indicates downstream system issues
  • Missing MSA-2 correlation: Sending an ACK without echoing MSH-10 makes it impossible for the sender to match the response
  • Ignoring AE responses: Treating all non-AR responses as success leads to silently lost data
  • Timeout too short: Network latency and processing time vary — timeouts under 30 seconds cause unnecessary retransmissions
  • No deduplication: Failing to check MSH-10 for duplicates can result in double-processing (duplicate orders, duplicate charges)