Was this helpful?
HL7 Enhanced Acknowledgment Message Invoker
The HL7 Enhanced Acknowledgment Message Invoker generates system-level acknowledgment messages.
The receiving system commits the data to physical storage before sending this acknowledgment. It is the sole responsibility of the receiving system to send the ACK after successfully storing the message.
The HL7 standard defines a general ACK structure for all message types. The enhanced acknowledgment is generated based on the HL7-defined ACK structure.
The ACK message is constructed using the following values taken from the MSH segment of the incoming HL7 message:
1. The Message Control Id from the MSH is copied to the message acknowledgment (MSA) segment of the ACK message.
2. The ACK code is then generated using the value passed to this component. The following table provides the acceptable ACK codes.
 
ACK Code
Description
CA
Commit Accept
This code is sent when the message is successfully accepted for processing.
CE
Commit Error
This code is sent if the message cannot be accepted for any other reason.
For example, a sequence number error.
CR
Commit Reject
This code is sent when the receiving application finds any of the following values as unacceptable: message type, version ID, or processing ID.
The HL7 Standard Acknowledgment Message Invoker requires the information described the following table from DJMessage.
Note:  The srcMsg variable included in the example is of type DJMessage.
Property (Mandatory/Optional)
Description
Example
General Properties
HL7 message (M)
Set in the message body
srcMsg.body
Acknowledgment Code (M)
Set as a property
srcMsg.properties("AckCode") = "AE"
ErrorText (O)
Set as a property.
This property provides the specific error that the component encountered.
srcMsg.properties("ErrorText") = "Required field is missing"
SequenceNumber (O)
Set as a property.
This property is used when generating the ACK message for the sequence number protocol (SNP).
srcMsg.properties("SequenceNumber") = "10101011"
MessageControlId (M)
Set as a property.
This property should be set for generating a new Message control Id for the MSH segment.
srcMsg.properties("MessageControlId") = "12345678"
Version (M)
Set as a property
This property should be set to provide the version number. This is the base HL7 version for which the ACK will be generated
List of valid and supported versions: 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.5.
srcMsg.properties("Version")="2.1"
ERR segment — ErrorLocation
SegmentId (O)
Set as a property.
This property provides the segment name for which the error occurred.
srcMsg.properties("SegmentId") = "MSH"
SegmentSequence (O)
Set as a property.
This property provides the segment sequence in the HL7 message at which the error occurred.
srcMsg.properties("SegmentSequence") = "1"
FieldPosition (O)
Set as a property.
This property provides the position of the field in a segment where the error occurred.
srcMsg.properties("FieldPosition") = "2"
FieldRepetition (O)
Set as a property.
This property provides the position of the repeating field where the error occurred.
srcMsg.properties("FieldRepetition") = "3"
ComponentNumber (O)
Set as a property.
This property provides the position of the component within the field where the error occurred.
srcMsg.properties("ComponentNumber") = "4"
SubComponentNumber (O)
Set as a property.
This property provides the position of the sub component within the component where the error occurred.
srcMsg.properties("SubComponentNumber") = "5"
ERR Segment — ErrorSeverity
ErrorSeverity (M)
Set as a property.
The Severity code is one of the following:
I - Information
E - Error
W - Warning
Note:  The Error Severity information is required for version HL7 version 2.5.
srcMsg.properties("ErrorSeverity") = "E"
ERR Segment — ErrorCode
ErrorCode (M)
Set as a property.
This property is required to be set if the AckCode is either Application Error or Application Reject.
For more information on the list of valid ErrorCodes, see table definition “0357” under the HL7 specification.
srcMsg.properties("ErrorCode") = "101
Supported Actions
 
Action
Description
Execute
Runs any expression that you specify.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Sets the HL7 message and the DJMessage properties. These values are set before they are passed to the acknowledgment component.
Execute
TargetMessage
Contains the generated ACK message.
Supported Action Properties
There are no action properties for this invoker.
Error Conditions
 
Error Code
Error Name
Description
Reason
8
ERR_WRITERR
Error in generating acknowledgment
The component could not generate an acknowledgment.
50
ERR_UNSPECIFIED
Unknown Error occurred
The component identified an unknown error.
0
ERR_OK
OK status
The component generated an ACK successfully. There is no error.
Last modified date: 08/02/2023