Section 46 of the Act amends section 117 of the 1983 Act. Section 117 places a duty on the NHS and local social services authorities to provide or arrange after-care to patients who have been detained in hospital for treatment under sections 3, 37, 45A, 47 or 48 of the 1983 Act, who then cease to be detained and leave hospital.
	Subsection (2) applies to decisions to end section 117 after-care taken by the ICBs, or local health boards and local social services authorities. It provides that the provision or arrangement of section 117 aftercare lasts until the ICB or local health board and local social services authority jointly give notice to the person in writing that they are satisfied that the person is no longer in need of such services.
	Subsection (3) applies the following ‘deeming rules’ under social care legislation to the determination of ordinary residence to identify which local authority is responsible for providing or arranging section 117 aftercare to an individual patient:
In relation to those aged under 18 in England and in Wales, section 105(6) of the Children Act 1989 (as modified) applies for the purposes of determining the ordinary residence. This means that, broadly, any periods should be disregarded when the child was living in certain forms of accommodation, including hospitals, residential schools, accommodation provided by a local authority and section 117 accommodation. The express inclusion of hospitals is intended for the purposes only of the determination of ordinary residence for the purposes of section 117 of the Mental Health Act 1983, and not for determination of ordinary residence for wider purposes under the Children Act 1989.
In respect of adults in England, the deeming rules under section 29(1)-(3) of the Care Act 2014 apply. This provides that where a person has needs that can only be met through care home, supported living or shared lives accommodation, and are living in that accommodation, they are treated as ordinarily resident in the area they lived immediately before they moved into this accommodation.
In respect of adults in Wales, the deeming rule under section 194(1)-(3) of the Social Services and Well-being (Wales) Act 2014 apply. This provides that where a person has needs that can only be met through care home accommodation, and are living in that accommodation, they are treated as ordinarily resident in the area they lived immediately before they moved in.
In respect of adults in England and Wales, the deeming rule in section 39(5) of the Care Act 2014 applies. This provides that a person being provided with accommodation under section 117 of the Mental Health Act 1983 is treated as ordinarily resident in the area of the local authority on which the duty under section 117 is imposed.
In respect of adults in England and Wales, the cross-border provisions of the Care Act 2014 apply. This provides that where a person in England, who has care and support needs and requires residential accommodation to meet those needs, is provided with that accommodation in Wales by a local authority, generally this does not result in a transfer of that authority’s responsibility for that person and they are treated as ordinarily resident of the local authority in England. There is similar provision in respect of a person in Wales being provided with accommodation in England.
	The broad effect of the reforms to subsection (3) are:
Where local authority A arranges for, or provides a child or adult with accommodation in another local authority area (local authority B) as part of their s117 responsibilities, the person will remain ordinarily resident in the area of local authority A. This means that if the person is re-detained under section 3 (or another qualifying section), when they cease to be detained and leave hospital, they will be ordinarily resident in the area of local authority A for the purposes of s117 responsibility. (which was the local authority area in which they were ordinarily resident immediately before being detained).
Where an adult has been detained under section 3 (or another qualifying section) and, immediately before their detention, they were living in specified accommodation under the Care Act 2014, or Social Services and Well-being (Wales) Act 2014, then the respective deeming provisions should be used to determine the persons ordinary residence for s117 purposes. This will mean that, when they cease to be detained and leave hospital, they will be ordinarily resident in the area they were living immediately before moving into the specified accommodation.
	The following sets out a practice example of how the reforms to subsection (3) work for adults in England:
Local authority A places an adult into a care home, a supported living, or shared lives accommodation under the Care Act 2014 in local authority B.
This adult is then detained under section 3 of the Mental Health Act. Local authority A is responsible for the adult’s section 117 after-care.
The same adult is placed, by local authority A, upon discharge, into accommodation in local authority C under section 117 of the Mental Health Act. Local authority A is responsible for the adult’s section 117 after-care.
The patient is then re-detained under section 3 of the Mental Health Act. Local authority A retains ordinary residence by virtue of section 39(4) of the Care Act 2014.
	The following sets out a practice example of how the reforms to subsection (3) work for adults in Wales:
Local authority A places an adult into a care home under the Social Services and Well-being (Wales) Act 2014 in local authority B.
This adult is then detained under section 3 of the Mental Health Act 1983. Local authority. A is responsible for the adult’s section 117 after-care.
The same adult is placed, by local authority A, upon discharge, into accommodation in local authority C under section 117 of the Mental Health Act 1983. Local authority A is responsible for the adult’s section 117 after-care.
The patient is then re-detained under section 3 of the Mental Health Act 1983. Local authority A retains ordinary residence by virtue of section 39(4) of the Care Act 2014.
	The following sets out a practice example of how the reforms to subsection (3) work for children:
A child, living with their parents or carers in privately rented accommodation in local authority area A, is detained under section 3 of the Mental Health Act. The Children Act 1989 deeming provisions are not relevant here and so ordinary residence is determined based on its ‘usual meaning’.
The child is discharged into accommodation in local authority B under section 117 of the Mental Health Act 1983. Local authority A is responsible for section 117.
The child is then re-detained in local authority B. Local authority A retains section 117 responsibility by virtue of section 105 of the Children Act 1989. This is because accommodation under section 117 is to be disregarded under the modified deeming rules. Therefore, they are treated as ordinarily resident in local authority A (which was the local authority area in which they were ordinarily resident immediately before being detained)
	The following sets out a practice example of how the reforms to subsection (3) work where section 117 after-care does not include accommodation:
An adult lives in Local authority A.
This adult is detained under section 3 of the Mental Health Act. Local authority A is responsible for the adult’s section 117 after-care, which involves community support.
The same adult moves of their own choice to Local authority B, whilst still receiving section 117 after-care from Local Authority A. The patient is detained again under section 3 of the Mental Health Act and on discharge moves back to local authority B. At this point, local authority B becomes responsible for the adult’s section 117 after-care.
After-care Section 46: After-care services