The administrator or attending psychiatrist or facility director may petition the circuit court or the board of mental illness for the authority to administer psychotropic medication and such other medical treatment as may be necessary for the treatment of the person's mental illness, including electroconvulsive therapy, to an involuntarily committed patient if, after a personal examination, the person's treating physician and the medical director or attending psychiatrist believe psychotropic medication and such other medical treatment, including electroconvulsive therapy, will be medically beneficial to the person and is necessary because:
and the person's treating physician determines that the person is incapable of consenting to such treatment because the person's judgment is so affected by mental illness that the person lacks the capacity to make a competent, voluntary, and knowing decision concerning such treatment.
SDCL 27A-12-3.13