A person detained under this part must be released before the detention order ends if—
(a) an emergency officer (medical) is satisfied the person is no longer an immediate risk to public health; or
(b) if the person has been examined by a doctor chosen by the person—both the doctor and the emergency officer (medical) are satisfied the person is no longer an immediate risk to public health.