we have a standard group iteration for OBX in an ORU message. We are looking to add and additional OBX result segment if conditions are met for one of the OBX segments.
In testing, we can accomplish this by setting variables during the iteration loop.
We populate the segment with the custom values (variables defined if the conditions are met). Where we run into issues is condition is met on Loop#5, we populate the custom segment on Loop #6, but end up skipping the respective segment on Loop #7. We’re just writing over that segment Loop instead of actually INSERTING an additional segment to the output.
The placement of the inserted custom segment doesn’t matter, but the OBX count varies on the message.
Attached images for reference