Nothing in this act shall be construed to apply to any person alleged or thought to be a person with an alcohol or substance abuse problem subject to involuntary commitment for care and treatment under this act who is in custody on a criminal charge, except with the consent of either the prosecuting attorney or trial court.
K.S.A. 59-29b83