Routing question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Routing question

  • Creator
    Topic
  • #49841
    George Kulz
    Participant

      Hi all.

      I was wondering what the effects of the following will be.

      I have an xlate for the HCI static route, like this:

      _HCI_static_route_:

         xlate lanier_adt1

      Then, under that, I have another route that looks like this:

      ADT_A08:

          xlate lanier_adt1

      Each of these xlates performs a different translation.

      Now the qusetion is, exactly what happens when an HL7 message comes in that has a TrxId equal to ADT_A08? Do BOTH of these get kicked off? Or just one? And if only one does, which one is it?

      -George

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

          George,

          I think both get executed in the order they are specified.

          However, since in your example, both refer to the same Xlate they will not perform different translations.

          Typically if we have a static route and specific routing based on TrxId it is to have a sink to route all of the TrxIds we did not specify. We typically specify the hcitpsmsgkill proc on that route.

          Jim Kosloskey

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

        • #63823
          Tom Rioux
          Participant

            I’m assuming the “xlate lanier_adt1” means that you are sending to a destination called “lanier_adt1” and are using an xlate.  I don’t think you mean the name of the xlate is “lanier_adt1”.

            In any case, the A08’s will hit both translations and you should see two outbound messages for each ADT_A08.  To compensate for this, you can do one of two things:

            1.  Write a trxid determination script that will separate that A08’s from all other message types.  Route all A08’s to “ADT_A08” and route the rest of the ADT’s to something like “ADT_REST” or “ADT”.   You decide what you want to call your trxid’s in this case.

            2.  Write a quick and dirty tcl to kill A08’s on the static route.  Just place the code as pre-xlate tcl on the static route.  

            Personally, I like #1 better because it cuts down on unnecessary messages being routed through the engine.   Why route them if you are going to kill them anyway?  Route them at the beginning and then you don’t have to worry about killing them later.

            Hope this helps…

            Tom Rioux

            Baylor Health Care System

          • #63824
            Sundeep Kumar
            Participant

              Both get kicked off. By remember if any one of the route details under the ADT route fails all ADT routes will fail. Hoever the static will go thru

            • #63825
              George Kulz
              Participant

                First, I would like to say thank you to all that responded to this question. You all hit the nail on the head on the problem. It seems that both routes were being kicked off with one particular message. I have a question for Tom Rioux, who had this to say about how to separate out A08’s from everything else:

                1.  Write a trxid determination script that will separate that A08’s from all other message types.  Route all A08’s to “ADT_A08” and route the rest of the ADT’s to something like “ADT_REST” or “ADT”.   You decide what you want to call your trxid’s in this case.

                How do I write a TrxId determination script to accomplish this?

                -George

              • #63826
                Tom Rioux
                Participant

                  I didn’t write this but here is a simple one that may do the trick for you:

                  proc msgtypeTrxid { mh } {

                     set trxid  {}

                     # get msh#9 as the trxid

                     set msg [msgget $mh 0 256] ;# ENOUGH

                     set Fsep [cindex $msg 3]

                     set Csep [cindex $msg 4]

                     set trxid [translit $Csep _ [lindex [split $msg $Fsep] 8]]

                     set trxid [lindex [split $trxid _] 1]

                     if ![string equal $trxid A08] {

                         set  trxid ADT_REST

                     }

                  #  Will return either A08 or ADT_REST

                     return $trxid

                  }

                  Hope this helps….

                  Tom Rioux

                • #63827
                  George Kulz
                  Participant

                    Tom

                    Thank you for all of your assistance. However, I have had no luck getting that code to work. What I have done is gone back to the routing folder, and simply listed out all of the possible routes manually. Maybe I’ll revisit this another day but for now I need to get a particular job done.

                    As for the code, I even stripped it down to the basics so that it looks like this:

                    proc determineTrxId { mh } {

                      set trxid ADT_A01

                      return $trxid

                    }

                    with no luck at all. It just doesn’t like this code at all. FYI, I placed it in the space on the Inbound folder where you enter a UPOC for the trxid determination format.

                    Thanks again. At least the original problem has been resolved anyway.

                    -George

                  • #63828
                    John Hamilton
                    Participant

                      I do this kind of thing for many of my interfaces.  I would be curious as to what exactly is failing

                      Could you elaborate on what is going wrong.

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