I have a friend who is experiencing a high risk pregnancy, and the doctor told her that at any time her life is in immediate danger, he will take the baby out with her uterus. If it is at a time when the baby clearly is too young to survive outside the womb, and other doctors agree with this decision, is this the right thing to do, no matter how painful?
The supreme and overriding halachic concern in a case like this is to prevent real danger to the life of the mother- even at the expense of aborting the unborn fetus (Rambam Hilchot Rotzeach 1,9). Therefore if the mother's life is in serious danger there is no question that the fetus should be aborted. How to act in a specific case cannot be decided from afar. It may be, for example, that even if the mother is at present in no IMMEDIATE danger, the likelihood that a life-threatening situation will develop forbids her from continuing the pregnancy even now. Moreover you write that if an immediate danger develops, it will necessitate removing her uterus- an operation which is in itself serious. Please do not wait. Urge your friend to consult immediately with a halachic expert- before an immediate danger, G-d forbid, develops. He probably will ask to speak directly with the doctors or to see the medical file to give your friend the halachic ruling on her specific case. The matter is urgent; it allows for no delay and it is too serious to be decided without speaking directly to a halachic authority who will be appraised of the exact medical situation.