(a) If a report submitted under Section 55.54(b) states that a child does not have a mental illness or an intellectual disability, the juvenile court shall discharge the child unless:
(1) an adjudication hearing was conducted concerning conduct that included a violation of a penal law listed in Section 53.045(a) and a petition was approved by a grand jury under Section 53.045; and
(2) the prosecuting attorney objects in writing not later than the second day after the date the attorney receives a copy of the report under Section 55.54(c).
(b) On objection by the prosecuting attorney under Subsection (a), the juvenile court shall hold a hearing without a jury to determine whether the child is a child with mental illness or an intellectual disability and whether the child meets the criteria for court-ordered mental health services or court-ordered intellectual disability services under Section 55.05 or 55.06.
(c) At the hearing, the burden is on the state to prove by clear and convincing evidence that the child is a child with mental illness or an intellectual disability and that the child meets the criteria for court-ordered mental health services or court-ordered intellectual disability services under Section 55.05 or 55.06.
(d) If, after a hearing, the court finds that the child does not have a mental illness or an intellectual disability and that the child does not meet the criteria for court-ordered treatment services under Section 55.05 or 55.06, the court shall discharge the child.
(e) If, after a hearing, the court finds that the child has a mental illness or an intellectual disability and that the child meets the criteria for court-ordered treatment services under Section 55.05 or 55.06, the court shall issue an appropriate order for court-ordered mental health services or court-ordered intellectual disability services.