web stats
Create Unique Filename to be used for multiple destinations - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2020, 01:25 PM
Iskander Iskander is offline
OBX.2 Kenobi
 
Join Date: Feb 2011
Posts: 57
Iskander is on a distinguished road
Default Create Unique Filename to be used for multiple destinations

we are on Mirth 3.8.0

We have a channel that decodes Base64 PDF using the following transformer:

var pdfBytes = org.apache.commons.codec.binary.Base64.decodeBase6 4(msg['OBX']['OBX.5']['OBX.5.5'].toString());
org.apache.commons.io.FileUtils.writeByteArrayToFi le(new java.io.File('C:/Mirth/Fuel_PDF/'+UUIDGenerator.getUUID()+'.pdf'),pdfBytes,true);

It decodes the PDF's just fine. But i'm trying to find a way to retain the filename to be sent out of a second destination within the HL7 data. Any thoughts?
Reply With Quote
  #2  
Old 03-19-2020, 06:56 PM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,360
cory_cole is on a distinguished road
Default

You can either put the filename in OBX.5 or you can create a Z segment to put it in.
Reply With Quote
Reply

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 04:46 PM.


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