If it appear that any person brought before a court under this chapter is entitled to be discharged, the court shall make an order, in writing, commanding those who have such person in custody to discharge him forthwith, and shall also deliver to the person discharged a certificate of such discharge.
§ 532.470, RSMo
Effective 1/2/1979