hl7mirthhl7-v2mirth-connect

Copy only new added files from one folder to another, without moving the existing files from source folder


I am doing file integration using mirth. There is one software which generate the HL7 files. I want to read data from that files, without moving them to another destination. Next time when I want to read data, at that time it'll ignore the files from which the data are already read (i.e.Just read the new files data which are generated after last data read).

I had done this but I'll achieve it when I modify the original filename, if I am not modifying the filename then it'll read the duplicate data.

Is there is any solution for this problem, so we can read data from the files which are generated new. I am using mirth 3.5.1 version and HL7 v2 messages. Thanks in advance.


Solution

  • Thanks @daveloyall, I am posting your comment as a answer here.

    When you rename a file at the time you process it, for example, to add a .DONE suffix to the filename, you are adding information that can be used later. The part of the channel that reads files could be configured to skip files that have the .DONE suffix. You also add information if you move the files. Or store the filenames in some database table. I don't know if Mirth has an internal feature that tracks which HL7 messages it already processed, but if such a feature exists, the keyword 'deduplication' might be associated with it.