After conviction and prior to sentence and as part of the presentence investigation authorized by K.S.A. 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. 21-6813, and amendments thereto, the trial judge may order the defendant committed to the state security hospital for mental examination, evaluation and report. A report of the examination and evaluation shall be furnished by the chief medical officer 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