New South Wales Consolidated Acts(cf 1990 Act, s 132)
(1) An authorised medical officer must discharge a patient or person who is detained in a mental health facility when a community treatment order is made about the patient or person and any order authorising the patient’s or person’s detention ceases to have effect.
(2) This section does not prevent an affected person subject to a community treatment order from being admitted to or detained in a mental health facility.