How to CONCAT all OBX.5 into a single OBX?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to CONCAT all OBX.5 into a single OBX?

  • Creator
    Topic
  • #48062
    Rentian Huang
    Participant

      Greetings Cloverleafers!

      Quovadx 5.2 on AIX

      Trying to CONCAT all OBX.5 into a single OBX, can anyone give me a hint?  – Thanks!

      INPUT:

      OBX|01|TX|Abdomen 1V^Abdomen 1v^Rad|01|1016180 Oloughlin Kathleen|…

      OBX|02|TX|Abdomen 1V^Abdomen 1v^Rad|01||…

      OBX|03|TX|Abdomen 1V^Abdomen 1v^Rad|01|Screening Mammogram:||…

      …….

      OUTPUT:

      OBX|01|TX|Abdomen 1V^Abdomen 1v^Rad||1016180 Oloughlin Kathleen.brScreening Mammogram:.br……||||||F|

    Viewing 5 reply threads
    • Author
      Replies
      • #57505
        Jim Kosloskey
        Participant

          Typically the receiving system wants the elements from each OBX-5 to be as repeating OBX-5 field in one OBX (not concatenated together).

          Are you sure that is not what is needed?

          For example:

          ib:

          OBX|01|TX|Abdomen 1V^Abdomen 1v^Rad|01|1016180 Oloughlin Kathleen|…

          OBX|02|TX|Abdomen 1V^Abdomen 1v^Rad|01||…

          OBX|03|TX|Abdomen 1V^Abdomen 1v^Rad|01|Screening Mammogram:||…

          ob:

          OBX|01|TX|Abdomen 1V^Abdomen 1v^Rad|01|1016180 Oloughlin Kathleen~~Screening Mammogram:~…

          Using your example.

          Rather than an ob:

          OBX|01|TX|Abdomen 1V^Abdomen 1v^Rad|01|1016180 Oloughlin KathleenScreening Mammogram:…

          THe technique for either is similar but yet different – and you want to get correct what the receiving system wants.

          Jim Kosloskey

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

        • #57506
          Jim Kosloskey
          Participant

            Sorry, for some reason I missed your sample OUTPUT.

            OK –

            Iterate through the OBX (probably a group) and concat the OBX-5 value with a temp variable and the .br.

            When the iteration is finished the temp variable will have the concatenated information with an additional .br. You can either leave it as it may not cause a problem or remove it using a Tcl proc.

            Then copy the temp variable to the first (and only) ob OBX-5. Of cpourse you can either copy the rest of the OBX from the first IB OBX-5 before the iterate or after.

            Jim Kosloskey

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

          • #57507
            Rentian Huang
            Participant

              Jim, I think you are absolutely right, I was thinking of that too, but while doing the xlate, I was having problem: the OBX segment never shows up. Here’s what I used:

              1. ITERATE:

                 Type: segment  Basis: 1(0).1(0).1(0).OBX  Variable: %g1

              2. Inside the ITERATE:

                 CONCAT: Separator: .br    Source: 1(0).1(0).1(0).OBX(%g1).00573  @box5    Destination: @box5

              3. After the ITERATE and outside of the ITERATE

                 COPY:  Source: @obx5     Destination: 1(0).1(0).1(0).OBX.00573

              Where did I do wrong?

            • #57508
              Rentian Huang
              Participant

                the %g1 is acutally %s1, my typo  ðŸ™‚

              • #57509
                Jim Kosloskey
                Participant

                  My guess is your basis is incorrect.

                  One way to check it is to run the HL/7 Tester using the IB variant and the message with which you are testing. Turn the noise level on the Tester to 2 and observe where the address path changes for each OBX.

                  I think you will see it change at 1(0).1(0).1(0) not 1(0).1(0).1(0).OBX.

                  So I think this is a group iteration not a segment iteration (usually is group). If it is your Source: would be 1(0).1(0).1(%g1).OBX(0).00573  

                  Anyway, run the HL/7 tester and make sure.

                  Jim Kosloskey

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

                • #57510
                  Rentian Huang
                  Participant

                    Jim

                    Yes I am running all my tests on the HL7 Testing tool…

                    The OBX never shows up problem was caused by a wrong HL7 variant. And I need to assign something to a variable before actually using it.

                    You have my thanks!

                    Have a great weekend,

                    Sam  

                    😛

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