ORU – Iterate OBX

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ORU – Iterate OBX

  • Creator
    Topic
  • #50945
    Marcus de Leon
    Participant

    Hi,

    I am having trouble iterating through an ORU OBX segment. I have done it with MDM’s no problem, but with ORU it doesn’t seem to be iterating through the list correctly. This is what I’m using.

    Type: segment

    Basis: 1(0).1(0).1(0).OBX

    Variable: %s1

    In my pathcopy:

    1(0).1(0).1(0).OBX(%s1)

    Is there anything I’m missing?

    Thanks,

    Marcus de Leon

Viewing 5 reply threads
  • Author
    Replies
    • #68142
      Kevin Crist
      Participant

      This is how we have some of ours:

      Type: group

      Basis: 1(0).1(0).1

      variable: %g1

      Pathcopy:

      1(0).1(0).1(%g1).OBX

    • #68143
      Marcus de Leon
      Participant

      That worked perfectly! Thanks!

    • #68144
      gricelda lopez
      Participant

      This issue resolved my problem as well!

      thanks!

    • #68145
      gricelda lopez
      Participant

      Kevin, your reply was very helpful and i thank you again.

      Question, I need to add a value “RAD” in obx-3, when i do a copy i only get the “RAD” in the first obx-1 message…would you happen to know how can i add this “RAD” to each of my obx segments?

    • #68146
      Robert Kersemakers
      Participant

      Inside the group-iteration, you will need another iteration over the OBX segments; something like this:

      Type: segment

      Basis: 1(0).1(0).1(%g1).OBX

      Variable: %s1

      You can then access all the OBX-segments by using 1(0).1(0).1(%g1).OBX(%s1).

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #68147
      Jim Kosloskey
      Participant

      Gricelda,

      If you are using the standard ORU^R01 the OBX and NTE pair are a group repetition not a segment repetition.

      I think you may have that correctly specified. Thus there is no use for a segment iteration.

      However, you must use the group counter appropriately on the destination field path to indicate which repetition.

      E.g. COPY =-RAD —> 1(0).1(0).1(%g1).OBX.#3

      Note the placement of the %g1 in the destination. Just make sure your placement is in the correct spot for your variant.

      If you are using PATHOPY for the OBX, make sure your COPY of =RAD (with the proper notation for the destination as above) follows the PATHCOPY.

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

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

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10