Notwithstanding this title, a person with an intellectual or developmental disability, with respect to whom proceedings for admission under a court order have been commenced, must not be released or discharged during the pendency of the proceedings, unless ordered by the court upon application of the person with an intellectual 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 facility that the person with an intellectual or developmental disability may be discharged with safety.
T.C.A. § 52-3-401