Need help with writing message outbound using Tcl

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Need help with writing message outbound using Tcl

  • Creator
    Topic
  • #53961
    Mike Keys
    Participant

      I have a mockup where I have a HL7 message stored in a DB (SQLite). My outbound thread has already sent a variant of the message stored in the database to the outbound. In this case, an ORU was xlate’d to an A08 to ensure a patient exists in the receiveing system.

      What I have done, is create a route replies raw route on the outbound thread with a Tcl proc that queries the database where the ORU message is stored, check some flags, and then pulls that message out.

      I am able to pull the message out of the database just fine. The problem is then taking that message and putting it back on the outbound thread so that it is received by the external system.

      I’m a little overwhelmed by the descriptions in the Cloverleaf 6.0.1 manual.

      This is a non-production environment and I’m trying to create some proof-of-concept functions to show the rest of my team.

    Viewing 5 reply threads
    • Author
      Replies
      • #79658
        James Cobane
        Participant

          Mike,

          If I understand you correctly, you are running a tclproc in the context of a reply on your outbound thread, and need to send the message that you pulled from your database query out the outbound, is that correct?  If so, I think you need to set the disposition of your message to OVER, so that it goes in the reverse direction of the reply (i.e. outbound).  Since you are running in the ‘reply’ context, the disposition of CONTINUE will simply send the message down the reply route; setting it to OVER should send it in the opposite direction.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #79659
          Mike Keys
          Participant

            James,

            This is exactly right. Here is my setup for the outbound thread:

            In the outbound tab, I checked “await replies” with a -1 timeout, a cl_check_ack for the TPS Inbound Reply and put a HL7Raw_ack proc in the Reply Generation section. Figured I needed to do this so the receiver could generate an ACK. I’m routing this through a testing tool.

            My route replies route is raw with and configured as a wilcard ACK.* (I tried it as a static route as well). The Tcl proc is on this route and I changed the disposition to over. There is still nothing going outbound.

            I figure I have a configuration wrong somewhere. Let me know if anything I have configured above is in error.

          • #79660
            Mike Keys
            Participant

              I changed the disp to “OVER” but now an outbound message is pending. When I look in the DB Administrator, I see two messages. One is the ACK for the converted ORU to A08 message. Message is a REPLY PROTOCOL with a state of IB pre-SMS. The other message is the A08 itself which DATA PROTOCOL in an OB reserved for IB reply state 16.

              Does this mean that the A08 is trying to be replayed?

            • #79661
              Mike Keys
              Participant

                **RESOLVED**

              • #79662
                James Cobane
                Participant

                  Mike,

                  Sorry, I didn’t get back on here earlier but I see you have it resolved.  So, what was the outstanding issue that needed attention?  Just curious.

                  Thanks,

                  Jim Cobane

                  Henry Ford Health

                • #79663
                  Mike Keys
                  Participant

                    James,

                    It was just the learning curve in understanding how to use Tcl to control message flow. I’m a little used to cookie-cutter procs that only get tweaked when dealing with individiual fields/segments. Understanding how to change message output, kill messages, replay messages using Tcl is new to me.

                    But, after a lot of searching on these forums, I was able to figure it out. Your suggestion helped tremendously.

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