A voluntary recipient shall be allowed to be discharged from the facility at the earliest appropriate time, not to exceed 5 days, excluding Saturdays, Sundays and holidays, after the recipient gives any treatment staff person written notice of the recipient's desire to be discharged unless the recipient either withdraws the notice in writing or unless within the 5 day period a copy of the written notice and a petition and 2 certificates conforming to the requirements of paragraph (b) of Section 3-601 and Section 3-602 are filed with the court. Upon receipt of the petition, the court shall order a hearing to be held within 5 days, excluding Saturdays, Sundays and holidays, and to be conducted pursuant to Article IX of this Chapter. Hospitalization of the recipient may continue pending further order of the court.
405 ILCS 5/3-403