flat head

Sindhu
My baby is having flat head. Doctor suggested we take an X-ray first. Is it safe to take an X-ray for a 3 month old baby?