Iterate more than one variable

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iterate more than one variable

  • Creator
    Topic
  • #53345
    Elijah Park
    Participant

      I’m trying to combine a provider’s npi and an internal id from 2 repetitive PV1-9 fields into one. Here is a simplified example of what I am trying to do…

      Before:

      PV1|||||||||1234^DOOLITTLE^DR^^^^^PID~1234567891^DOOLITTLE^DR^^^^^NPI

      After:

      PV1|||||||||1234^DOOLITTLE^DR^^^^^PID^^^1234567891

      My approach is to iterate through PV1-9. If I see an “NPI” id type, then I’m subtracting my counter by one and inserting the npi number in f1-1.

      In order to accomplish this, I must define 2 variables; however, I’m having quite a time doing this. What am I doing wrong?

    Viewing 1 reply thread
    • Author
      Replies
      • #77351
        Keith McLeod
        Participant

          If you always want it to be f1-1 then your statement should be something like:

          math sub {$%f1} =1 –> {$%f2}

          Get rid of the math add statement.

          Also your If statement is looking for PNPI.

          You do not need to declare %f2 in your iterate, remove that as well.

        • #77352
          Elijah Park
          Participant

            Thanks Keith. That did the trick. 🙂

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