Russ,
You can do this within an Xlate. It really depneds on how your outbound variant looks.
Typically the ORM and ORU are structurally quite close. If you can, devise an outbound variant which can be used for either.
Then, at the start of your Xlate, build your ORM (change the MSH Message/Event Type filed to contain the value ‘ORM’). COPY, etc. all of the appropriate fields for the ORM. Then issue a CONTINUE Action. That will send along the ORM message.
Next (in the same Xlate), build your ORU (Make sure to put ‘ORU’ in the appropriate MSH field). COPY, etc. all of the appropriate fields for the ORU. No need for a CONTINUE here as the Xlate will send the last message you were building (the ORU) by default.
Or…
You can build two xlates. One which builds the ORU and one that builds the ORM. Stack the two in the Routing properties (ORM first I think).
I don’t think there is any need for Tcl.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.