I have an ORU message that has multiple OBR segments with only 1 set of OBX/NTE segments. I need to separate this into multiple ORU messages for every OBR and copy the OBX/NTE segment to the new messages.
Hi Jim, I am using an Xlate with Pathcopy. I have never used a counter in Xlates or had to use the suppress/continue. I will need more detail. I have also learned that they can accept the one message with multiple OBR but copy the OBX for each of the OBRs. I have been playing with moving the supress/continue around in the Xlate but have not succeeded in getting the 2 separate messages yet. Thanks for any help, Donna
Add the suppress at the beginning of your xlate. Copy the MSH, PID etc segments. Create your own group counter like %g99 and use this in the iteration for your OBR group. Use MATH function to add one to each iteration of %g99 OBR grouping. Outside of iteration use CONTINUE. If you have a test message, run this through the hl7tester with level 2 or more to see where the iterations are occurring if need be.
OK I must be a DUH!!!! First off I don’t get what the %g99 math function is doing. Is the %g99 supposed to be a variable that I’m using as a counter? If so what am I suppose to do with the variable in the xlate.
I’ve added the SUPPRESS to the beginning of the xlate and I have tried moving the CONTINUE in the interate and outside the iterate and just about everywhere in the message, but I do not get 2 clean messages. I can get to the point of 2 messages, but the first one does not have the OBX/NTE group.
This is how the message is sent to the Xlate
MSH
PID
PV1
ORC
OBR
ORC
OBR
OBX
NTE
What I need to get to is either 2 separate messages with the OBR, OBX, NTE in each or
So if I understand correctly, you already get 2 messages: one with ORC/OBR and one with ORC/OBR/OBX/NTE. But you need to have a OBX/NTE with the first message as well?
Is there only one group with the OBX/NTE segment and you need to copy these to the other ORC/OBR groups as well? Then you will first need to go through all the groups and check what group has the OBX/NTE segment. Put this group nuber into a variable (like %g9). Then iterate through all the groups again and if the current group is unlike %g9, then copy the OBX/NTE from the %g9 group.
Weird though, to copy these OBX/NTE from other segments. Maybe you can remove/not send the ORC/OBR segments that have no OBX/NTE?
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
%g99 is the counter (you can call it whatever you want) you use for the ORC/OBR grouping (however you have your variant set-up). You need to control your own counter in order to split the messages. Inside your iteration use MATH function add 1 to your counter. So, for every grouping iteration the xlate will create another message. If you have 4 OBR groupings then you should end up with 4 messages.
Here’s what I ended up doing with a lot of help from Clovertecher Jim K. The vendor would take one oru message with multiple OBR/OBXs but the OBX had to follow each of the OBRs. Therefore I did not need to use the suppress, continue to create multiple messages. See attached document for the xlate….