28. Detention of alleged mentally ill person pending report by medical officer.-
(1) When any person alleged to be a mentally ill person appears or is brought before a Magistrate under section 23 or section 25, the Magistrate may, by order in writing, authorise the detention of the alleged mentally ill person under proper medical custody in an observation ward of a general hospital or general nursing home or psychiatric hospital or psychiatric nursing home or in any other suitable place for such period not exceeding ten days as the Magistrate may consider necessary for enabling any medical officer to determine whether a medical certificate in respect of that alleged mentally ill person may properly be given under clause (a) of sub-section (2) of section 24.
(2) The Magistrate may, from time to time, for the purpose mentioned in sub-section (1), by order in writing, authorise such further detention of the alleged mentally ill person for periods not exceeding ten days at a time as he may deem necessary: Provided that no person shall be authorised to be detained under this sub-section for a continuous period exceeding thirty days in the aggregate.