In some cases, genetic testing during pregnancy can identify mutations associated with these conditions. However, a confirmed diagnosis may require further evaluation after birth.