(a) At any time following the filing of a complaint, on motion of any party, or on its own motion, the court may order a child to be examined to aid in determining his physical or mental condition, including the emotional stability of the child.
(b) Whenever possible, examinations shall be conducted on an outpatient basis, or a voluntary inpatient basis. The court may, after a hearing where the child is determined to be delinquent, a person in need of supervision, abused or neglected, commit the child to a suitable facility or institution for the purpose of examination. The order for examination shall specify the nature and objectives of the proposed examination as well as the place where the examination shall take place. To commit a child for examination to determine the child's capacity to participate in the proceedings, the court shall commit the child as provided by law for adults.
(c) If, as a result of mental examination, the court determines that a child alleged to be delinquent or in need of supervision is incompetent to participate in proceedings under the complaint by reason of mental illness or substantial retardation, it shall suspend further proceedings. If proceedings are suspended, the Attorney General may initiate commitment proceedings pursuant to the law.
(d) The results of an examination under this section shall be admissible in a transfer hearing pursuant to section 2509 of this title, in a dispositional hearing, or in a commitment hearing.
(e) In all cases involving abuse the court shall order, and in all cases involving neglect the court may order an examination of the child by a physician appointed or designated for the purpose by the court. As part of such examination, if not already accomplished pursuant to section 2535 of this title, the physician shall arrange to have color photographs taken as soon as practical of any area of trauma visible on such child and may, if indicated, arrange to have a radiological examination performed on the child. The physician, on completion of such examination, shall forward the results thereof, together with the color photographs, to the court ordering such examination. The court may dispense with such examination in those cases which were commenced on the basis of a physical examination by a physician except that the court shall arrange to have color photographs taken even if the examination is dispensed with, unless color photographs have already been taken or unless there are no visible areas of trauma.
(f) Following a finding that a child is neglected or abused, the court may order the mental or physical examination of the respondent, if his consent is given. The results of the examination or the refusal of the respondent to consent to an examination are admissible at a dispositional hearing on the petition alleging neglect or abuse.