A good source is Brent Welch’s latest Tcl book.
When you say *ALL* HL7 message do you really mean all?
You could use a regexp like:
ADT_A(0[1-9)|(1[0-689])|(2[0-35-9])|(3[0-9])
Would send ADT_A01 – ADT_A39 and exclude A17 and A24
If I really wanted all and I was just getting ADTs, I would filter the A17 and A24 types in the input and simply raw route the rest.
Charlie