A 6-year-old was held without parental consent under a law that allows for involuntary examination of minors