I have inherited a huge poorly commented and documented TCL proc in the order of about 2,000 lines with hundreds of variables and a large number of nested IF statement. What is the best way to go through a proc and determine how it works? Asking the developer who wrote it is not an option.
The same proc is used in multiple laboratory interfaces and sends a vague e-mail telling our lab systems team to check the lab system when a scanned report (MDM message) doesn’t match to a resulted order. The problem is, our lab team doesn’t know what to look for to determine why a scanned report failed to match a resulted order. I too am unable to determine what happened due to the convoluted code.
As far as I know, a tool doesn’t exist to step through TCL TPS procs to check the value of each variable as an HL7 message passes through it.
What have others done to essentially reverse engineer a monster TCL proc with no documentation or well commented code?