log of successful messages?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf log of successful messages?

  • Creator
    Topic
  • #53620
    Ruth Berge
    Participant

      Is there a way to generate a log of successful messages where success is defined as having received a positive acknowledgement?

      (not an application acknowledgement just a network or commit ack)

      I have tried with the sendOKprocs on the outbound thread and I am getting all messages that are success or fail.

    Viewing 6 reply threads
    • Author
      Replies
      • #78313
        Jim Kosloskey
        Participant

          Ruth,

          One way:

          If you are saving the inbound SMAT as well as the outbound SMAT then you have all of the acknowledgments which were recieved.

          Then IF you are providing a proper MSH-10 (Control ID) AND the acknowledgments are properly constructed such that the MSH-10 of the sent message is properly repeatd in the Ackowledgments MSA-2 then you can write some Tcl to locate every outbound message whose MSH-10 matches up with an acknowledgment’s MSA-2.

          Another way:

          In your reply handling stack include a proc that writes to a file the message which is being replied to (making sure the reply matches the message). You will still need some more Tcl to analyze/report on the file.

          If I needed to do this I would use SMAT.

          I guess the real question I have is once an integration is proved to be functional why would you need something like this on an ongoing basis?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #78314
          Ruth Berge
          Participant

            I am trying to meet a Meaningful Use lab menu item that requires a count of all messages sent to an Ambulatory provider.  I am assuming that they mean messages that were successfully sent by the way.  For my purposes, a log file of those messages will work.

          • #78315
            Jim Kosloskey
            Participant

              Then why not simply count the number of replies in the inbound SMAT?

              A reply is for a message received – normally.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #78316
              Ruth Berge
              Participant

                the report must be generated automatically.  I don’t know how to count SMAT!   Also i want to be able to do something with the message after it is succesfully sent.  For this reason, I am hoping to get a log file with the successful messages.

              • #78317
                Charlie Bursell
                Participant

                  A successful message means it has been sent and a good ACK received (AA)

                  Unfortunately, right now, SMAT will record all messages sent out regardless of the ACK received.  If the message is resent, multiple copies may be in SMAT

                  Assuming this is HL7/MLP.  Use the procedure cl_check_ack as a model.  Rename it and modify it.  In there if you get a good ACK (AA) simply write a copy of the message to wherever you want to log it.   The message will be available in the OBMSGID handle.

                  Piece of cake  ðŸ˜€

                • #78318
                  Ruth Berge
                  Participant

                    I wanted to report back that the method that Charlie Bursell describes appears to work.  I have not fully tested but I do know that if the message is not sent then it will not log it.  This was not a piece of cake for me to get set up and I could only do it with assistance internally.  I’ll try to update again when I have more complete testing but I do want to thank you for the suggestion.  I could not determine which of those tcl procs would be a good starting point and it was invaluable for you to give me that information.

                  • #78319
                    Ruth Berge
                    Participant

                      The cl_check_ack_modify was edited so that a successful message would write to a specific log file.

                      under switch – exact

                      AA-CA{

                        set Ambfile [clock clicks]

                        set Amb01  [open ambupdate/$Ambfile$disp w]

                        fconfigure $Amb01 -translation binary -encoding utf-8

                        if {[uplevel #0 {info exists EuroBinary}]}  {

                        fconfigure $Amb01 -encoding -eofchar {}

                        }

                        msgwrite $style $my_mh $Amb01

                        close $Amb01

                       #Good ack clean up

                        set send_cnt 0             :#init counter

                        return “{KILLREPLY $mh} {KILL $my_mh}”

                        }

                      The set up is like this.  Lets say that you want a folder that has a file for each message that is successfully sent from thread MyProv01.  MyProv01 is a sending thread.   You have a tcl proc cloned from cl_check_ack_modify as shown above so that the success ack creates a file to a specified file name.

                      On the thread, on the Outbound tab, enter the name of the tcl proc you created in the TPS Inbound reply.  Also have Send Ok Procs set to cl_save_ob_msg

                      In this example it create a file in a folder under the exec process.  I have to create the folder when I install the site.

                      A different process can read the files and do what is needed with them.

                      Again, I had help from others to get this working.

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