If the baby is not viable when the mother dies, the baby will die, too. There are, therefore, cases where insuring the baby's survival means treating the mother.
But in this case, it sounds as if the growing fetus was the direct cause of the woman's heart problems.
Of course, in ectopic pregnancies, the growing embryo, who has absolutely no chance of survival using current technologies (I suppose in the future it might be possible to move and reimplant the embryo in the uterus, but that isn't possible yet) is removed from the ovary (or with the ovary) so that the mother doesn't die, too.
I guess the question in this situation is whether, like in an ectopic pregnancy, the fetus would have absolutely no chance of survival no matter what was done.
And the hospital and its director might have made one medical judgment and the bishop's advisors might have made another judgment.
I don't know, but I really don't believe the Sister of Mercy would have made the decision unless she honestly believed the fetus had no chance of surviving no matter what.