From the neonatal perspective, the earlier the delivery the higher the risk for the fetus. To that, there is evidence of further lung immaturity beyond that of shortened gestational age. However, if the levels of glycemia are so elevated that there is evidence of fetal cardiomyopathy, caudal regression, GI and renal anomalies, then delivery might be indicated. Is it possible to admit to the hospital for better glucemic control
I guess a lot would depend on the severity of both conditions and also the availability or otherwise of inpatient care facility. From personal experience in our centre we have found that, when patients develope severe PE at 28 weeks then the outcome for both fetus and mother are usually not too good as the fetuses are usually lost and the mother stands the risk of developing complications such as eclampsia. This is so because of the difficulty achieving very good feto maternal monitoring even with the patient on admission. Therefore where the resources (human, financial, and material) are available then one could try inpatient care with the aim of terminating the pregnancy once response is suboptimal or fetal status is in danger. You may find the attached document useful.
As for DM, the response given by Pablo may be something worth considering. Where the two conditions co-exist however, the management becomes even more challenging.
As with any other complication in the pregnancy both maternal and fetal sides should be considered. As a general rule you would aim to prolong the pregnancy for as long and SAFE as possible to avoid the risks of prematurity. Urgent delivery would be indicated with severe preeclampsia. From the maternal point of view the criteria would be how controlled the blood pressure is , PET blood results, symptoms of severe PET . In addition to how well the DM is controlled. Admission and care by Obstetricians and endocrinologist should be arranged for the control of blood sugar levels.
Normal fetal growth, movements, amniotic fluid and Doppler studies are reassuring. You should consider delivery with significant abnormality of any of the previous criteria. Overall, even if the condition is stable you should aim to deliver by 38 weeks of gestation as the risk of continuing the pregnancy would over shadow any benefit the baby might get afterwards.