Routing query response from state vaccination registry to diffferent OB thread

Clovertech Forums Cloverleaf Routing query response from state vaccination registry to diffferent OB thread

  • Creator
    Topic
  • #117633
    Eric Turner
    Participant

      We have successfully sent the query and received the response but now we need to grab that and move it to a different thread than the calling thread as our EMR doesn’t have bidirectional interfaces.

      We are using CL v19.1 for this. And we do not have web services so we are using curl and http-client protocol.

      We tried tried to use Route Replies but it won’t let us send to a different thread than the calling thread. So we sent it to the calling thread and tried to reroute it from there which appears to make it there and saves to the outbound messages smat from there but never shows up in the new OB thread?

      Any advice and help on this would be greatly appreciated.

    Viewing 2 reply threads
    • Author
      Replies
      • #117634
        Charlie Bursell
        Participant

          I have done this by creating a new message and killing the REPLY.  Your problem is you are trying to forward a REPLY message which will be treated accordingly.

          Assume I have an PDL TCP OB thread conn_2  that sends a message and gets a reply.  I want forward this reply to another thread even in another process, call it conn_4.  The below works as I have tested it.

          run {

          keylget args MSGID mh

          # KILL the REPLY message handle
          set dispList

            # Create a new message
            set nmh [msgcreate]

            # Set SKIPXLT so it does not get hung in translate
            msgmetaset $nmh SKIPXLT 1

            # Set the destination and source
            msgmetaset $nmh DESTCONN conn_4
            msgmetaset $nmh SOURCECONN $::HciConnName

            # Copy the contents of the REPLY message to the new message
            msgset $nmh [msgget $mh]

            # SEND the new message
            lappend dispList “SEND $nmh”

            # KILL REPLY and SEND new message
            return $dispList
            }

            • #119169
              Jim Boyd
              Participant

                Hi Charlie,

                i’m struggling a bit with this:

                thread 1: IB thread to receive VXUs

                thread 2: OB thread to send to VXUs to stage registry web service

                thread 3: OB thread to send VXU replies

                everything works so far except since I am sending a message of type REPLY outbound on thread_3 I’m not able to configure the same settings as for a DATA message (await replies, etc)

                On  thread_2, i have an IB reply proc to strip the soap envelope and continue the HL7 2.x ACK msg. ( or send it to the error DB if i don’t have a good http response code)

                I also have an xlate route  setup on the thread_2  Route Replies tab as I need to manipulate the message before it is sent to thread_3.

                Is there a point in this I could convert/create a DATA message from the REPLY message so when it can be sent to thread_3 as a DATA message?

                 

                thank you,

                Jim

            • #119170
              Charlie Bursell
              Participant

                Jim:
                Why not like I suggested.  If you SEND the reply as a data message tp Thread3 it will be an OB thread and can send via TCP/IP where ever you like.  For the IB Reply proc of Thread3 something like the attached Tcl proc (sendMsg).  Note you would validate the reply at the top and if it passes validation  KILL the reply and SEND data message.  I’ll leave it to you what to do if it is a bad reply.

                Note there was a spelling error in the original script I gave you.

                 

                Attachments:
                You must be logged in to view attached files.
              • #119172
                Charlie Bursell
                Participant

                  Jim:
                  I forgot you wanted to do some translation on the message.  You could OVER the msg from Thread3 to an IB thread which routes to Thread3 via Xlate and do translate there as a data message.  As an example of how to do that see the attached Tcl proc (handleSEND).

                  With this said there are much better methods to do what you want with the newer engines.  Goutham Mulaguru just did a WebEx on this very subject using VXU and three threads similar to what you are doing.  I am sure you can get a copy if you request it.

                  Attachments:
                  You must be logged in to view attached files.
              Viewing 2 reply threads
              • You must be logged in to reply to this topic.