A quick test case to kind of review what I am thinking you are getting at.
My test message:
MSH|^~&|Send Ap|Send Facility|||20060602083331||ORU^R01||P|2.2
PID|1||123456||TEST^TEST|||Male||
ORC|NW||1||||||20060602083331||
OBX|0001|ST|||element1~element2~element3~element4|
My test variant (kind of based on your info given… according to your copy path, your OBX’s are in the zero level… no groups):
MSH
PID
ORC
{OBX}
Xlate:
ITERATE 0(0).OBX(0).00573 %f1
PATHCOPY 0(0).OBX(0) -> 0(0).OBX(%f1) (to copy all OBX fields per OBX_5)
PATHCOPY @null -> 0(0).OBX(%f1).00573 (so that element1~element2~element3~element4 do not appear in each OBX)
COPY 0(0).OBX(0).00573(%f1).[0] -> 0(0).OBX(%f1).00573(0).[0] (so the correct repeat of OBX_5 is in the respective OBX)
Output:
MESSAGE 1
0(0).MSH(0) : >|^~&|||||||ORU||P|2.3<
0(0).PID(0) : ><
0(0).ORC(0) : ><
0(0).OBX(0) : >|0001|ST|||element1<
0(0).OBX(1) : >|0001|ST|||element2<
0(0).OBX(2) : >|0001|ST|||element3<
0(0).OBX(3) : >|0001|ST|||element4<
Now, I’m using the same test variant on inbound and outbound, so it isn’t exactly what it looks like you have, as your in/out variants must not match. But this should get you started. Remember, with some quick test data, the Xlate Test tool is your friend!