(1) After a detention petition or a petition for delinquency has been filed, the court may order the child named in the petition to be examined by a physician. The court may also order the child to be evaluated by a psychiatrist or a psychologist, by a district school board educational needs assessment team, or, if a developmental disability is suspected or alleged, by a developmental disabilities diagnostic and evaluation team with the Agency for Persons with Disabilities. If it is necessary to place a child in a residential facility for such evaluation, the criteria and procedures established in chapter 393, chapter 394, or chapter 397, whichever is applicable, shall be used.
(2) Whenever a child has been found to have committed a delinquent act, or before such finding with the consent of any parent or legal custodian of the child, the court may order the child to be treated by a physician. The court may also order the child to receive mental health, substance abuse, or retardation services from a psychiatrist, psychologist, or other appropriate service provider. If it is necessary to place the child in a residential facility for such services, the procedures and criteria established in chapter 393, chapter 394, or chapter 397, whichever is applicable, shall be used. After a child has been adjudicated delinquent, if an educational needs assessment by the district school board or the Department of Children and Family Services has been previously conducted, the court shall order the report of such needs assessment included in the child’s court record in lieu of a new assessment. For purposes of this section, an educational needs assessment includes, but is not limited to, reports of intelligence and achievement tests, screening for learning disabilities and other handicaps, and screening for the need for alternative education.
(3) When any child is detained pending a hearing, the person in charge of the detention center or facility or his or her designated representative may authorize a triage examination as a preliminary screening device to determine if the child is in need of medical care or isolation or provide or cause to be provided such medical or surgical services as may be deemed necessary by a physician.
(4) Whenever a child found to have committed a delinquent act is placed by order of the court within the care and custody or under the supervision of the Department of Juvenile Justice and it appears to the court that there is no parent, guardian, or person standing in loco parentis who is capable of authorizing or willing to authorize medical, surgical, dental, or other remedial care or treatment for the child, the court may, after due notice to the parent, guardian, or person standing in loco parentis, if any, order that a representative of the Department of Juvenile Justice may authorize such medical, surgical, dental, or other remedial care for the child by licensed practitioners as may from time to time appear necessary.
(5) Upon specific appropriation, the department may obtain comprehensive evaluations, including, but not limited to, medical, academic, psychological, behavioral, sociological, and vocational needs of a youth with multiple arrests for all level criminal acts or a youth committed to a minimum-risk or low-risk commitment program.
(6) A physician shall be immediately notified by the person taking the child into custody or the person having custody if there are indications of physical injury or illness, or the child shall be taken to the nearest available hospital for emergency care. A child may be provided mental health, substance abuse, or retardation services, in emergency situations, pursuant to chapter 393, chapter 394, or chapter 397, whichever is applicable. After a hearing, the court may order the custodial parent or parents, guardian, or other custodian, if found able to do so, to reimburse the county or state for the expense involved in such emergency treatment or care.
(7) Nothing in this section shall be deemed to eliminate the right of the parents or the child to consent to examination or treatment for the child, except that consent of a parent shall not be required if the physician determines there is an injury or illness requiring immediate treatment and the child consents to such treatment or an ex parte court order is obtained authorizing treatment.
(8) Nothing in this section shall be construed to authorize the permanent sterilization of any child unless such sterilization is the result of or incidental to medically necessary treatment to protect or preserve the life of the child.
(9) Except as provided in this section, nothing in this section shall be deemed to preclude a court from ordering services or treatment to be provided to a child by a duly accredited practitioner who relies solely on spiritual means for healing in accordance with the tenets and practices of a church or religious organization, when requested by the child.