The head of the facility shall discharge any person admitted pursuant to subsection (a) of K.S.A. 59-29b54 and amendments thereto when the ex parte emergency custody order expires, and shall discharge any person admitted pursuant to subsection (b) or (c) of K.S.A. 59-29b54 and amendments thereto not later than the close of business of the first day that the district court is open for the transaction of business after the admission date of the person, unless a district court orders that such person remain in custody under an ex parte emergency custody order issued pursuant to the provisions of K.S.A. 59-29b58 and amendments thereto, or a temporary custody order issued pursuant to the provisions of K.S.A. 59-29b59 and amendments thereto.
K.S.A. 59-29b56