Multi OBR and 1 OBX need to send separate messages

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Multi OBR and 1 OBX need to send separate messages

  • Creator
    Topic
  • #51734
    Donna LePage
    Participant

      I have an ORU message that has multiple OBR segments with only 1 set of OBX/NTE segments. I need to separate this into multiple ORU messages for every OBR and copy the OBX/NTE segment to the new messages.

    Viewing 7 reply threads
    • Author
      Replies
      • #71515
        Jim Kosloskey
        Participant

          Donna,

          Are you using Xlate? The following is assuming Xlate.

          I am in Nashville for the Regional Conference and will try to respond as best as I can time permitting.

          First know that this can be accomplished in Xlate.

          You will need to use CONTINUE and SUPPRESS.

          You will need to manage your own iteration counters as well as iterate over the ORC group (the OBR typically resides inside this group).

          At this point I do not see any need for Tcl if using the Xlate.

          Are you using BULKCOPY or PATHCOPY currently

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

        • #71516
          Donna LePage
          Participant

            Hi Jim, I am using an Xlate with Pathcopy. I have never used a counter in Xlates or had to use the suppress/continue. I will need more detail. I have also learned that they can accept the one message with multiple OBR but copy the OBX for each of the OBRs. I have been playing with moving the supress/continue around in the Xlate but have not succeeded in getting the 2 separate messages yet. Thanks for any help, Donna

          • #71517
            Gary Atkinson
            Participant

              Add the suppress at the beginning of your xlate.  Copy the MSH, PID  etc segments. Create your own group counter like %g99 and use this in the iteration for your OBR group.  Use MATH function to add one to each iteration of %g99 OBR grouping.  Outside of iteration use CONTINUE.  If you have a test message, run this through the hl7tester with level 2 or more to see where the iterations are occurring if need be.

            • #71518
              Donna LePage
              Participant

                OK I must be a DUH!!!! First off I don’t get what the %g99 math function is doing. Is the %g99 supposed to be a variable that I’m using as a counter? If so what am I suppose to do with the variable in the xlate.

                I’ve added the SUPPRESS to the beginning of the xlate and I have tried moving the CONTINUE in the interate and outside the iterate and just about everywhere in the message, but I do not get 2 clean messages. I can get to the point of 2 messages, but the first one does not have the OBX/NTE group.

                This is how the message is sent to the Xlate

                MSH

                PID

                PV1

                ORC

                OBR

                ORC

                OBR

                OBX

                NTE

                What I need to get to is either 2 separate messages with the OBR, OBX, NTE in each or

                MSH

                PID

                PV1

                ORC

                OBR

                OBX

                NTE

                ORC

                OBR

                OBX

                NTE

                Again Thanks, Donna

              • #71519
                Robert Kersemakers
                Participant

                  So if I understand correctly, you already get 2 messages: one with ORC/OBR and one with ORC/OBR/OBX/NTE. But you need to have a OBX/NTE with the first message as well?

                  Is there only one group with the OBX/NTE segment and you need to copy these to the other ORC/OBR groups as well? Then you will first need to go through all the groups and check what group has the OBX/NTE segment. Put this group nuber into a variable (like %g9). Then iterate through all the groups again and if the current group is unlike %g9, then copy the OBX/NTE from the %g9 group.

                  Weird though, to copy these OBX/NTE from other segments. Maybe you can remove/not send the ORC/OBR segments that have no OBX/NTE?

                  Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                • #71520
                  Gary Atkinson
                  Participant

                    %g99 is the counter (you can call it whatever you want) you use for the ORC/OBR grouping (however you have your variant set-up).  You need to control your own counter in order to split the messages.  Inside your iteration use MATH function add 1 to your counter.  So, for every grouping iteration the xlate will create another message.  If you have 4 OBR groupings then you should end up with 4 messages.

                  • #71521
                    Donna LePage
                    Participant

                      Here’s what I ended up doing with a lot of help from Clovertecher Jim K. The vendor would take one oru message with multiple OBR/OBXs but the OBX had to follow each of the OBRs. Therefore I did not need to use the suppress, continue to create multiple messages. See attached document for the xlate….

                    • #71522
                      Gary Atkinson
                      Participant

                        I am following up to the %g3.  I don’t understand how that comes into play?

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