Sanity is a
legal term denoting that an individual is of sound mind and therefore can bear legal responsibility for his or her actions. It is generally defined in terms of the absence of insanity. It is not a medical term, although the opinions of
medical experts are often important in making a
legal decision as to whether someone is sane or insane.
It is also not the same concept as
mental illness. One can be acting under profound
mental illness and yet be sane, and one can also be ruled insane without an underlying mental illness.
http://www.economicexpert.com/a/Sanity.html
Insanity is no longer considered a medical diagnosis, nor term.