Gastroschisis is often diagnosed during a routine prenatal ultrasound, usually around 18-20 weeks of gestation. The ultrasound will show the intestines floating freely in the amniotic fluid outside the fetal abdomen. In some cases, additional imaging tests like fetal MRI might be conducted for a more detailed assessment.