Just. Wondering what type of tests does the doctor do if baby not gaining weight fast enough? Is it food allergy tests through blood test or thyroid or other?

Just. Wondering what type of tests does the doctor do if baby not gaining weight fast enough? Is it food allergy tests through blood test or thyroid or other?