I have an issue about the NACK message generated by HAPI,
I'm generating the NACK message as follows;
Message msg= hl7Msg.generateACK(HL7Constants.HL7_MSA_ERROR_FIELD_VALUE,
new HL7Exception(errorMsg));
This returns; following message;
MSH|^~\&|||||20130604165513.576+0100||ACK|108|P|2.5
MSA|AE|HL7Gtw01361605B49500
ERR|^^^207&ERROR&hl70357&&errmsg
If you notice the ERR segment, it doesn't have required info;
Is the above message valid?
I suspect it has to be like this;
MSH|^~\&|||||20130604165513.576+0100||ACK|108|P|2.5
MSA|AE|HL7Gtw01361605B49500
ERR|||207|E|^errmsg
Why do i get such invalid message? Am i doing anything wrong here?