web stats
Mirth Community - View Single Post - Get Destination Response with Postprocessor
View Single Post
  #1  
Old 03-30-2018, 01:14 PM
pacitommaso pacitommaso is offline
Mirth Newb
 
Join Date: Jun 2015
Posts: 6
pacitommaso is on a distinguished road
Default Get Destination Response with Postprocessor

Hello Everybody.
I have a Mirth Channel with multiple Destinations (HTTPSender) and each Destination can return me a Response such as this one:

{
"Response" : {
"responseCode" : "10020",
"responseDesc" : "Patient Data Updated",
"eccc" : "6f077bf9-66dd-92fb12400938"
}
}


I'm trying to get the content of this message, and as I have multiple destinations I need to parse the response using a Postprocessor Script but I can only get the "Processed Response".

I tried using:

var status = responseMap.get('ADT^A01 || A04 - CreatePatients').getMessage();

but I get the processed HL7 response instead. (The HL7 ACK).

Can someone please help me with an example?

It works fine for each Destination if I use the Edit Response, but as I don't know which Destination will be used I cannot use this.

Thank you everybody for your help.
Reply With Quote