HL7 v2 MSA-1 (Acknowledgment Code): Format, Values, and Testing Notes
MSA-1 is a two-character code that decides whether a sending application moves on, retries, or escalates — and it is the single most under-varied value in most ACK test fixtures.
MSA-1 is the Acknowledgment Code, a short coded value telling the sending system whether its message was accepted, produced an error, or was rejected outright. AA means accept, AE means error, and AR means reject, and each one is meant to drive different handling on the sending side.
Valid code values
Example
MSA-1 (AE) marks this synthetic acknowledgment as an application error, paired with a fabricated control ID and explanatory text.
Where this trips people up
Teams building ACK test fixtures tend to hardcode AA because it's the value every downstream test was written against, so the branches that handle AE and AR — retry queues, alerting, dead-letter routing — sit untested until a real rejection shows up in production. Another common gap: treating AE and AR as interchangeable failure states when receiving systems and interface engines are often built to handle them very differently, one implying a retry might succeed and the other implying it won't without a structural fix.