Except as provided by § 19-5-5, the examination of a person confined in any prison, facility, or program under the control of the Department of Corrections pursuant to § 1-15-1.4, shall be by deposition.
While an inmate's deposition is being taken, the inmate shall remain in the custody of the officer in charge of the inmate, and the officer in charge shall afford reasonable facilities for the taking of the deposition. If the court orders that an inmate be present for oral examination in a county other than where the inmate is housed, the county where the action is venued is responsible for the transport of the inmate.
SDCL 19-5-6