Kan. Stat. Ann. § 22-3416
No prisoner in the custody of the secretary of corrections shall be required to attend as a witness in any criminal action or proceeding except on order of the court before whom the prosecution is pending and under such terms as the court may prescribe.
L. 1970, ch. 129, § 22-3416; L. 2012, ch. 51, § 1; July 1.