The commissioner of corrections shall, in accordance with applicable rules and standards prescribed by the Department of Human Services, establish, staff, equip, maintain, and operate at one of the adult correctional institutions under the commissioner's control a mental health unit for the care and treatment of those inmates of state correctional institutions who become mentally ill.
When any person confined in an adult correctional institution under the control of the commissioner of corrections is alleged to be a person who is mentally ill, the director of psychological services, or warden or other person in charge of the institution shall cause the person to be examined by a licensed physician especially qualified in the diagnosis of mental illness, or, if none is available, by any licensed physician or licensed mental health professional available to the institution.
If the licensed mental health professional finds the person to be a person who is mentally ill and in need of short-term care, the licensed mental health professional may recommend transfer by the commissioner of corrections to the mental health unit established pursuant to subdivision 1.
If the licensed mental health professional finds the person to be a person who is mentally ill and in need of long-term care in a hospital, or if an inmate transferred pursuant to subdivision 3 refuses to voluntarily participate in the treatment program at the mental health unit, the director of psychological services of the institution or the mental health professional shall initiate proceedings for judicial commitment as provided in section 253B.07. Upon the recommendation of the licensed mental health professional and upon completion of the hearing and consideration of the record, the court may commit the person to the mental health unit established in subdivision 1 or to another hospital. A person confined in a state correctional institution for adults who has been adjudicated to be a person who is mentally ill and in need of treatment may be committed to the commissioner of corrections and placed in the mental health unit established in subdivision 1.
The director of psychological services of the mental health unit established under this section may, subject to the provisions of chapter 253B, provisionally discharge any inmate patient admitted as a person who is mentally ill without discharging the commitment and order the inmate patient's release into the general population of the institution from which admitted, subject to return to the facility for further treatment.
When the director of psychological services of the facility certifies that a patient is no longer in need of institutional care for mental illness the director of psychological services shall discharge the patient to the institution from which committed, and the discharge shall also discharge the mental illness commitment.
A copy of the certification that the inmate is no longer in need of care for mental illness shall be transmitted to the commissioner of corrections. The commissioner of corrections shall give serious consideration to the aforementioned certification for purposes of their supervision over the inmate upon the inmate's release.
If the sentence of a person who has been adjudicated to be mentally ill and committed to the mental health unit established under this section should expire before the person recovers and is discharged therefrom, and, in the judgment of the director of psychological services of the unit, the person requires further hospitalization for mental illness, the person shall be transferred by the commissioner of corrections to a state hospital designated by the commissioner of human services, there to be detained as in the case of other mentally ill persons under judicial commitment.
The costs of the commitment proceedings under this section shall be borne by the state.