She did everything right, but her pregnancy still almost ended tragically