web stats
Mirth Community - View Single Post - Message validation
View Single Post
Old 02-20-2012, 10:22 PM
Linh Linh is offline
Mirth Newb
Join Date: Feb 2012
Posts: 6
Linh is on a distinguished road

Thanks narupley.

I now see the difference between Source Filter (will send message rejected back to sender on filtered messages) and Destination Filter (silent on filtered messages).

I modified my LLP Listener as follow:
Send ACK: Yes
Rejected ACK Code: AR

In my Source filter, I have a JavaScript with "return false;" for testing purposes. Upon receiving a message, the message is filtered and I got a correct ACK:

<0x0b>MSH|^~\&|Hospital|8003621231167888|Medical|8 003614166667350|20120221165514||ACK|20120221165514 |P|2.3.1<0x0d> MSA|AR|499e58ee-2934-4d0a-8b37-8b94a0a0bb6e|Message Rejected.<0x0d> <0x1c><0x0d>

However, my LLP Listener is just a gate keeper receiving messages and forward to the next channel to do further processing. I have tried to set up a response variable with this method: ResponseFactory.getFilteredResponse('AR') and assign it to a response map variable 'ResponseMsg'. I then changed my LLP Listener to Send ACK: Respond from "ResponseMsg".

When I send a message, I got the ACK as follow:


And upon receiving that ACK, my sender complains: "Warning: Last segment have no segment termination char 0x0d ! Acknowledge message received. Invalid acknowledge message structure. Segment MSA is missing."

Is there a way to fully generate the ACK message with MSA segment? Or I have to build the response message manually?

Thanks for your help.

Reply With Quote