That’s irrelevant to legality, which is what I was talking about.
Medical consent is more complicated than just this, and what you’re talking about crosses into doctor patient confidentiality as well.
Suffice it to say that testing patients without informed consent and sharing that data with law enforcement is not something that most ethical review boards would condone.
From a practical and moral point of view this kind of incident is what keeps people from telling their doctor all of the relevant information for best care. If you have a drug problem and think a medical provider will work to have your child taken away if you are honest about it, will you ever seek treatment or be honest?
If you don’t have a drug problem, but still think that what you say to your doctor or kids doctor will get used against you, will you hesitate to get care in the future?
Do you think these mothers will ever interact with another pediatrician with full trust again?