(a) If upon hearing of the petition the court finds that the circumstances are not suitable for proper isolation or contagious control of the case by any type of local quarantine and that the person will not voluntarily seek medical treatment and is a source of danger to others, the court shall order the commitment of the person to a hospital or sanatorium as petitioned for.
(b) The superintendent of the institution to which the person is committed shall direct that the person be placed apart from others and restrained from leaving the institution.