Writing tcl to find duplicate inbound charge messages

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Writing tcl to find duplicate inbound charge messages

  • Creator
    Topic
  • #53865
    Alice Kazin
    Participant

      A vendor is sending us duplicate charge messages.   The duplicate messages come in order and there is a sequence number in the messages.  What is best practice? Can I use a global variable in my tcl to store the last sequence number or should I store the last sequence number in a file?

    Viewing 1 reply thread
    • Author
      Replies
      • #79307
        bill bearden
        Participant

          We have had an issue where our EMPI will occasionally start duplicating messages. So we store the last 20 unique message ids (MSH-10) in a Tcl list that is a global variable to see if the message is a duplicate. We initialize the Tcl list in the start section of a tps proc. Then we check the message id of the current message to see if it is in the global list and suppress the message if it is.

          This works pretty well but I can see that storing the last 20 unique message ids in a file would work better in the case that we stop and start the process. The tps proc has to re-build the list of last 20 unique message ids every time we restart.

        • #79308
          Rob Lindsey
          Participant

            It is really going to depend on your specific setup as to what works best.  If the sending system always sends the duplicate message after the first one then storing the message ID in a global will work.  If they could send it a few minutes/hours later then you are going to have to look for another solution.  The GLOBAL will work but of course will use memory.  If you store the information into a data file then each time you read / write to the data file you have IO times happening which could slow down your response time.  Of course that also depends on how many you are storing off also.

            You could also look at setting up an SQLite table to store the information so that you can check to see if your system already go the message earlier in the day.  

            Again… many different ways to do what you are trying to do and if there is only one message ID to keep track of I would just use the GLOBAL variable but if you need to check against all messages received for the day then I would use an SQLite table.

            Just my opinion.

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