Two kinds of ACK
- On receipt: Decode builds the ACK (
generateAck, on by default) from parsing and validation. Returnackright away. - After processing: turn
generateAckoff, process the message, then build an application ACK with Create HL7 acknowledgement, for example AE when storing the result failed.
Create HL7 acknowledgement
| Input | Default | Meaning |
|---|---|---|
message | (required) | The message being acknowledged (or a batch, for a batch ACK). |
ackCode | AA | AA, AE, AR, CA, CE or CR. |
errorMessage | Text for the ERR segment of a negative ACK. | |
errorCode | 207 | HL7 table 0357 code. |
ackSendingApplication, ackSendingFacility, wrapAckInMllp | As for Decode. |
Output: success, ackCode, ack and errors.
"Application_ACK": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"message": "@{triggerBody()}",
"ackCode": "@{if(equals(outputs('Saved'), true), 'AA', 'AE')}",
"errorMessage": "Could not store the result",
"errorCode": 207
},
"serviceProviderConfiguration": {
"connectionName": "lamboHl7Codec",
"operationId": "createAck",
"serviceProviderId": "/serviceProviders/lamboHl7Codec"
}
}
}What ACKs contain
- Sender and receiver swapped, MSA-2 = the message's MSH-10, written with the inbound message's own delimiters.
- ERR segments in the v2.5+ layout, or ERR-1 for v2.4 and earlier.
- Enhanced mode (MSH-15/16 present) produces commit ACKs (CA/CE/CR) when
ackModeis Auto or Enhanced.