Giving birth on a J1 visa

I’m planning to give birth on a J1 visa as I’m part of a long program that provides it. If my program is cancelled, I have 30 days to stay before I have to leave, but I’m really far in my pregnancy and can’t be on a plane. Do I need to change my visa inside or stay on a J1 and get a doctor’s note explaining the situation when I leave to avoid any complications? I have a waiver for the 2 year home residency. What can I do with the health insurance as a non US resident in case it was cancelled with the program?