(a) As used in this section and in § 39-15-212:
(1) “Abortion” means the use of any instrument, medicine, drug, or any other substance or device with intent to terminate the pregnancy of a woman known to be pregnant with intent other than to increase the probability of a live birth, to preserve the life or health of the child after live birth, or to remove a dead fetus;
(2) “Gestational age” or “gestation” means the age of an unborn child as calculated from the first day of the last menstrual period of a pregnant woman;
(3) “Medical emergency” means a condition that, in the physician's good faith medical judgment, based upon the facts known to the physician at the time, so complicates the woman's pregnancy as to necessitate the immediate performance or inducement of an abortion in order to prevent the death of the pregnant woman or to avoid a serious risk of the substantial and irreversible impairment of a major bodily function of the pregnant woman that delay in the performance or inducement of the abortion would create;
(4) “Pregnant” means the human female reproductive condition, of having a living unborn child within her body throughout the entire embryonic and fetal stages of the unborn child from fertilization to full gestation and childbirth;
(5) “Serious risk of the substantial and irreversible impairment of a major bodily function” means any medically diagnosed condition that so complicates the pregnancy of the woman as to directly or indirectly cause the substantial and irreversible impairment of a major bodily function. Such conditions include preeclampsia, inevitable abortion, and premature rupture of the membranes and, depending upon the circumstances, may also include, but are not limited to, diabetes and multiple sclerosis, but does not include any condition relating to the woman's mental health;
(6) “Unborn child” means an individual living member of the species, homo sapiens, throughout the entire embryonic and fetal stages of the unborn child from fertilization to full gestation and childbirth; and
(7) “Viable” and “viability” mean that stage of fetal development when the unborn child is capable of sustained survival outside of the womb, with or without medical assistance.
(b)
(1) No person shall purposely perform or induce, or attempt to perform or induce, an abortion upon a pregnant woman when the unborn child is viable.
(2) It shall be an affirmative defense to any criminal prosecution brought under subdivision (b)(1) that the abortion was performed or induced, or attempted to be performed or induced, by a licensed physician and that the physician determined, in the physician's good faith medical judgment, based upon the facts known to the physician at the time, that either:
(A) The unborn child was not viable; or
(B) The abortion was necessary to prevent the death of the pregnant woman or to prevent serious risk of substantial and irreversible impairment of a major bodily function of the pregnant woman. No abortion shall be deemed authorized under this subdivision (b)(2)(B) if performed on the basis of a claim or a diagnosis that the woman will engage in conduct which would result in her death or substantial and irreversible impairment of a major bodily function or for any reason relating to her mental health.
(3) Except in a medical emergency that prevents compliance with the viability determination required by § 39-15-212, the affirmative defense set forth in subdivision (b)(2)(A) does not apply unless the physician who performs or induces, or attempts to perform or induce, the abortion makes the viability determination required by § 39-15-212 and, based upon that determination, certifies in writing that, in such physician's good faith medical judgment, the unborn child is not viable.
(4) Except in a medical emergency that prevents compliance with one (1) or more of the following conditions, the affirmative defense set forth in subdivision (b)(2)(B) does not apply unless the physician who performs or induces, or attempts to perform or induce, the abortion complies with each of the following conditions:
(A) The physician who performs or induces, or attempts to perform or induce, the abortion certifies in writing that, in such physician's good faith medical judgment, based upon the facts known to the physician at the time, the abortion is necessary to prevent the death of the pregnant woman or to prevent a serious risk of the substantial and irreversible impairment of a major bodily function of the pregnant woman;
(B) Another physician who is not associated in a practice with the physician who intends to perform or induce the abortion certifies in writing that, in such physician's good faith medical judgment, based upon the facts known to the physician at the time, the abortion is necessary to prevent the death of the pregnant woman or to prevent a serious risk of the substantial and irreversible impairment of a major bodily function of the pregnant woman;
(C) The physician performs or induces, or attempts to perform or induce, the abortion in a hospital that has appropriate neonatal services for premature infants. This requirement does not apply if there is no hospital within thirty (30) miles with neonatal services and the physician who intends to perform or induce the abortion has admitting privileges at the hospital where the abortion is to be performed or induced;
(D) The physician who performs or induces, or attempts to perform or induce, the abortion terminates or attempts to terminate the pregnancy in the manner that provides the best opportunity for the unborn child to survive, unless that physician determines, in such physician's good faith medical judgment, based upon the facts known to the physician at the time, that the termination of the pregnancy in that manner poses a significantly greater risk of the death of the pregnant woman or a significantly greater risk of the substantial and irreversible impairment of a major bodily function of the pregnant woman than would other available methods of abortion;
(E) The physician certifies in writing the available methods or techniques considered and the reasons for choosing the method or technique employed; and
(F) The physician who performs or induces, or attempts to perform or induce, the abortion has arranged for the attendance in the same room in which the abortion is to be performed or induced, or attempted to be performed or induced, at least one (1) other physician who is to take control of, provide immediate medical care for, and take all reasonable steps necessary to preserve the life and health of the unborn child immediately upon the child's complete expulsion or extraction from the pregnant woman.
(5) For purposes of this section, there shall be a rebuttable presumption that an unborn child of at least twenty-four (24) weeks gestational age is viable.
(6) A violation of subdivision (b)(1) is a Class C felony.
(7) The applicable licensing board shall revoke the license of any person licensed to practice a healthcare profession in this state who violates subdivision (b)(1), in accordance with the Uniform Administrative Procedures Act, compiled in title 4, chapter 5, without regard to whether the person has been charged with or has been convicted of having violated subdivision (b)(1) in a criminal prosecution. In any proceeding brought by the board of medical examiners or the board of osteopathic examination to revoke the license of a physician for violating subdivision (b)(1), a physician who has not been convicted in a criminal prosecution of having violated subdivision (b)(1) may raise the affirmative defense set forth in subdivision (b)(2).
(8) A pregnant woman upon whom an abortion is performed or induced, or attempted to be performed or induced, in violation of subdivision (b)(1) is not guilty of violating subdivision (b)(1), or of attempting to commit or conspiring to commit a violation of subdivision (b)(1).
(c) Neither this section nor § 39-15-212 repeals or limits § 39-15-202, § 39-15-209, or any other law that restricts or regulates the performance of an abortion or attempt to procure a miscarriage.