A method of treating a medical condition in a patient using an implantable
medical device, comprising providing an electrical signal generator;
providing at least a first electrode operatively coupled to the
electrical signal generator and to a vagus nerve of the patient; sensing
cardiac data of the patient; determining at least a first cardiac
parameter based upon said cardiac data; setting at least a first value;
declaring an unstable brain state of a patient from said at least a first
cardiac parameter and said at least a first value; and adjusting the at
least a first value. Also, a computer readable program storage device
encoded with instructions that, when executed by a computer, performs the
method. In addition, the implantable medical device used in the method.