web stats
How to Store response ACK to a file in mirth - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2018, 11:53 PM
sutirth.patel sutirth.patel is offline
What's HL7?
 
Join Date: May 2015
Posts: 1
sutirth.patel is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 01-02-2019, 09:16 AM
kirbykn2's Avatar
kirbykn2 kirbykn2 is offline
Mirth Guru
 
Join Date: Sep 2014
Location: Michigan
Posts: 557
kirbykn2 is on a distinguished road
Default

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

Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

Appliance Version 3.11.2
Mirth Connect Version 3.6.1
Java Version 1.6.0_45-b06
Java (64 bit) Version 1.6.0_45-b06
Java 7 (64 bit) Version 1.7.0_151-b15
Java 8 (64 bit) Version 1.8.0_121-b13
PostgreSQL Version 9.6.3
Reply With Quote
  #3  
Old 02-18-2019, 11:37 PM
riven974 riven974 is offline
Mirth Newb
 
Join Date: Mar 2018
Location: Reunion Island
Posts: 25
riven974 is on a distinguished road
Default

@Kirby : how do you store the response to a channel map variable?
Reply With Quote
  #4  
Old 02-19-2019, 07:24 AM
kirbykn2's Avatar
kirbykn2 kirbykn2 is offline
Mirth Guru
 
Join Date: Sep 2014
Location: Michigan
Posts: 557
kirbykn2 is on a distinguished road
Default

Look at the response transformer section in the manual or API
__________________
Kirby

Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

Appliance Version 3.11.2
Mirth Connect Version 3.6.1
Java Version 1.6.0_45-b06
Java (64 bit) Version 1.6.0_45-b06
Java 7 (64 bit) Version 1.7.0_151-b15
Java 8 (64 bit) Version 1.8.0_121-b13
PostgreSQL Version 9.6.3
Reply With Quote
  #5  
Old 02-21-2019, 04:50 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
  #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
Reply

Tags
ack, mirth, response

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:18 AM.


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