This section applies to persons who are detained under section 3 above, or admitted to a hospital in pursuance of a hospital order made under section 37 above, or transferred to a hospital in pursuance of a hospital direction made under section 45A above or a transfer direction made under section 47 or 48 above, and then cease to be detained and (whether or not immediately after so ceasing) leave hospital.
It shall be the duty of the integrated care board or ... Local Health Board and of the local social services authority to provide or arrange for the provision of, in co-operation with relevant voluntary agencies, after-care services for any person to whom this section applies until such time as the integrated care board or ... Local Health Board and the local social services authority are satisfied that the person concerned is no longer in need of such services ; but they shall not be so satisfied in the case of a community patient while he remains such a patient..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 32 above shall apply for the purposes of this section as it applies for the purposes of Part II of this Act.
References in this Act to after-care services provided for a patient under this section include references to services provided for the patient—
Subsection (2), in its application to the integrated care board, has effect as if the words "provide or" were omitted.
The Secretary of State may by regulations provide that the duty imposed on the integrated care board by subsection (2) is, in the circumstances or to the extent prescribed by the regulations, to be imposed instead on another integrated care board or NHS England.
Where regulations under subsection (2E) provide that the duty imposed by subsection (2) is to be imposed on NHS England, subsection (2D) has effect as if the reference to the integrated care board were a reference to NHS England.
Section 272(7) and (8) of the National Health Service Act 2006 applies to the power to make regulations under subsection (2E) as it applies to a power to make regulations under that Act.
In this section "the integrated care board or ... Local Health Board" means the integrated care board or ...Local Health Board, and "the local social services authority" means the local social services authority —
Where there is a dispute about where a person was ordinarily resident for the purposes of subsection (3) above—
The Secretary of State and the Welsh Ministers shall make and publish arrangements for determining which of them is to determine a dispute under subsection (4)(c); and the arrangements may, in particular, provide for the dispute to be determined by whichever of them they agree is to do so.
In this section, "after-care services", in relation to a person, means services which have both of the following purposes—