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

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
Reply With Quote