(b) When the administrator of the facility or secretary of the department deems release to a qualified researcher as defined in administrative rule, an aftercare treatment provider, or an employee or agent of the department is necessary for treatment of the patient, maintenance of adequate records, compilation of treatment data, aftercare planning, or evaluation of programs.
For the purpose of determining whether a person meets the criteria for involuntary outpatient placement or for preparing the proposed treatment plan pursuant to s. 394.4655, the clinical record may be released to the state attorney, the public defender or the patient's private legal counsel, the court, and to the appropriate mental health professionals, including the service provider identified in s. 394.4655(7)(b)2., in accordance with state and federal law.