Amirk,
If you have repeating OBR Group you will need to ITERATE over that group.
Then inside the OBR ITERATE (assuming multiple OBR Group) ITERATE over the repeating OBX Group.
If you do not have repeating OBR Group, then just ITERATE over the OBX Group.
Inside of the OBX Group ITERATE, iterate over the OBX-5 field (it is a repeating field).
Now you will need to maintain your own OUTBOUND or DESTINATION repetition counter for the OBX groups you are creating (since the number of OBX Groups you have coming in will not be the same as the number of the OBX groups going out, the inbound OBX Group Counter will not be useful).
You can use the MATH Action to ADD 1 to your counter (I like to use %g99 but you can use any numeric value that is not already in use) in order to increment it. You will need to increment the counter by one for each repetition of the OBX-5 field.
You use your counter in the COPY (or whatever) Actions building the Outbound OBX Group address path for each field at the appropriate point.
The above is assuming Xlate is in use.
If you have questions, email me directly and I will assist.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.