Beginner Iterate Question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Beginner Iterate Question

  • Creator
    Topic
  • #53369
    Jon Melin
    Participant

      Hello all, and thank you in advance. I am having some trouble figuring how to iterate through an OBX with multiple set IDs. I setup an iterate on the field but that didn’t seem to work. I must need to figure out where my %f1, %s1, etc needs to go but this is my first attempt at OBX segments. I am trying to get everything using the PathCopy as well.

      Please see screenshot below of what the message is like and what I am using for my PathCopy. I am trying to get every OBX| X (so in this case 1 – 47).

      Please let me know if you have any ideas.

      Thank you

    Viewing 6 reply threads
    • Author
      Replies
      • #77449
        Jim Kosloskey
        Participant

          Jon,

          First if this is an ORU or ORM message typically the OBX is part of a repeating group – the segment itself is not the repetition point.

          So check your variant and make sure you indeed have a repeating group or a repeating segment.

          That said it is essential the basis for your ITERATE be set properly and then you place the repeition counter in the correct location in the address path of your PATHCOPY.

          One thing you can do is to run your test message in the HL7 Tester using your inbound variant. Have the detail level up sufficiently you will be able to tell where in the address path the repetition occurs (group or segment).

          Also share your variant with us so we can give you some more advice.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #77450
          Jon Melin
          Participant

            Thank you, but I am still slightly confused.

            All I am attempting to do is to get every line of the OBX. Right now I just have PathCopy on the OBX and I get the very top line. I am not sure where I need to iterate in this instace. I am not using a variant at all, below is a screenshot of the structure though:

            Thank you again, please let me know.

          • #77451
            Keith McLeod
            Participant

              Notice in your variant that the repeating group structure actually starts at the PID segment.

              PID Basis will be

              group

              1

              %g1

              ORC Basis will be

              group

              1(%g1).1

              %g2

              OBX also a group inside the others Basis will be

              group

              1(%g1).1(%g2).3(0).0

              %g3

              pathcopy 1(%g1).1(%g2).3(0).0(%g3).OBX –> 1(%g1).1(%g2).3(0).0(%g3).OBX

              I beleive this is what I saw in your structure.  Notice the each variable is included in the basis of other iterations contained inside of the root level PID iteration.  Hope this helps a bit….

            • #77452
              Jon Melin
              Participant

                I tried what I believe you are recommending and I received an error in the testing tool saying:

                [0:TEST] Unable to get iteration basis address ‘1(0).1(0).1(0).OBX’.

                [0:TEST] Unable to compile XLT ‘X_XXXXXXXXXXXX.xlt’.

                Maybe I have the groups in the wrong location?

                I linked an image that shows most of my configurations. Please let me know if you see anything wrong.

                Thank you again,

                Jon

              • #77453
                Jim Kosloskey
                Participant

                  Jon,

                  If you want to I will work with you off line – just email me and we will start the discussion.

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

                • #77454
                  Keith McLeod
                  Participant

                    Oh yes.  I was using a 2.5 variant, but I extend the same offer as Jim K.  Also note that only one variable gets assigned per iterate statement.  Once you get this, it is a great tool.

                  • #77455
                    Jon Melin
                    Participant

                      I misread your reply. I figured it out. Thank you for the assistance, it really helped me by showing me to place the %g1, into the next iterate, and the same for all the groups. Thank you again.

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