The treatment required by § 23A-27-40 shall be provided by local mental health agencies, if available, or by a facility under the jurisdiction of the Department of Social Services. The defendant is responsible for payment for his treatment unless he is indigent. If the defendant is indigent and no other source of payment is available, payment for his treatment shall be paid by the county of his residence. With the court's approval, treatment at the defendant's expense may be provided by private agencies, private physicians, or other mental health personnel.
SDCL 23A-27-41