MHA 1983 s17
This is the section which allows the RMO to allow a detained patient out temporarily on leave of absence. He can attach conditions on the leave, e.g. that it must be escorted rather than unescorted. He can recall the patient to hospital under s18 if necessary. The leave can be short-term (e.g. 1 hour) or longer-term (e.g. 2 weeks).
The Home Secretary's consent is required for leave to be granted to restricted patients.