Configuring File drop, changing HL7 messages into individual

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Configuring File drop, changing HL7 messages into individual

  • Creator
    Topic
  • #54543
    Robert Denny
    Participant

      I am testing a process where we receive HL7 messages and then using TCL convert them into individual text files.

      I have been testing sending 5 files at a time, and it appears that we are losing some of the messages. It seems like Cloverleaf is not processing the data fast enough. Often we get the first and last messages in the group of 5.

      If I send 5 message directly from EPIC then we got 3 of them. We are writing the outbound data to a SMAT file and it shows that we sent all 5 outbound from the thread, but the process that picks up the files is only showing 2 files were processed and when I look at the Directory that we are dropping them into on the Cloverleaf server, there are usually only 2 messages.

      Is there something that can be done to speed up the processing of the messages? I will do more testing, but anyone who has done this type of action may have ran into this issue too.

    Viewing 1 reply thread
    • Author
      Replies
      • #81929
        Mark Thompson
        Participant

          Hi Robert,

          It is not unusual to convert an HL7 batch containing thousands of messages into individual messages.

          Can you describe how you are splitting the messages.  Or more importantly how you are creating and naming the individual files?

          You didn’t mention your Cloverleaf version.  The database utilities in newer releases may be an excellent tool unless you specifically need to create files.

          Depending on what you are trying to accomplish, there are plenty of Clovertech folks who can help assure you don’t lose messages.

          - Mark Thompson
          HealthPartners

        • #81930
          Jeff Dinsmore
          Participant

            Perhaps a simple question, but how are you naming the files?  Are you sure you’re not overwriting files?

            I, generally, will add a timestamp to be sure the file names I’m writing are unique – something like myFile_YYYYmmddHHMMSS.txt.  

            If the possibility exists that you’ll be writing more than one file in the same second, you have to add more granularity to the file name template to accommodate that – something like myFile_YYYYmmddHHMMSSnn.txt where nn is a numeric suffix.

            So, before you open the file for write, check if it exists first – something like this:

            Code:

            set fileDir /tmp
            for { set n 1 } { $n = 100 } {
            # files exist with all 99 extensions 01-99
            puts “no file name available”
            } else {
            set outFilePath [file join $fileDir $outFileName]
            puts “found available file $outFilePath”
            }

            Good luck!

            Jeff Dinsmore
            Chesapeake Regional Healthcare

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.