Originally posted by David Harrison
I archive my smatfiles every week. On numerous occasions I get queries from users of interfaced systems complaining about missing patients. It is rarely down to Cloverleaf but, as the man in the middle, I have to prove that we sent a message and received an acknowledgement from the receiving system.
I have written a tcl proc to trawl through smatfiles for HL7 messages for particular patients and write them to a separate file. I can extract the messages ok but I also want to extract the corresponding HL7 ACK message from the ack smatfile so I have a complete audit trail in a single file.
What I need to know is how to extract the complete ack message using the message Id. I could do it by reading the file line by line but I