24. Procedure on production of mentally ill person.-
(1) If a person is produced before a Magistrate under sub-section (3) of section 23, and if, in his opinion, there are sufficient grounds for proceeding further, the Magistrate shall-
(a) examine the person to assess his capacity to understand,
(b) cause him to be examined by a medical officer, and
(c) make such inquiries in relation to such person as he may deem necessary.
(2) After the completion of the proceedings under sub-section (1), the Magistrate may pass a reception order authorising the detention of the said person as an inpatient in a psychiatric hospital or psychiatric nursing home,-
(a) if the medical officer certifies such person to be a mentally ill person, and
(b) if the Magistrate is satisfied that the said person is a mentally ill person and that in the interests of the health and personal safety of that person or for the protection of others, it is necessary to pass such order: Provided that if any relative or friend of the mentally ill person desires that the mentally ill person be sent to any particular licensed psychiatric hospital or licensed psychiatric nursing home for treatment therein and undertakes in writing to the satisfaction of the Magistrate to pay the cost of maintenance of the mentally ill person in such hospital or nursing home, the Magistrate shall, if the medical officer in charge of such hospital or nursing home consents, make a reception order for the admission of the mentally ill person into that hospital or nursing home and detention therein: Provided further that if any relative or friend of the mentally ill person enters into a bond, with or without sureties for such amount as the Magistrate may determine, undertaking that such mentally ill person will be properly taken care of and shall be prevented from doing any injury to himself or to others, the Magistrate may, instead of making a reception order, hand him over to the care of such relative or friend.