web stats
FTP - Non HL7 file - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2007, 04:31 AM
afterdark23 afterdark23 is offline
OBX.2 Kenobi
 
Join Date: Oct 2007
Posts: 66
afterdark23
Default FTP - Non HL7 file

I'm trying to create a FTP to FTP channel that gets a file and sends the file to its destination without any manipulation. The files are in PDF format and do not contain any data in HL7 format.

When I run the channel, this is the error I get:


FAILURE: Error evaluating transformer
SerializerException
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
__________________
Reid Hospital and Healthcare
Reply With Quote
  #2  
Old 12-05-2007, 05:48 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re:FTP - Non HL7 file

This is because you're selecting HL7 as the incoming protocol, so Mirth try to parse the file as is it was an HL7 message.

To avoid this, you can use an old trick: choose XML as the incoming message, and creates in the pre-processor a simple XML file

Code:
message='<file><content>'+message+'</content></file>';
return message;
Then, in the transformer select the content element as a channel var, and in the destination write a file with the content of this var.
Reply With Quote
  #3  
Old 12-05-2007, 08:20 AM
afterdark23 afterdark23 is offline
OBX.2 Kenobi
 
Join Date: Oct 2007
Posts: 66
afterdark23
Default Re:FTP - Non HL7 file

I'm still getting the same error. I have attached my channel. Could you take a look at it and see if I am understanding your logic correctly?

Post edited by: afterdark23, at: 12/05/2007 10:36
__________________
Reid Hospital and Healthcare
Reply With Quote
  #4  
Old 12-05-2007, 08:37 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re:FTP - Non HL7 file

You should check too: "File type" to "Yes"
and "Process Batch Files" to "No"
Reply With Quote
  #5  
Old 12-05-2007, 09:23 AM
afterdark23 afterdark23 is offline
OBX.2 Kenobi
 
Join Date: Oct 2007
Posts: 66
afterdark23
Default Re:FTP - Non HL7 file

Thanks for your help. That seemed to take care of the problem.

Will future versions be able to handle document transfers like this without the workaround code?
__________________
Reid Hospital and Healthcare
Reply With Quote
  #6  
Old 12-05-2007, 09:33 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re:FTP - Non HL7 file

Well.

I'm not sure this would be an useful feature: Mirth is useful because it try to understand the contents of the data it moves (HL7, X12, DICOM, XML, etc). If what you want to do is moving a file from one place to another, I think an cron(automated task will fits better). Nevertheless, if you think it's an interesting thing, you could add it as a new feature to the Issue Tracker


By the way, afterdark23. ¿Where are you working with Openlink?
Reply With Quote
  #7  
Old 12-06-2007, 08:38 AM
afterdark23 afterdark23 is offline
OBX.2 Kenobi
 
Join Date: Oct 2007
Posts: 66
afterdark23
Default Re:FTP - Non HL7 file

Currently we have set up automated applications to accomplish our file to file transfers. It would be nice to have one central location to monitor our interfaces and file connections. We can do file to file connections using Openlink, however, there is not allot of error trapping (IO exceptions, FTP can not connect) that allows us to see when a exception happens.

I work at a hospital in east central Indiana.
__________________
Reid Hospital and Healthcare
Reply With Quote
  #8  
Old 11-16-2010, 12:41 PM
lijun lijun is offline
OBX.1 Kenobi
 
Join Date: Jul 2010
Posts: 27
lijun is on a distinguished road
Default

Hi afterdark23, would it be possible for you to send me your channel sample code? I am having similar problem and wanted to try your solution. But I don't know how to implement "in the transformer select the content element as a channel var, and in the destination write a file with the content of this var." as Albert suggested.
Thank you for your help!

Lijun
Reply With Quote
  #9  
Old 11-18-2010, 01:26 PM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

I use successfully the following setup to FTP non-HL7 files (e.g. .gz files):

Incoming data: Delimited text
File type: Binary

Outgoing filetype also has to be Binary, otherwise the data are corrupted.
Outgoing template has to be ${message.rawData}

I don't need any other transformations like those described above.
__________________
JJ Mouris
FFE Luxembourg
IT-Department
Reply With Quote
  #10  
Old 03-21-2011, 12:04 PM
dallas dallas is offline
What's HL7?
 
Join Date: Oct 2010
Posts: 1
dallas is on a distinguished road
Default This worked for me.

This worked for me as well. Thanks for the heads up.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
1.7.1 file reader/file writer channel steverhusker Support 2 08-12-2008 08:53 AM
Simple Transform fails file to file copy MikeCaldwell Support 1 04-16-2008 10:56 AM
Read flat file and create a pdf file hope Development 1 09-20-2007 04:13 AM
File to File Channel - Access denied to destination file writer pzelenka Support 7 04-17-2007 11:50 AM
File Template Iterator Example for File Writer in Channel Destination mp3pete Support 0 10-02-2006 12:11 PM


All times are GMT -8. The time now is 05:00 PM.


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