The risk of stillbirth in pregnancies before and after the onset of diabetes