Before performing any abortion or inducing any miscarriage or terminating a pregnancy as provided in §§ 18.2-72, 18.2-73 or § 18.2-74, the physician shall obtain the informed written consent of the pregnant woman. However, if the woman has been adjudicated incapacitated by any court of competent jurisdiction or if the physician knows or has good reason to believe that such woman is incapacitated as adjudicated by a court of competent jurisdiction, then only after permission is given in writing by a parent, guardian, committee, or other person standing in loco parentis to the woman, may the physician perform the abortion or otherwise terminate the pregnancy.
B. Except in the case of a medical emergency, at least 48 hours before the performance of an abortion, a licensed physician or a qualified medical professional working under the direct supervision of a licensed physician shall perform a limited ultrasound examination on the patient undergoing the abortion to confirm the presence of a viable intrauterine pregnancy. Once the physician or medical professional determines whether such pregnancy exists, a print of the ultrasound image shall be made and a copy of the print, along with documentation of the physician or medical professional's determination as to the viability of the pregnancy, shall be maintained in the woman's medical record.