(a) In every civil or criminal proceeding or action brought under this subchapter, the court shall rule whether the anonymity of a woman upon whom an abortion has been performed or induced or attempted to be performed or induced shall be preserved from public disclosure if she does not give her consent to the disclosure.
(b) The court, upon motion or sua sponte, shall make a ruling under subsection (a) of this section and, upon determining that the woman's anonymity should be preserved, shall issue orders to the parties, witnesses, and counsel and shall direct the sealing of the record and exclusion of individuals from courtrooms or hearing rooms to the extent necessary to safeguard the woman's identity from public disclosure.
(c) Each order under subsection (b) of this section shall be accompanied by specific written findings explaining:
(1) Why the anonymity of the woman should be preserved from public disclosure;
(2) Why the order is essential to that end;
(3) How the order is narrowly tailored to serve that interest; and
(4) Why no reasonable less restrictive alternative could be fashioned.
(d) In the absence of written consent of the woman upon whom an abortion has been performed or induced or attempted to be performed or induced, anyone other than a public official who brings an action under § 20-16-1408 shall do so under a pseudonym.
(e) This section is not intended to conceal the identity of the plaintiff or of witnesses from the defendant or from attorneys for the defendant.