Skip to content
LambogeniusDocs

HL7 v2 Codec for Azure Logic Apps

Acknowledgements

Accept ACKs from Decode, application ACKs with Create acknowledgement, and ACK conventions.

Service provider/serviceProviders/lamboHl7CodecLicensed together with the HL7 MLLP Connector. One token covers both.

Two kinds of ACK

  • On receipt: Decode builds the ACK (generateAck, on by default) from parsing and validation. Return ack right away.
  • After processing: turn generateAck off, process the message, then build an application ACK with Create HL7 acknowledgement, for example AE when storing the result failed.

Create HL7 acknowledgement

InputDefaultMeaning
message(required)The message being acknowledged (or a batch, for a batch ACK).
ackCodeAAAA, AE, AR, CA, CE or CR.
errorMessageText for the ERR segment of a negative ACK.
errorCode207HL7 table 0357 code.
ackSendingApplication, ackSendingFacility, wrapAckInMllpAs 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 ackMode is Auto or Enhanced.