obr 4 test codes – aapend or put in array

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf obr 4 test codes – aapend or put in array

  • Creator
    Topic
  • #53877
    Femina Jaffer
    Participant

      Hi All,

      I am having a tough time doing the following, and would appreciate any help or examples.  

      I need to loop thru each OBR segment and grab the test code from OBR 4. I then need to append each of the test codes from each OBR segment into one variable and then replace the very first OBR segment  with the new variable in OBR 4.  For example, the OBR 4 field in OBR segment would look lik (FAST^CMP^VD25 eg).  I then need to convert the subsequent OBR’s to NTE segments (except the first OBR segment).

      Any help would be so much appreciated.  Thanks.

      Femina

    Viewing 1 reply thread
    • Author
      Replies
      • #79350
        Robert Milfajt
        Participant

          Not knowing much about what else you would be doing with subsequent OBX’s, etc.  I can see something like this in your Xlate:

          Code:

          Copy @null -> @NewProcedure
          Loop over OBR’s once
           Concatenate  @NewProcedure OBR-4 -> @NewProcedure
           If loop variable=0
           then (this is first OBR)
              Copy/Pathcopy OBR (if loop variable=0)
           else (subsequent OBR)
              Copy OBR into NTE
           end if
          end loop
          Copy new procedure to first OBR

          Hope this helps,

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #79351
          Femina Jaffer
          Participant

            Thank you Robert.  I will attempt this today.

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