I’m working on a xlate (attached) that will handle both of these examples:
Example 1
MSH
PID
ORC
OBR
OBX-1
NTE-2
NTE-2
OBX-2
NTE-1
NTE-2
Example 2
MSH
PID
ORC
OBR
OBX-1
OBX-2
OBX-3
NTE-1
NTE-2
NTE-3
*Where the NTE segments “belong” to the last OBX segment – in this case OBX-3.
The xlate I have will handle Example 1 just fine, but will give me the following results for Example 2.
MSH
PID
ORC
OBR
OBX-1
NTE-1
NTE-2
NTE-3
My desired result is:
MSH
PID
ORC
OBR
OBX-1
OBX-2
OBX-3
NTE-1
NTE-2
NTE-3
I have messed with this xlate for a couple of days, and I have read all of the iterate posts on here that could be related, and I’m not any closer.
Any help would be very much appreciated.
Thanks,
Courtney