A Temporary Treatment Order or Treatment Order to which a person is subject expires at the sooner of the following—
(a) in the case of a Temporary Treatment Order, 28 days after it is made;
(b) in the case of a Treatment Order, at the end of the period specified in the Order;
(c) the person—
(i) is made subject to a Secure Treatment Order or Court Secure Treatment Order; or
(ii) is detained in a designated mental health service under section 30(2) or 30A(3) of the Crimes (Mental Impairment and Unfitness to be Tried) Act 1997 .