When a petition is filed under the Developmental Disabilities Court-Ordered Custody Act, the court shall ensure that the subject is represented by legal counsel and shall set a time and date for a hearing on the petition. The clerk of the court shall provide notice of the date and time of such hearing to the subject, the subject's legal counsel, the subject's guardian, if any, the subject's closest relative, if known, any other person having custody and control of the subject, if known, the petitioner, and the department. The notice of hearing on the petition shall state the date, time, and location of the hearing and shall contain a list of the subject's rights under section 71-1118. The court may order an examination and evaluation of the subject to be completed by the department prior to the hearing, and the results shall be provided to all parties. The hearing on the petition shall be held within ninety days after the date of filing the petition or, if the subject is in emergency custody pursuant to section 71-1119, as soon as practicable but not later than forty-five days from the date when the subject was taken into emergency custody unless continuances are granted by the court upon the subject's motion.