Hello all!
I have an issue I could use some advice on. Those in Texas who use ImmTrac to report vaccines through their unidirectional FTP interface might be able to relate.
The goal I am trying to accomplish is to download a file containing acknowledgment (ACK) messages from an SFTP server using an inbound fileset-ftp protocol thread. The source system, ImmTrac, makes the ACK messages available in a single file which can contain anywhere from a couple hundred messages at a few KB in size to several thousand messages at 1-2 MB.
There are a couple of problems with the file that I am unable to find a way to overcome:
I’m looking for a way to remove the newline characters from the end of each HL7 segments, keep the newline before each MSH segment, and remove the FHS, BHS, BTS, and FTS segments before the file is received by Cloverleaf.
There are many different ways to accomplish this and I’m looking for suggestions, as well as example TCL code if available, on the best way to build this type of interface without impacting engine performance too much.
So far in development and testing using a small file, I can download and read in a file using the “single” format, then create a new HL7 message in an inbound TPS proc for each of the ACK messages in the file, but I hesitate to do this in production where the files can contain several thousand individual messages at a size of 1-2 MB.
My ideal solution is to download the file, process it, and make one file for each of the HL7 messages in the file to copy to a directory which Cloverleaf reads from using the fileset-local protocol, but I have no idea how to do that or if it is the best solution.
What do all think would be the best approach?