After conviction and prior to sentence and as part of the presentence investigation authorized by K.S.A. 2020 Supp. 21-6703, and amendments thereto or for crimes committed on or after July 1, 1993, a presentence investigation report as provided in K.S.A. 2020 Supp. 21-6813, and amendments thereto, the trial judge may order the defendant committed for mental examination, evaluation and report. If the defendant is convicted of a felony, the commitment shall be to the state security hospital or any suitable local mental health facility. If the defendant is convicted of a misdemeanor, the commitment shall be to a state hospital or any suitable local mental health facility. If adequate private facilities are available and if the defendant is willing to assume the expense thereof, commitment may be to a private hospital. A report of the examination and evaluation shall be furnished to the judge and shall be made available to the prosecuting attorney and counsel for the defendant. A defendant may not be detained for more than 120 days under a commitment made under this section.
K.S.A. 22-3429