Ususally the OBR segment is part of the repeating group that contains your ORC segment as well. To be able to determine where to iterate, you need to segments are contained within the group that repeats.
If you open your variant to the message you are translating and work you way down by clicking on the open curly braces that surround more than one segment, it will highlight what is part of the group. For instance in the following if you were to click on the curly brace under the SFT segment, it would highlight nearly all of the segments. All the segments highlights are contained within group 1(lets call it that). Your iterate would be
Type: group
Basis: 1
Variable: %g1
The next curly brace to click on would be right before the ORC grouping. It would contain most of the segments below the ORC. Your iterate would be:
Type: group
Basis: 1(%g1).1 (Note that the second group is contained inside the first group.)
Variable: %g2
Your OBR:16.0 statement would look something like:
Using Table Command:
1(%g1).1(%g2).0(0).OBR.#16.[0] –> 1(%g1).1(%g2).0(0).OBR.#16.[0]
Disclaimer: The actual path depend on your variant configuration. This one is from a 2.5 variant. The steps are basically the same for any vairant.
If the curly braces only surround the segment name, then it is the segment that repeats. The First OBX is part of a group where OBX is bundled with a repeating NTE segment. i.e. each OBX can have multiple NTE segments. The OBX grouping would be:
Type: group
Basis: 1(%g1).1(%g2).3(0).0 (Note that the OBX group is contained inside the ORC group.)
Variable: %g3
Your pathcopy statement would look like:
1(%g1).1(%g2).3(0).0(%g3).OBX –> 1(%g1).1(%g2).3(0).0(%g3).OBX
If you need to go inside the bundled NTE, the segment NTE repeats>
Type: segment
Basis: 1(%g1).1(%g2).3(0).0(%g3).NTE (Note that the NTE segment is contained inside the OBX group.)
Variable: %s1
Sample NTE:
1(%g1).1(%g2).3(0).0(%g3).NTE(%s1).#1 –> 1(%g1).1(%g2).3(0).0(%g3).NTE(%s1).#1
MSH
[{ SFT } ]
{
[
PID
[ PD1 ]
[{ NTE } ]
[{ NK1 } ]
[
PV1
[ PV2 ]
]
]
{
[ ORC ]
OBR
[{ NTE } ]
[
{
TQ1
[{ TQ2 } ]
}
]
[ CTD ]
[
{
OBX
[{ NTE } ]
}
]
[{ FT1 } ]
[{ CTI } ]
[
{
SPM
[{ OBX } ]
}
]
}
}
[ DSC ]