When an abortion of an unborn child capable of feeling pain is necessary due to a medical emergency, the physician shall deliver the child in the manner which, in reasonable medical judgment, provides the best opportunity for the unborn child to survive, but only if it is consistent with preserving the pregnant mother's life and preventing an irreversible impairment of a major bodily function of the pregnant woman.
SDCL 34-23A-72