Checking for Repeating Fields OBR

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Checking for Repeating Fields OBR

  • Creator
    Topic
  • #48546
    Femina Jaffer
    Participant

      Hello,

      I was wondering if anyone knew how one can go about checking if there are multiple occurrences in a repeating field – for example OBR 28.  I need to check if there are multiple Doctors (ID) listed in this field before continuing the message.  This is a repeating field.  I am writing a tcl proc and I can only change the first occurence.

      Thanks

      Femina

    Viewing 3 reply threads
    • Author
      Replies
      • #58945
        Robert Kersemakers
        Participant

          Hi Femina,

          I think you need to iterate over the field. Try something like:

          ITERATE Type:field Basis:1(0).OBR.00260 Variable:%f1

          Within this Iterate you can access each occurrence by using %f1:

          COPY 1(0).OBR.00260(%f1).[0] -> @ID

          Hope this helps,

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #58946
          Femina Jaffer
          Participant

            Thank you Robert.  I will give this a try.

            Femina

          • #58947
            Jim Kosloskey
            Participant

              Femina,

              Why not just check the second repetition of a required field?

              If the data repeats multiple times, there has to be a second occurrence. That will save you an iteration just to find out if there are more than one repetitions.

              Jim Kosloskey

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #58948
              Femina Jaffer
              Participant

                Jim,

                Could you elaborate, I couldn’t follow what you were saying?

                fsj

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