David,
If I am understanding correctly, the message is not HL7, but has some common characteristcs such as segment headers and field delimeters. Optional segments and groups.
I did something similar for ASTM.
Basically I created an inbound proc that preceeded the segment id’s with a Z…
So your segments would be Z02 Z23, etc.
In addition you will need to “create” the MSH as the engine requires this to process the message as an HL7.
You may also want to create a new event or just hardcode the OUL^R21 in you message type of the MSH segment (Make it an argument, and pass it in if you may have other message types that need similar conversions in the future)
So after your message has been “pre-converted” to an “HL7-like” message, you could create a variant that matches the specs of the messages you are dealing with. Your variant would look like one MSH with all your Z## segments to follow. You can make them optional repeating grouped… etc. just like your true HL7 variants. Then you could use the Xlate to map to whatever the receiving systems need.
P.S. I have tried the HRL tool for ASTM and found that the repeating and optional segs and groups was much to cumbersome and I never really got it working with the HRL, quite possibly this was just my inexperience with using HRL’s.
Hope this points you in the right direction.
Thanks,
Ryan