Generate an ACKnowledgement message in an optimized manner.
Acknowledgement Message
This function strips off just the MSH segment of an HL7 message. It parses this segment, stores parameters in Python variables, then generates an ACK message. The technique used is described as Auto Acknowledgment in the manual: http://www.interfaceware.com/manual/autoack.html. You should study the chapter on Auto Acknowledgment carefully. The function will have unpredictable effects if the message definition file is not set up correctly for auto acknowledgement.