Where a person detained by authority of an order under subsection 20BC(2) or a warrant under subsection 20BF(5) for a specified period in a State or Territory is due to be released because the period of that person's detention has ended, the Attorney - General must notify the mental health authorities of the State or Territory of the proposed release of the person.