iterate does not iterate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iterate does not iterate

  • Creator
    Topic
  • #48717
    Bill Marsch
    Participant

      iterate

      3(0).0(%g1)

         if 3(0).0(%g1).IN1(0).00447(0)  eq =1  

            copy 3(0).0(%g1).IN1(0).00368(0)   to  PayorTypeCode

      with a pre tcl prior to the copy of a table look up

      This appears not to iterate when there is a 1 in the second group.  It only find the 1 in the first iterate does iterate work????? and how should it work

    Viewing 3 reply threads
    • Author
      Replies
      • #59473
        Anonymous
        Participant

          Bill,

          The problem may not be with your iterate.  The problem may be with your IF statement.  We are working with Platform 5 and have found that the IF statement is quite picky.  I have not been able to get an IF statement to work if I have an “…eq =1” in the statement.  The only way I have been able to get the IF statement to work correctly is if I set the 1 to a variable first.  Then set my IF statement to read as “…eq @num”  I’d try this first to see if it will work.   It may not be the issue but it is a start.

          Thanks….

          Thomas G. Rioux

        • #59474
          Anonymous
          Participant

            Before you do the “if statement” check your iteration.

            Check to see if it is stepping through your iterate with just a simple copy regardless of the input field maybe with an echo in the tcl code.

            If that works then I would agree with Tom, other wise you will need to look at your basis and you hl7 definitions.

            But yes iterates do work and have saved me many times.

          • #59475
            Bill Marsch
            Participant

              when in cloverleaf Xlated editor when sellecting basis it kept on coming up with a 3(0) and not a 1(0).  Once this was fixed it worked okay thank you all for your input.  this may have been a fix in release 5.4 not sure.

            • #59476
              Anonymous
              Participant

                Hi All,

                I wanted to “iterate” on Bill’s solution, since we worked together to solve it and I hope that Cloverleaf Tech Support will take a small note of it… I think we may have found a bug in the “IF” statement or maybe it’s an editor problem???…

                Here is what I have found… when you “pick” the field name off the inbound message “list” in the IF statement xlate, “sometimes” the incorrect BASIS (group) number is used. So, your IF statement is never “True”. I mostly find this problem in complicated HL7 messages that I would have maniplulated to fit the incoming message.  This has happened to me once before… so as Johnathan said, in a previous e-mail, check those BASIS numbers carefully before throwing out your IF statements and iterates…

                Have a good one, Mary.

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