If this data is being routed through the engine, why not use an Xlate to create two A02’s based on the A17. You can map all of the data for the first patient, perform a CONTINUE, then map the data for the second patient. This would create two outbound messages; the first with all of patient 1 info, and the second with patient 2’s info.
Thanks for the response. Yes, I know I can do this thru the xlate and I have done this but I have a situation where I am not using xlates and looking for a tclproc to be able to do this in a hurry.