iteration on repeating field

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iteration on repeating field

  • Creator
    Topic
  • #50430
    lisa sater
    Participant

    Hello,

    I have a field iteration on TXA23 (repeating field) to insert an system processing ID on each phycians record.  This is working.

    2249^Pasternak^Keith^^^^^^^^^^EPROV~8216^Oh^Young^S^^^^^^^^^EPROV

    But I also need to concat a a specific provider at the end of of the field, so it looks like:

    2249^Pasternak^Keith^^^^^^^^^^EPROV~8216^Oh^Young^S^^^^^^^^^EPROV~PL5005

    The number of providers on each message varies and with my attempts I am only able to concat to the field first component.  |2249~PL50005^

    Any help would be appreciated.

    Code:

    { { OP ITERATE }

       { BASIS 0(0).TXA.#23 }

       { VAR %f1 }

       { TYPE field }

       { BODY {

           { { OP IF }

               { ERR 0 }

               { COND {0(0).TXA.#23(%f1).[0] ne @null} }

               { THENBODY {

                   { { OP COPY }

                       { ERR 0 }

                       { PRE {

                           xlt_esp_prov_select_idtype

                       }}

                       { IN {{0(0).TXA.#23(%f1).[0]}} }

                       { OUT {{0(0).TXA.#23(%f1).[12]}} }

                   }

               }}

               { ELSEBODY {

               }}

           }

           { { OP IF }

               { ERR 0 }

               { COND { ~0(0).TXA.#2.[0]  eq @ltr ||  ~0(0).TXA.#2.[0] eq @ltr1} }

               { THENBODY {

                   { { OP COMMENT }

                       { COMMENT {Add the letter pool to the end of the CC md field TXA 23} }

                   }


Viewing 1 reply thread
  • Author
    Replies
    • #66079
      Anonymous
      Participant

      Add a varibable into you xlate

      Before you start the loop do an

      COPY =0 $%s2

      In the iterate add one that variable.

      MATH ADD  {$%s2} =1  -> {$%s2}

      After the loop is coplete

      add a Copy for your Doctor stuff

      COPY {=DR_DATA} 1(0).1(0).00123(%s2)

      This may be the wrong mapping trying to do thiw from memory and I’m getting old.  But this works I do it for several things like this.

    • #66080
      Jeannette Wistrom
      Participant

      John you are correct, this works wonderfully.

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

Forum Statistics

Registered Users
5,073
Forums
28
Topics
9,251
Replies
34,230
Topic Tags
275