web stats
Mirth Community - View Single Post - How to Store response ACK to a file in mirth
View Single Post
Old 02-21-2019, 06:01 AM
JuanMiguel JuanMiguel is offline
What's HL7?
Join Date: Jun 2013
Posts: 2
JuanMiguel is on a distinguished road

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();
rsp = new XML(SerializerFactory.getSerializer('HL7V2').toXML(respuesta));

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

Hope this can help you
Reply With Quote