(1) If, on the trial of a person for an offence (a) the person is found guilty; and(b) the court is satisfied, by the production of the report of a psychiatrist and any other evidence that it may require, that (i) the person appears to be suffering from a mental disorder that requires treatment; and(ii) the treatment can be obtained by admission to and detention in an institution; and(iii) the person should be admitted as a patient for the person's own health or safety or for the protection of members of the public; and(c) the court has received a report in writing from an approved medical practitioner of the institution to which it is proposed to admit the person recommending the proposed admission the court may (d) instead of, or in addition to, any sentence it may impose, make a hospital order in respect of the person; and(e) if the court is the Supreme Court and a hospital order has been made, make a restriction order in respect of the offender.(2) The Supreme Court must not make a restriction order in respect of a person who, had he or she not been found to be suffering from a mental disorder, would not have been sentenced to a term of imprisonment.(3) If a magistrate is of the opinion, after taking into account the matters required to be considered in determining the order to be made, that a restriction order should be made in respect of an offender, the magistrate may refer the matter to the Supreme Court for determination.(4) On a referral of a matter to the Supreme Court under subsection (3) , the court must enquire into the circumstances of the case and it has the same powers to deal with the offender as if the offender had been dealt with in that court.