If a defendant serves notice pursuant to § 23A-27A-26.3, the state may make application, upon notice to the defendant, for an order directing that the defendant submit to an examination by a psychiatrist, licensed psychologist, or licensed psychiatric social worker designated by the state's attorney, for the purpose of rebutting evidence offered by the defendant. Counsel for the state and the defendant have the right to be present at the examination. A videotaped recording of the examination shall be made available to the defendant and the state's attorney promptly after its conclusion. The state's attorney shall promptly serve on the defendant a written copy of the findings and evaluation of the examiner. If a defendant is subjected to an examination pursuant to an order issued in accordance with this section, any statement made by the defendant for the purpose of the examination is inadmissible in evidence against the defendant in any criminal action or proceeding on every issue other than that of whether the defendant was intellectually disabled at the time of the commission of the offense, but such statement is admissible upon such an issue whether or not it would otherwise be deemed a privileged communication.
SDCL 23A-27A-26.5