(a) Notwithstanding any other provisions of this title, no person with mental illness, serious emotional disturbance, or developmental disability with respect to whom proceedings for hospitalization or admission under a court order have been commenced, shall be released or discharged during the pendency of the proceedings, unless ordered by the court upon application of the person with mental illness, serious emotional disturbance, or developmental disability or of the parent, legal guardian, legal custodian, conservator, spouse or adult next of kin of the person, or upon the report of the chief officer that the person with mental illness, serious emotional disturbance, or developmental disability may be discharged with safety.
(b) This provision does not limit the duties to release persons with mental illness, serious emotional disturbance, or developmental disability imposed by §§ 33-5-302, 33-5-303, and 33-6-207, and chapter 6, parts 3, 4, and 8 of this title.