Sending original and modified msg to same thread

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Sending original and modified msg to same thread

  • Creator
  • #50760
    Mark Brown

    I’m looking at sending a HL7 message between two threads and then, if the message contains a particular value, change the sending application to a new value so it can be handled differently on the ancillary system, and then send the modified message to the same destination as the original message.

    My first thought was to send to a different thread that just sends the message on to the original destination thread.  But I’d like to avoid adding a thread if possible and I’m guessing that the receiving system might object to two messages with the same control id.

    Any ideas on this?


Viewing 3 reply threads
  • Author
    • #67421
      Tom Rioux


      Take your original message and lets call it “msg”.  Then change the sending application to a new value however you like and save the message to a new variable called “newmsg”.  You now have the original “msg” and the “newmsg”.  Then create a new message handle for the new message:

      msgset $mh1 $newmsg

      Then return both messages in the order you want them returned.

      lappend return_list “CONTINUE $mh1” “CONTINUE $mh”

      I have a proc that I use something similar on because a vendor needs A31’s created for all A08’s.

      Hope this helps…

      Tom Rioux

    • #67422
      Mark Brown

      Thanks!  I’ll give that a try.

    • #67423
      Keith McLeod

      You could add second route to the same destination using a different Xlate or tcl proc to make your changes…..

    • #67424

      You could use the trxid determination to route the message if it contains that value.

      So you would have two routes to the second thread. But this would require some TCL programming.

      Route two would do the work to change the sending application.

      Route one would just be a static route.

      Or you could do an if statement with in the xlate to continue the original message.

      Then set an if statement to suppress or continue the message based on what you are looking for.

      I think that would be the easiest.  No TCL programming and very supportable.

      I mean sitting down and thinking about this it boils down to doing what you are most comfortable with.

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

Forum Statistics

Registered Users
Topic Tags