More iterate help

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf More iterate help

  • Creator
    Topic
  • #48754
    Mark Perschbacher
    Participant

      After looking over the 100+ iterate help topics, I reluctantly need to ask for assistance with yet another iterate project.  I am trying to copy all the repeating OBX segments into repeating NTE segments.  Here is the iterate

      Iterate 1(0).1(0).1(0).OBX        %s1

      Pathcopy  1(0).1(0).1(0).OBX(%s1) > 1(0).1(0).0(0).NTE(0)

      I am getting a single NTE segment copied, but not all the repeats.  The variants have repeating OBX and NTE.  What am I doing wrong?

    Viewing 3 reply threads
    • Author
      Replies
      • #59574
        Nora Katz
        Participant

          Looks like you would need to put the repeating variable (%s1) in the NTE segment, also

        • #59575
          Mark Perschbacher
          Participant

            I now have Pathcopy  1(0).1(0).1(0).OBX(%s1) > 1(0).1(0).0(0).NTE(%s1), and it still doesn’t work.  Any other ideas?

          • #59576
            Nora Katz
            Participant

              I have found that the testing tool is helpful when I do iterates.  If you look at the OBX segment that changes:

              1(0).2(0).1(0).OBX(0)  :  >|1|NM|CRP^C-Reactive Protein|1|1.6|mg/dL|(0-0.8)|H|||F||||KR< 1(0).2(0).1(1).OBX(0)  :  >|1|TX|CRP^C-Reactive Protein|2|   ||||||F||||KR< 1(0).2(0).1(2).OBX(0)  :  >|1|TX|CRP^C-Reactive Protein|3|   **Interpretation**||||||F||||KR< 1(0).2(0).1(3).OBX(0)  :  >|1|TX|CRP^C-Reactive Protein|4|Negative: < or = 0.8 mg/dL||||||F||||KR< 1(0).2(0).1(4).OBX(0)  :  >|1|TX|CRP^C-Reactive Protein|5|Positive:       >0.8 mg/dL||||||F||||KR< 1(0).2(0).1(5).OBX(0)  :  >|1|TX|CRP^C-Reactive Protein|6|   ||||||F||||KR< Now look at an NTE segment that iterates: 1(0).2(0).1(0).NTE(0)  :  >|1||   < 1(0).2(0).1(0).NTE(1)  :  >|2||   **Interpretation**< 1(0).2(0).1(0).NTE(2)  :  >|3||Negative: < or = 0.8 mg/dL< 1(0).2(0).1(0).NTE(3)  :  >|4||Positive:       >0.8 mg/dL< 1(0).2(0).1(0).NTE(4)  :  >|5||   < My setup might be different, but my OBX segment number changes here:  1(0).2(0).1(%s1).OBX(0) and the NTE segments change here: 1(0).2(0).1(0).NTE(%s1) You would need to look at your own setup and see where the numbering is changing.  That is where you want to to put your iterate variable (%s1) Hope this makes sense

            • #59577
              John Mercogliano
              Participant

                Try changing your path copy to:

                1(0).1(0).1(0).OBX(%s1) > 1(0).1(0).0(%s1).NTE(0)

                Based on the path of the NTE it looks like it’s placed in a repeating group. So you have to put the iterate variable in the group portion and not the segment.

                Also, in this case you might want to use copy instead of pathcopy and copy each field. I found in the documentation that the source and destination must match.  In my case I was trying to copy the RXO to RXE but instead of getting an error I just got weird results, so it might look like it works but you can’t trust the output.

                John Mercogliano
                Sentara Healthcare
                Hampton Roads, VA

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