Section 14-02.6-02 does not prohibit a physician from taking measures that in the physician’s medical judgment are necessary to save the life of a mother whose life is endangered by a physical disorder, illness, or injury, if:

1.    Every reasonable precaution is also taken, in this case, to save the child’s life; and

2.    The physician first certifies in writing, setting forth in detail the facts upon which the physician relies in making this judgment. This certification is not required in the case of an emergency and the procedure is necessary to preserve the life of the mother.