HL7 v2 acknowledgement utility

HL7 ACK Generator & Analyzer

Generate practical HL7 acknowledgement messages or inspect an existing ACK for MSA result, ERR details, message-control-ID matching, routing reversal, and acknowledgement-mode fields.

Privacy reminder. Do not paste real patient data, credentials, production identifiers, or confidential messages. Use synthetic or properly de-identified HL7 only.

ACK workflow

Create or inspect an acknowledgement

This is a practical integration debugging aid, not a certified HL7 conformance validator. It reads field and encoding delimiters from MSH where possible.

The generated MSA-2 value comes from the original MSH-10 control ID.

No ACK generatedPaste an original HL7 message and choose an acknowledgement result.
Generated ACK will appear here.

Supported in this version

Practical HL7 acknowledgement workflows

Generation

AA, AE, AR, CA, CE, and CR results; sender/receiver reversal; MSH-10 to MSA-2 correlation; optional MSA text; and ERR location, severity, diagnostic, and user-message fields.

Analysis

MSA result interpretation, original control-ID comparison, MSH-15/MSH-16 request interpretation, sender/receiver checks, version and trigger checks, and multiple ERR segments.

ERR locations

Reads modern ERR-2 locations and falls back to legacy ERR-1 location data, displaying segment, occurrence, field, repetition, component, and subcomponent positions.

Deliberate limits

It does not apply a site-specific HL7 profile, validate every version-dependent field rule, send messages, or prove that an application processed a message correctly.

FAQ

HL7 ACK questions

What do AA, AE, and AR mean?

AA indicates application acceptance, AE indicates an application error, and AR indicates application rejection. The analyzer also recognises the commit acknowledgement codes CA, CE, and CR.

Why compare MSA-2 with MSH-10?

MSA-2 identifies the message control ID being acknowledged. Supplying the original message lets the tool show whether it matches the original MSH-10 value.

What are MSH-15 and MSH-16?

They indicate when accept and application acknowledgements are requested. The analyzer translates common AL, NE, ER, and SU values when the original message is supplied.

Does the generator create the exact ACK required by every interface?

No. Local profiles can impose additional segments, fields, message structures, code systems, or acknowledgement rules. Treat the output as a practical starting point for development and testing.

Can I paste production messages?

No. Use synthetic or properly de-identified test messages only.

Practical guide

Interpret acknowledgement codes in the context of the exchange

An HL7 acknowledgement is not merely “success” or “failure.” The code identifies the acknowledgement family and outcome, while the message control ID and ERR details connect the response to the inbound message and explain what the receiver accepted, could not process, or rejected.

Application acknowledgement codes

  • AA — Application Accept: the receiving application accepted the message.
  • AE — Application Error: the message reached application processing, but an error occurred.
  • AR — Application Reject: the application rejected the message, often because it could not be processed as submitted.

These codes are normally carried in MSA-1. MSA-2 should identify the original message, typically by echoing the inbound MSH-10 message control ID.

Commit acknowledgement codes

  • CA — Commit Accept: the message was safely accepted at the commit layer.
  • CE — Commit Error: a commit-level error occurred.
  • CR — Commit Reject: the message was rejected at the commit layer.

Commit and application acknowledgements are distinct stages in enhanced acknowledgement mode. A commit accept does not automatically mean downstream application processing has completed successfully.

Worked example

Correlate the response before reading the error

Inbound: MSH-10 = MSG-20260721-0001
ACK:     MSA|AE|MSG-20260721-0001
ERR:     ERR||PID^1^3^1|102^Data type error^HL70357|E

The AE indicates an application-level error. The matching MSA-2 correlates the ACK to the inbound message. The ERR location points toward PID-3 in the first PID segment and first repetition, while the error code and severity provide additional diagnostic context.

Exact ERR population varies by HL7 version and receiver. Some systems return only free text, while others provide segment, field, repetition, component, code, severity, and application-specific diagnostic information.

Generation and troubleshooting

Preserve the original exchange context

When generating an ACK

  1. Copy the inbound message type, processing ID, version, and control ID accurately.
  2. Reverse the sending and receiving application and facility values for the response.
  3. Choose an acknowledgement code that matches the processing stage and outcome.
  4. Add ERR details that identify the location and reason without exposing confidential data.
  5. Use a new control ID for the ACK itself while retaining the inbound ID in MSA-2.

Common problems and limitations

  • An AA confirms the receiver's declared outcome, not every later business process.
  • A transport timeout does not prove the receiver failed to process the message.
  • Incorrect MSH-15 and MSH-16 expectations can cause missing, duplicate, or unexpected acknowledgements.
  • The tool analyses message content but does not reproduce every vendor-specific acknowledgement workflow.

Authorship and review

Practical guidance backed by integration experience

Maintained and technically reviewed by Health Data Tools, drawing on more than 15 years of healthcare integration experience across HL7, FHIR, CDA, APIs, PKI, and clinical integration systems.

Technically reviewed: