I want (in some sense) to archive a history of thousands of incoming HL7 messages forwarded from a specific HL7 TCP Business service, so that I can delete the entire message warehouse and replay them in a clean environment. [This is an Ensemble HL7 application and not a classic interface engine]
There are a number of ways to do this but none that come to mind this evening are going to be as easy and intuitive as I would like.
My first thought was to simply export the messages to one or more files, but I either create an enormous file, or have to worry about the files being replayed in the correct order. If I knew for certain the order that files would be processed from a directory, perhaps I could manage the filenames as I export.
I could move the information to separate globals and then replay them by reading and recreating the original TCP/IP feeds but that sounds like too much work.
Does anyone have any experience or creative ideas about how this could be done with minimal work?
Dave
A history of message built up over the last three months.
Essentially they have been processed and filed into a data model but the data model has changed so I want to refile them.
Thanks
Dave
David Loveluck
Have you considered a business operation which writes each message to a separate file, where the file name is built from a specified directory, prefix and sequence number, starting at 1 (or specified number)? Then create a business service which does the opposite – reads files staring at sequence 1 (or specified number) until a specified end number or there are no more. Then you get the files in order and don’t have to read a directory.
Andrew
Yes it is, and for us the 10K is sufficient.
I think you could use hl7.OutputToString() to get the complete message.
You would need to test this a bit, but it should work.
-Ben
From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in...@googlegroups.com] On Behalf Of Jim Dolson
Sent: Wednesday, June 11, 2008 8:44 AM
To: Ensemble-in...@googlegroups.com
Thanks to everyone who answered. In this case, it was decided that we could reduce the number of messages resent by an order of magnitude. So exporting everything to a file worked well - we had a 10 MB file. We read that in with a standard HL7 file adapter with no problem.
My concern about one big file was the ability to throttle the throughput and also to restart in the case of failure.
I have written routines before that find and resend messages, but I have always added in a small hang every few messages and kept track of how far I have gone.
These can all be resolved with a little thought but I didn't need to in this case.
dave
David Loveluck
-----Original Message-----
From: Ensemble-in...@googlegroups.com
[mailto:Ensemble-in...@googlegroups.com]
On Behalf Of Andy
Sent: Thursday, June 19, 2008 9:03 PM
To: InterSystems: Ensemble in Healthcare
Subject: [InterSystems-EnsHlth] Re: saving and replaying messages received over
TCP/IP
We have to replay messages lots of time for all sorts of reason