Creating many ORU messages from one in an Xlate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Creating many ORU messages from one in an Xlate

  • Creator
    Topic
  • #52385
    Gordon Koch
    Participant

      I am stuck on a problem, and hope that someone may have solved this before. I need to break up one ORU message with repeating OBR and OBX segments, but not duplicate the result data. For example, the incoming message is:

      MSH

      PID

      ORC

      OBR

      OBX

      OBR

      OBX

      OBX

      OBR

      OBX….

      I need to have:

      MSH, PID, ORC, OBR, OBX

      then

      MSH,PID,ORC, OBR, OBX, OBX

      and

      MSH,PID,ORC, OBR, OBX…

      without repeating the OBR and OBX data amongst the messages. I have tried various builds in my Xlate and HL7 config, but I keep on repeating the OBR/OBX data in my multiple messages. Any help…

      Thanks,

      Gordon

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

          Gordon,

          Is BULKCOPY involved?

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

        • #74005
          Gordon Koch
          Participant

            Hello Jim,

                 No, I am using PATHCOPY, COPY, and SEND with playing around with the HL7 variant (and of course re-copying the MSH, PID, and ORC segments). My iterates are not helping either. I do realize that I need a SUPPRESS somewhere to stop my unwanted repeating of the OBX segments across the messages, but have not nailed it yet. Any input would help.

            Thank You.

          • #74006
            Jim Kosloskey
            Participant

              Gordon,

              email me and I will try to help you through this.

              The most important thing is on the face of it this will be doable.

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

            • #74007
              Russ Ross
              Participant

                Here is what you describe and I will add some comments in red to help make some points that might help you figure out what is going wrong:

                MSH

                PID

                ORC

                OBR

                OBX

                OBR

                OBX

                OBX

                OBR

                OBX….

                do SUPRESS at beginning of xltate to supress orginal message from going out

                I need to have:

                MSH, PID, ORC, OBR, OBX

                send this message out, then use PATHCOPY to NULL the outbound OBR, OBX segments, then reset your outbound counters/pointers back to zero

                then

                MSH,PID,ORC, OBR, OBX, OBX

                send this message out, then use PATHCOPY to NULL the outbound OBR, OBX, OBX segments, then reset your outbound counters/pointers back to zero

                and

                MSH,PID,ORC, OBR, OBX…

                send this message out, then use PATHCOPY to NULL the outbound OBR, OBX… segments, then reset your outbound counters/pointers back to zero

                The things I’m trying to illustrate that you might be missing are:

                – the index value of the outbound HL7 paths will not match the inbound iterate counter used and you will have to create your own counter and

                reinitialize for each new message being built

                – after sending out each message you will want to NULL out the segments you plan to reuse before you repopluate them

                – us a SUPRESS at the beginning of your xlate to keep from sending out the orginal message, but sounds like you now this.

                Note: There is a specific syntax that allows you to get at the value of iterate counters and manipulate them to your liking that you will need to do on the outbound side.  If you don’t know what that syntax is then it is something like $%s1 but I always have to check to make sure if that is exactly right, so if others know the correct syntax off the top of their head please correct me if I got it slightly wrong.

                Russ Ross
                RussRoss318@gmail.com

              • #74008
                Gordon Koch
                Participant

                  Thanks Jim. I sent you an email via the PM Box system, but I still see it in my Outbox. I am not sure then if you received it, or if you just did not view it yet.

                  Gordon

                • #74009
                  Gordon Koch
                  Participant

                    Thank you Russ for you input her too. I am not sure if I understand all your points though. I do not know which action resets the pointers/counters back to zero (what should be set to @null?). I did @null the segments I did not want (very helpful) but I am left with “blank” segments that I’m sure are not desired by the receiving system. If there is no trick to get rid of them in the Xlate, I can remove them post proc.

                    Finally, I do not know how to resolve the problem you mentioned in the second part of your statement below. The only counter action I am familiar with is to increment a value by 1 with MATH.

                    ” the index value of the outbound HL7 paths will not match the inbound iterate counter used and you will have to create your own counter and

                    reinitialize for each new message being built”

                    Again, any extra time of yours to help with above is appreciated.

                    Thank you.

                  • #74010
                    Russ Ross
                    Participant

                      Since some of what I explained leaves you with abstract ideas and I want to help lets try an abbreviated approach.

                      I remembered using this approach for sorting IN1 segments and you might be able to understand this and get it to work.

                      First make the OBR & OBX segments in your HL7 varinat optional if they aren’t already setup that way.  This will allow you to use the same HL7 pathing on both the inbound and outbound variants because any optional segments that we NULL out will automatically be removed by cloverleaf on the outbound side if the segments are defined as optional.

                      then try this logic:

                      MSH

                      PID

                      ORC

                      OBR

                      OBX

                      OBR

                      OBX

                      OBX

                      OBR

                      OBX….

                      do SUPRESS at beginning of xltate to supress orginal message from going out

                      I need to have:

                      MSH, PID, ORC, OBR, OBX

                      send this message out, then use PATHCOPY to NULL the outbound OBR, OBX segments that you just populated

                      then

                      MSH,PID,ORC, OBR, OBX, OBX

                      send this message out, then use PATHCOPY to NULL the outbound OBR, OBX, OBX segments

                      and

                      MSH,PID,ORC, OBR, OBX…

                      send this message out, then use PATHCOPY to NULL the outbound OBR, OBX… segments

                      If OBR, OBX is a group you might need to make that optional, too.

                      Let’s see if this approach can get you there without having to completely understand how to get total control of the iterate counters.

                      Let us know if this gets you any closer because it still seems some understadning of controlling the iterate counters might be necessary when reiterating to do the PATHCOPY nulling of the segmetns you just sent out.

                      Here is a URL to help get you started at understanding how people use the $%s1 and $%g1 syntax to take control of iterate counters.

                      <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=3706&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=3706

                      Here is the URL illustrating how I took advantage of this technique to sort IN1 groups which also show some use of the $%g1 notation:

                      <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=2206&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=2206

                      the post does go on for a bit so if in a hurry look at my post in the above URL on Mon Sep 17, 2007 5:10 pm.

                      Russ Ross
                      RussRoss318@gmail.com

                    • #74011
                      Gordon Koch
                      Participant

                        Thank you Russ for that additional explanation. Offline, Jim helped me pass two (or more) stumbling blocks in my Xlate so now it works  ðŸ˜€

                        Thanks again to you and everyone else in the Clovertech community, as this was not the first, and won’t be the last, time that I reach out to all for help.

                        Gordon

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