Route Message from Tcl proc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Route Message from Tcl proc

  • Creator
    Topic
  • #52746
    Chris Wallace
    Participant

      Here is my problem.  The facility that i am working with uses static routes to send messages.  There is one message that the facility only wants to go to 1 application out of the 15 that the static route is setup for.  This would mean that for the other 14 applications I would need to put a kill on that message to prevent it from going to those applications.

      Question.  Is there a way to route a message using a Tcl proc.  I would put it on the TPS inbound data and just put it to the outbound thread to that 1 application.  Is this possible or do i just add the kill script to the other 14 routes.

      Thanks,

    Viewing 8 reply threads
    • Author
      Replies
      • #75356
        John Mercogliano
        Participant

          Hi Chris,

           What I’ve done in this situation is I’ve created a trxid proc and as a default returned the normal MSH:9 replacing the ^ with a _.  But give your special message it’s own special route name.  Then you can create a seperate route just for that message.  

            The plus side to this way is your not creating messages just to kill them.

          Hope this helps,

          John Mercogliano
          Sentara Healthcare
          Hampton Roads, VA

        • #75357
          Chris Wallace
          Participant

            Wont the new trxid still route down the static route??

          • #75358
            John Mercogliano
            Participant

              Ouch, yep your right I read right over the part about the static route.  In your case then I can’t think of anyway around a kill proc in all the routes.

              John Mercogliano
              Sentara Healthcare
              Hampton Roads, VA

            • #75359
              Steve Carter
              Participant

                You’re heading down the right path.  Place a tclproc on the IB-TPS to identify the message and simply do the following once you’ve identified the message that needs to be rerouted:

                msgmetaset $mh DESTCONN $destThread

                Where $mh is your message handle and $destThread is your destination thread.  This will send your message to the outbound connection, but you won’t see a route line to the destThread.

                Hope this helps.

                Steve

              • #75360
                Chris Wallace
                Participant

                  That is what i want.  When I add the destThread that I want to send it to and do the route test it does not show up but it does show the rest of the static route using the hcisroutetestshowbydest thing.  Andto keep it from going down the static route, is there a way to keep that from happening??  i cant add the Kill or it kills the message everywhere right,.

                • #75361
                  garry r fisher
                  Participant

                    Hi,

                    Are all 15 messages different? Can you identify them or at least the one you want to send?

                    If so all you need to do is add an IF block.

                    This is very simple and you may need to add more supporting code:

                    if mess=’one I want’

                  • #75362
                    Chris Wallace
                    Participant

                      its not 15 different messages. It is 1 message that i only want to go to 1 location instead of the 15 locations that are on the static route.

                    • #75363
                      Henry Tabingo
                      Participant

                        Chris,

                        If you can identify uniquely the one message out of 15 you want to send based on the segment, field, and subfield, at Adventist Health we use a tcl script that might help you.  The disposition argument “‘continue” will send the one message and kill the rest and the disposition “kill” will kill the message and send the rest. I’m attaching the tcl proc. I hope it helps.

                      • #75364
                        Henry Tabingo
                        Participant

                          Chris,

                          Sorry I missed your last statement indicating you have only one message going to 15 different locations.

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