Early delivery date?

I have gestational diabetes and was put on insulin and my levels are still not controlled. We're working on it but my Endo doctor told me he sent a recommendation to my OB to deliver no later than 38 weeks due to this. He seems very concerned and it's making me anxious. Has anyone been through this situation or known someone that has???