The TORCH panel test is used to help diagnose infections that could harm the unborn baby during pregnancy.