Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   How to Store response ACK to a file in mirth (http://www.mirthcorp.com/community/forums/showthread.php?t=218830)

sutirth.patel 12-25-2018 11:53 PM

How to Store response ACK to a file in mirth
 
I have one channel, When I send message to destination I got response ACK in mirth. I want to store that ACK in a file. So how can we store response ACK to file in Mirth.

kirbykn2 01-02-2019 09:16 AM

Store the response to a channel map variable, and create a destination to store the variable to a file.

riven974 02-18-2019 11:37 PM

@Kirby : how do you store the response to a channel map variable?

kirbykn2 02-19-2019 07:24 AM

Look at the response transformer section in the manual or API

JuanMiguel 02-21-2019 04:50 AM

Not sure if this is what you are looking for:

On Response Transformer store response.getMessage() on a variable and
copy with fileUtil.write


PHP Code:

//Copiamos RSP a variable
var respuesta response.getMessage();
var 
rsp = new XML(SerializerFactory.getSerializer('HL7V2').toXML(respuesta));


var 
output =  "/RSP/" + $('NHC') + "_" DateUtil.getCurrentDate('yyyyMMddHHmmss') + ".hl7";
    
FileUtil.write(outputfalsersp ); 



Hope this can help you

JuanMiguel 02-21-2019 05:01 AM

Not sure if this is what you are looking for:

On Response Transformer store response.getMessage() on a variable and
copy with fileUtil.write


PHP Code:

//Copiamos RSP a variable
var respuesta response.getMessage();
var 
rsp = new XML(SerializerFactory.getSerializer('HL7V2').toXML(respuesta));


var 
output =  "/RSP/" + $('NHC') + "_" DateUtil.getCurrentDate('yyyyMMddHHmmss') + ".hl7";
    
FileUtil.write(outputfalsersp ); 



Hope this can help you


All times are GMT -8. The time now is 07:05 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation