Section 5(2) applies to you if you are a voluntary patient or inpatient (including inpatients being treated for a physical problem). A doctor or other approved clinician in charge of your treatment needs to report to the hospital manager that an application to keep ypi in hospital (a detention section) 'ought to be made'.
You can be kept under this section for up to 72 hours.