creating 2 msgs from a single msg

Clovertech Forums Cloverleaf creating 2 msgs from a single msg

  • Creator
    Topic
  • #120464
    Stewart
    Participant

      How can you create 2 different msgs w/ tcl or xlate from a single msg?

    Viewing 2 reply threads
    • Author
      Replies
      • #120465
        James Cobane
        Participant

          Stewart,

          In Tcl, you can use the msgcopy command (look in the reference guide for Tcl extensions, message extensions) in the tps context.

          Within an xlate, you could use the CONTINUE (or SEND) option.

          Which method you use is going to depend on your “use case” and what you are trying to do.

          For example, if you need to create two ADT^A02 messages within an Xlate because a system can’t process a single ADT^A17, you could map the PID/PV1 data for the first patient then CONTINUE and then map the PID/PV1 data for the 2nd patient and let the Xlate natively create the final message.

          Hope that helps/makes sense.

          Jim Cobane – Henry Ford Health

        • #120466
          Stewart
          Participant

            I have a msg that needs to be divided into 2 different msgs since it contains 2 results.

          • #120467
            Keith McLeod
            Participant

              In a translate, you would use the CONTINUE to drop the message as it is built up to that point.  You may need to remove segments like a repeating ORC group and then rebuild from the next group of Segments under the ORC grouping.  I use pathcopy @null to remove an entire path that begins with a group identifier like:

              pathcopy @null –> 2 will remove all paths that begin with 2.

              Usually the CONTINUE is located at the end of an iterate.

              Once outside the iterate, the end of your translate code also sends whatever is built to that point.  You may need to SUPPRESS to not send anything extra if the CONTINUEs placed what you need on queue.

              Run through the testing tool to check on what would be sent.  Usually you will see the output stacked on top of each other.  Like sending an ADT^A04 from an Order message.  You can effect the order of messages in a single queue like to have the A04 fal directly before the Order message.

               

              Hope this helps…..at least get you started…

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.