Case No: C1/2011/2542
Neutral Citation Number: [2012] EWCA Civ 1232
IN THE COURT OF APPEAL (CIVIL DIVISION)
ON APPEAL FROM THE HIGH COURT OF JUSTICE
QUEEN’S BENCH DIVISION
ADMINISTRATIVE COURT
MR JUSTICE LANGSTAFF 
[2011] EWHC 2355 (Admin)
Royal Courts of Justice
Strand, London, WC2A 2LL

Date: 9 October 2012
Before:

LORD JUSTICE LLOYD
LORD JUSTICE RICHARDS
and
LORD JUSTICE ELIAS
- - - - - - - - - - - - - - - - - - - - -
Between:

	THE QUEEN ON THE APPLICATION OF SUNDERLAND CITY COUNCIL	Claimant
Appellant	
	- and -		
	SOUTH TYNESIDE COUNCIL	Respondent	
	
(1) SF
(2) LEEDS CITY COUNCIL	
Interested Parties	
- - - - - - - - - - - - - - - - - - - - -

(Transcript of the Handed Down Judgment of
WordWave International Limited
A Merrill Communications Company
165 Fleet Street, London EC4A 2DY
Tel No:  020 7404 1400, Fax No: 020 7404 1424
Official Shorthand Writers to the Court)
- - - - - - - - - - - - - - - - - - - - -

Hilton Harrop-Griffiths and Steven Fuller (instructed by Sunderland City Council) 
for the Appellant
Nathalie Lieven Q.C. and Christopher Mitford (instructed by South Tyneside Council) 
for the Respondent
The Interested Parties were not present or represented

Hearing date: 10 July 2012 
- - - - - - - - - - - - - - - - - - - - -
Judgment
Lord Justice Lloyd: 
Introduction
1.	This appeal is against an order of Langstaff J made on 15 July 2011 in the Administrative Court.  The issue is as between Sunderland City Council (Sunderland), which was the applicant for judicial review and is the appellant, and South Tyneside Council (South Tyneside) which was and is the respondent, as to which of them (if either) is the local social services authority (LSSA) which will be responsible under section 117 of the Mental Health Act 1983 (MHA, or the Act) for the after-care of a young woman, referred to in the case as SF, after she is discharged from the hospital where she is at present undergoing treatment and detained pursuant to section 3 of MHA.  The judge decided in favour of South Tyneside and refused permission to appeal, but Arden LJ gave permission to appeal at an oral hearing.  Given the potential burden on the responsible authority of the cost of after-care in some such cases, which may extend over a considerable period, it is understandable that an authority should seek to resist having the liability cast on it in a case of doubt, and particularly so because, as we were given to understand, the result under the judge’s order is contrary to what may have been the expectations of those involved at relevant times. 
2.	MHA provides in section 3 for a patient to be admitted to a hospital and detained there for a period, upon conditions laid down in that and other provisions of the Act.  This is what is sometimes referred to, in common parlance, as being “sectioned”.  Section 2 provides for a patient to be admitted to a hospital and detained for a limited period for assessment.  Both of these provisions allow the patient to be admitted to hospital against his or her will. They can be applied to a patient who is already in hospital as an in-patient. None of the provisions of the Act as regards compulsory admission or detention precludes the admission of a patient who requires treatment for mental disorder from being admitted to hospital on a voluntary basis; this is sometimes called informal admission: see section 131. 
3.	The appeal is concerned with the situation that arises when a person who has been detained under section 3 ceases to be so detained and (whether or not immediately) leaves hospital: see section 117(1).  When that happens, a local authority becomes responsible for the after-care of the person so discharged.  Section 117(2) provides, so far as material, that it is the duty of “the local social services authority”, in cooperation with other agencies, to provide after-care services for such a person until they are satisfied that the person concerned is no longer in need of such services.  So, one has to ask: which is the relevant local authority?  As to that, section 117(3) says that, in the section, “the local social services authority” means the local social services authority “for the area in which the person concerned is resident or to which he is sent on discharge by the hospital in which he was detained”.  So the question on this appeal is what area (if any) will be “the area in which [SF] is resident” upon her eventual discharge.  Although the question looks to the future it is unlikely that any change in circumstances that may occur hereafter will affect the answer to the question.
The material facts
4.	Before I embark on the legal issues arising from the legislation and the present facts I will set out the material facts in summary. 
5.	In 2007, when she was eighteen years old, SF was detained for the first time under MHA section 3.  She was then based in Leeds.  She was later discharged from that detention.  Leeds City Council (Leeds CC) was at that time the relevant LSSA.  In 2008 Leeds CC placed SF at a residential college in Scunthorpe.  In September 2009 Leeds CC placed her at a residential course at another institution, ESPA College in Sunderland, and in this connection she lived in a hall of residence called Westfield Hall.  It is common ground that at this stage SF was resident there, that is to say in the area for which Sunderland is the LSSA.  Having been living there for some three weeks, on 3 October 2009 SF attempted to commit suicide.  She was taken to Sunderland Royal Hospital, then to Queen Elizabeth Hospital, Gateshead, and after that on 6 October to South Tyneside District Hospital, in all of these cases, as I understand it, as a voluntary patient, apart from a brief period of detention (it cannot have exceeded 6 hours) under MHA section 5(4) at the Queen Elizabeth Hospital. 
6.	On 7 October 2009 SF was moved, with her consent, to Rose Lodge, which is in the area of South Tyneside.  This is a purpose built NHS hospital designed for patients with learning difficulties and providing short term treatment.  SF does not have learning difficulties.  SF did consent to this move but it is likely that if she had not given her consent, compulsory powers would have been used.  
7.	On 23 October 2009 ESPA College terminated her placement with the college, and with it her licence to live at Westfield Hall.  On 9 December 2009 SF absconded from and initially refused to return to Rose Lodge.  On 10 December 2009, when she did return to Rose Lodge, SF was detained for assessment there under MHA section 2.  At this stage, it appears, Leeds CC still accepted responsibility for her as being the relevant LSSA.  On 24 December 2009 SF was detained under MHA section 3 for treatment at Rose Lodge. 
8.	On 2 June 2011 SF moved to another hospital, this one located in Yorkshire, still under detention under MHA section 3.  We were told that recently she has moved to yet another hospital, this one located in the area of Sunderland, but that she still remains under detention under MHA section 3. 
The cases of JM and Hall
9.	In R (Hertfordshire County Council) v. Hammersmith and Fulham London Borough Council [2011] EWCA Civ 77, to which I will refer as the JM case, the Court of Appeal held that during a period of detention the person in question is not resident for the purposes of section 117(3) in the hospital in which he or she is detained.  Otherwise such a person would always, or almost always, be resident in the area of the relevant hospital.  The decision in the JM case approved and explained an earlier decision at first instance, R (Hall) v Mental Health Review Tribunal [1999] 3 All ER 132 (the Hall case), where Scott Baker J said that the relevant local social services authority was that for the area in which the patient was resident when he was detained.  He also said that residence for this purpose means ordinary residence.  I will come back to the JM case and the Hall case later.
10.	It follows that, in almost all cases of this kind, it will be necessary to look back at the position as it was some time ago in order to determine the place of residence for the purposes of the section, if for no other reason than that the issue arises on discharge from detention but that, in making that determination, the place of detention, that is to say the hospital, has to be ignored.  Given the exclusion of the hospital, only rarely would there be any possible place of residence other than a place or places which had been relevant before the period of detention.  The detention may last for some considerable number of years, so that it may be necessary to look back quite a long time. 
The judgment below
11.	It is agreed in the present case that SF was resident in Westfield Hall from 14 September to 3 October 2009.  So the issue is whether what happened after that meant that she ceased to be resident there and became either resident in Rose Lodge instead, or not resident anywhere.  The judge held that she did not change her residence.  Towards the end of paragraph 7 of his judgment he said this: 
“I conclude that her admission to Rose Lodge was not compulsory, but it was closely analogous to a compulsory admission.  There were powers to detain by compulsion in the background, which it is reasonable to assume that SF, the staff of the lodge and those concerned with her and South Tyneside Council were well aware of.”
From that, when he came later in his judgment to review the factors relevant to the issue of residence, he said this at paragraphs 24 and 25:
“24. 	… In examining voluntariness, though I conclude that SF might have exercised a choice formally not to be present in hospital and then at Rose Lodge, in my view I am entitled to, and do, take into account that the circumstances within which I have to categorise and evaluate the question of residence came close to being involuntary; in the same way as the person in hospital having had a serious injury, present there for treatment, might say colloquially that they had no choice but to stay where they were, although legally they were not present under compulsion. 
25.	Here, SF was not compelled, save by the force of circumstances, to be at Rose Lodge; but it is part of the facts and circumstances of the whole case that there was force in the circumstances surrounding her situation.  Secondly I take into account the nature of Rose Lodge, intended to be short term accommodation, and indeed from its description not ideally suited to her since she did not have a formal learning disability.”
12.	It had been pointed out that Westfield Hall was no longer available to her after 23 October 2009 following the termination of her placement there, but he declined to accept this act of a third party as affecting the answer to the question.  As to that he said this at paragraph 26:
“I shrink, in the context of section 117(3) from making the decision turn critically upon whether SF had “lost” her previous accommodation, in the sense that her stay away had continued for so long and in such circumstances that she was no longer to be entitled legally to return there.  This was not a voluntary surrender, as had been the case in [the JM case].  It was not the case when she entered Rose Lodge that she had no right of return.  The idea that she could be for a period of time in Rose Lodge and, not then under compulsion, be regarded as resident in Sunderland and then by the actions of a third party become no longer resident in Sunderland, without any material change in her personal circumstances or her own volition, does not seem to me a sensible answer to the question as to which local authority should be identified as required to provide for her after-care.”
13.	He then said this at paragraph 27:
“In applying the words of Lord Scarman from Barnet v Shah, I asked whether the evidence showed here that SF was present in Rose Lodge for a settled purpose; I cannot sensibly so conclude.  Was it part of the regular order of her life for the time being?  I do not think it can be said to be.  It seems to me therefore that the test of residence which that distillation implies is simply not satisfied by SF’s presence in Rose Lodge; she was not here to be equated with the homeless person of Mohamed.  I take into account the purposes of the statute, and the flexibility inherent in the word resident.  I was impressed by an example of which Mr Mitford gave in argument, in which he suggested that if one were in hospital for, for instance, treatment following an accident, and having been there for some weeks so mentally overcome by the after effects of the accident than to require thereafter to be compulsorily detained in the same place, it could not sensibly be said that the period of admission prior to detention made the person resident in the hospital, as opposed to resident in the place from which they had come and in which it was accepted that person was resident previously.”
14.	The judge therefore came to the conclusion that, although SF was admitted to hospital in Rose Lodge voluntarily, this did not amount to her becoming resident there, either immediately or when Westfield Hall was no longer available to her.  That was the basis of the reasoning which Sunderland seeks to challenge, by Mr Harrop-Griffiths, who appeared below, with Mr Fuller, and which South Tyneside seeks to uphold, by Ms Lieven Q.C., leading Mr Mitford who appeared below.
The grounds of appeal
15.	By its grounds of appeal Sunderland challenges the judge’s approach on two different bases.  The first is that the judge was wrong to ask himself whether from 23 October to 10 December 2009 SF was in hospital as part of the regular order of her life for the time being, and alternatively that if this was the right question he gave the wrong answer to it.  The second ground is that she could not be resident in Sunderland after 23 October 2009 by which time there was no accommodation within the area of Sunderland that was available to her. 
16.	More particularly, on the first point, Mr Harrop-Griffiths challenged the judge’s application of a test derived from R (Shah) v. Barnet LBC [1983] 2 AC 309 concerned with ordinary residence under provisions made pursuant to the Education Act 1962.  He also showed that MHA itself uses not only the concept of residence, in section 117, but also the concept of ordinary residence in section 26 and that it recognises the possibility of residence in hospital under section 17. 
Statutory provisions as to residence
17.	Statutory provisions imposing a test as to the residence of a person, with or without an adjective applied to the word residence, exist in many different fields of legislation, as diverse as MHA section 117 and the National Assistance Act 1948 section 24 on the one hand, and taxation provisions on the other.  In each case it can be said that the word residence is an ordinary English word and the concept an ordinary concept familiar in daily life.  Of course in most cases it is easy to apply and gives rise to no difficulty.  Problems arise in less typical cases whether, for example, airline pilots, or wealthy individuals with international connections, in tax cases (consider for example HMRC v. Grace [2009] EWCA Civ 1082 and R (Davies) v. HMRC [2011] SCUK 47) at one extreme or persons suffering mental problems, whether or not of full capacity, such as SF or JM, at the other.  The nature of the test will depend on the legislation, its context, its terms and its purpose. For example, tax legislation uses both residence and ordinary residence, as being different things in some situations.  A taxpayer is liable to capital gains tax if he is either “resident” or “ordinarily resident” in the United Kingdom in a given year of assessment: Taxation of Chargeable Gains Act 1992, section 2(1).  Other examples of relevant legislation are electoral registration (see Fox v. Stirk [1970] 2 QB 463 as to “resident” under the Representation of the People Act 1949 section 1) and entitlement to local authority education grants under the Education Act 1962 (R (Shah) v Barnet LBC), using “ordinarily resident” in respect of a period lasting over three years, and current or past normal residence as regards the responsibility to make provision for someone who is homeless or is threatened with homelessness under Part 7 of the Housing Act 1996: see Mohamed v. Hammersmith and Fulham London Borough Council [2001] UKHL 57.
The meaning of “resident” in MHA section 117(3)
18.	In the JM case the Court of Appeal refused to declare that “resident” in section 117(3) means the same as “ordinarily resident” in section 24 of the National Assistance Act 1948.  That is not surprising because Parliament used a different formula in each Act and included in the 1948 Act both a deeming provision and a special provision for the Secretary of State to resolve disputes, neither of which is present in MHA.  It might be a great deal more convenient and sensible if there were a match between the two provisions, rather than this mismatch, and at least one party in the JM case hoped to achieve such a match, but it did not succeed.  In R (Stennett) v Manchester City Council [2002] UKHL 34 the House of Lords held that section 117 is a free-standing provision, not to be construed so as to align it with the 1948 Act.  It might very well be better for the Secretary of State to be able to resolve issues of the present kind, as under the 1948 Act, rather than for it to be necessary to have recourse to the courts, with the time and expense that is inevitably involved in litigation, but that would require primary legislation.
19.	In the JM case the patient (JM) had had a council flat in the area of Hammersmith and Fulham for many years.  He suffered injury in a serious accident and was admitted to hospital for three months, was then discharged to a care home and then moved to a hostel, all of them within the area of Hammersmith and Fulham.  Then his mental health, which was problematical, was assessed and he was transferred to an establishment in the area of Sutton called Roanu House.  Soon after that he gave notice terminating his council tenancy in Hammersmith and Fulham.  He was held to be of full capacity, and both his move to Roanu House and his notice terminating his tenancy were treated as voluntary acts.  He stayed at Roanu House from 31 July 2007 to 22 January 2008 apart from a period of absence when he slept rough.  He was then detained in Sutton Hospital under MHA section 2 for a month for assessment.  He returned to Roanu House for some six weeks, and he was then detained in Sutton Hospital under MHA section 3.  As I have already said, the JM case decided that a period of detention under section 3 is not to be taken into account as to residence.  Otherwise in practice the LSSA for the area in which the particular hospital is located would almost always be the responsible authority.  Moreover, on that basis it would be difficult to imagine any circumstances in which the patient would have no residence, so the default provision could never apply.  The court also decided, approving the Hall case, that the area of residence prior to detention could remain relevant even though the patient has not lived there for several years, may have nowhere to go in that area and indeed may not be permitted to return there: see paragraph 24.  The judgment of Carnwath LJ in the JM case recognised a good deal of force in criticisms levelled against the legislation and at the test applied by Mitting J at first instance, but he observed that the problems were intrinsic to the language of section 117 and its difference from the approach adopted by the 1948 Act.  
20.	Thus, as matter of decision, the JM case held, first, that the period of compulsory detention is to be excluded in the sense that, even if the patient would otherwise be said to be resident in the relevant hospital, that cannot count.  It may be that the period is not necessarily to be excluded for all purposes.  For example, if the patient has a family home which is available for him to return to upon discharge that might be his residence even if, because of action taken by the family, its location changes during the period of detention.  That is a possible scenario as to which we do not need to decide anything.  The JM case also held, secondly, that the word residence in section 117 does not mean the same as ordinary residence in section 24 of the 1948 Act.  Carnwath LJ did see force in the proposition that the concept of residence is inherently flexible (see paragraph 47), and he recognised that voluntariness has been regarded as an important factor in many cases about residence: see paragraph 50.  Thus we are left with the use of an ordinary English word, residence, without any qualifying adjectives such as ordinary or normal, and with one hard and fast rule imposed as a matter of judicial interpretation of the policy of the legislation, that is to say that the place of detention is not to be regarded as the location of the residence during the period of detention. 
21.	As I have mentioned, we were shown cases about residence (ordinary, or normal, or without any applied adjective) from several different areas of law.  The true interpretation of “reside” or “resident” in any given Act must depend principally on the terms of the particular Act, and on its purpose and context.  MHA uses the word “resident” or related words in a number of different places.  Thus, section 17(3), under which the responsible clinician may permit a patient to leave a hospital in which he is liable to be detained, refers to the possibility of the patient being required by conditions “to reside in another hospital”.  So, it is said, the idea of a patient being resident in a hospital is not alien to the provisions of the Act.
22.	A significant role is accorded by MHA to the patient’s “nearest relative”.  Section 26 defines who this person is.  Subsection (4) includes the following phrase:
“where the patient ordinarily resides with or is cared for by one or more of his relatives (or, if he is for the time being an in-patient in a hospital, he last ordinarily resided with or was cared for by one or more of his relatives)”
23.	The section also applies the test (in particular circumstances) of whether the patient is ordinarily resident in the United Kingdom, the Channel Islands or the Isle of Man: see subsection (5)(a).
24.	The nearest relative can apply for the patient to be admitted under section 2 or section 3, or for guardianship under section 7 (see section 11) and can also make an emergency application for admission under section 4.  If a patient is admitted to hospital pursuant to such an application (other than an emergency application) the hospital must notify the LSSA “for the area in which the patient resided immediately before his admission”: see section 14.
25.	By contrast, under section 13, if an LSSA have reason to think that an application for admission to hospital (that is to say, under section 2 or section 3) or a guardianship application may need to be made “in respect of a patient within their area” they are to arrange for an approved mental health professional (AMHP) to consider the case and, if he considers that such an application ought to be made, and that it is necessary or proper that it should be made by him, he is to make it.  The test in that case is one of physical presence, which may be temporary or even fortuitous.  It is not at all the same as residence.  Nor would it be appropriate, in such a situation, for an LSSA to have to consider not only whether an application might need to be made in respect of a person but also where he or she was then resident.  Issues such as residence or local connection could form part of the AMHP’s consideration of the situation, but should not be a precondition to his addressing the situation at all.
26.	The use of these various different phrases in MHA suggests that they do not necessarily mean the same thing.  For that reason, for my part, I do not find it helpful to consider other cases in which “ordinary residence” has been construed in other legislation, when I seek to understand the word “resident” in section 117(3).  In particular, the test applied in R (Shah) v Barnet LBC, which involved a continuous period of ordinary residence over three years, does not seem to me to be a helpful guide to an understanding of the word “resident”, not qualified by “ordinarily”, in MHA section 117(3).  That is all the more the case as MHA does use the phrase “ordinarily resides” in section 26.  
27.	In terms of the overall policy of MHA and that of section 117 in particular, Langstaff J said at paragraph 23(1) that the section must be construed in the context of Parliament’s presumed intention to establish a workable and effective system to provide for after-care in the community for patients released from hospital.  That is common ground.  In particular, the objective of the provisions is that it should be possible to prepare in advance for the discharge of the patient: see the following two passages from Hall at [1999] 3 All ER 132, at 142 and 144:
“If effective after-care services are to be provided, it is necessary for them to be planned and arranged before the patient leaves hospital.  The joint nature of the duty on the health authority and the social services authority emphasises that this is so.  Effective after-care, as this case illustrates, takes time to prepare and arrange.
…
It seems to me that the whole purpose of section 117 is that there should be a working together to ensure that when a patient is released he is given the kind of support that gives him the best prospect of settling in the community.”
28.	Although it was not a case in which the issue of residence arose, it is also worth noting what Scott Baker LJ said in the Court of Appeal in R (W) v Doncaster Metropolitan Borough Council [2004] EWCA Civ 378 at paragraph 51:
“Although the section 117 duty does not bite on local authorities or health authorities until after the tribunal decision, they do not at that point start entirely from scratch.  Most such authorities will be faced fairly frequently with circumstances in which they are expected to exercise their section 117 duty to help to rehabilitate mental patients within the community.  It is reasonable to suppose therefore that they have procedures in place for coping with situations of this kind.  Also, they certainly have the power, in appropriate cases, to start making plans before the tribunal sits.  Kennedy LJ in Hall referred to them as plans in embryo.”
29.	The tribunal referred to is the Mental Health Review Tribunal, now the First-Tier Tribunal (Health, Education and Social Care Chamber).  The case of Hall mentioned is the decision in the Court of Appeal, [1999] 4 All ER 883, on appeal from that of Scott Baker J already mentioned, and is not otherwise relevant to this appeal.
30.	Residence is not necessarily the same as ordinary residence, as the tax legislation shows.  As mentioned above, R (Shah) v Barnet LBC was concerned with a test of ordinary residence applied in relation to a continuous period of three years.  By contrast Fox v Stirk involved a snapshot test, of residence on a given date in the year.  Moreover, it is clear that for the purposes of section 117 of MHA a person cannot have more than one residence, whereas for other legislative purposes (including Fox v Stirk as well as tax provisions) the person in question could be resident in two different places at the same time.  
31.	I agree with the comment made in other cases that, in general, when considering any case in which there is doubt as to the place of person’s residence, the question is not only that of physical presence, and that it may be relevant to consider why the person is where he or she is, and to what extent his or her presence there is voluntary.  Thus, if a person has a home, the fact that he or she is not there on a given date or for a particular period does not mean that he or she is not still resident there, if the absence is accounted for by, for example, a holiday, a business trip, or having to spend time in hospital, whether following an injury, an operation or some other form of treatment, possibly over a prolonged period, or, for that matter, a period of imprisonment following a criminal conviction.  That explains the accepted position that SF continued to be resident at Westfield Hall after her admission to hospital on 4 October 2009.
32.	In Mohamed v Hammersmith and Fulham London Borough Council [2001] UKHL 57, the statutory phrase under consideration was “normally resident”, in section 199 of the Housing Act 1996, part of the provisions dealing with a local housing authority’s duties as regards the homeless, and in particular with the issue of local connection.  The local housing authority argued, unsuccessfully, that a previous period of residence pursuant to the discharge of its own duty under the Act should not count towards establishing a local connection.  Lord Slynn said this at paragraph 18:
“It is clear that words like ‘ordinary residence’ and ‘normal residence’ may take their precise meaning from the context of the legislation in which they appear but it seems to me that the prima facie meaning of normal residence is a place where at the relevant time the person in fact resides.  That therefore is the question to be asked and it is not appropriate to consider whether in a general or abstract sense such a place would be considered an ordinary or normal residence.  So long as that place where he eats and sleeps is voluntarily accepted by him, the reason why he is there rather than somewhere else does not prevent that place from being his normal residence.  He may not like it, he may prefer some other place, but that place is for the relevant time the place where he normally resides.  If a person, having no other accommodation, takes his few belongings and moves into a barn for a period to work on a farm that is where during that period he is normally resident, however much he might prefer some more permanent or better accommodation.  In a sense it is ‘shelter’ but it is also where he resides.  Where he is given interim accommodation by a local housing authority even more clearly is that the place where for the time being he is normally resident.  The fact that it is provided subject to statutory duty does not, contrary to the appellant authority’s argument, prevent it from being such.”
33.	Among the various observations about statutory phrases to do with residence that were cited to us, I find these on the part of Lord Slynn the most helpful for present purposes, though I note that even the provision which he was considering has some additional elements of statutory definition.
34.	One of the points that Lord Slynn makes is that if one is living in a given place voluntarily it may be one’s residence even if there is or was not much of a range of choices to be made as to where to live.  That could be said to have been the position of SF at various stages in her life.
35.	It is clear that there can be cases in which the last place where the patient was eating and sleeping before detention under MHA was not the place of his or her residence.  This could be because he or she was temporarily away from an established home at the relevant time as a matter of choice.  It could be because he or she was in prison.  In such cases, the place of residence (if any) is elsewhere.  Lord Denning in Fox v Stirk spoke of temporary absence from home in hospital.  He may not have had in mind the position of someone spending more than five years in hospital.  An absence for such a long time might not be a temporary absence from a home which is the patient’s place of residence.  But if a home remained available throughout that time to which, subject to the patient’s fitness, he or she could return, then that home might continue to be his or her residence.
The relevance of a place of residence ceasing to be available
36.	That hypothetical case does not apply in the present case.  Here we are concerned with a situation in which a residence was available at the time of the patient’s voluntary admission to hospital, and for some time afterwards, but then ceased to be available.  In the JM case this occurred because the patient terminated his tenancy.  It was not said that the area in which his flat had been remained that of his residence thereafter.  In the present case it was the third party that provided the accommodation which withdrew it so that it was no longer available to SF.  In the JM case, his giving up his tenancy meant that his previously temporary presence in hospital, not amounting to residence, was transformed into a status of residence in the hospital.  That was the place where he was for the time being eating and sleeping, and there was no other such place which could displace the hospital as a residence.
37.	In the present case it was not the action of SF but that of the provider of the accommodation that led to it no longer being available to her.  The judge considered that this was a material difference.  With respect, I find it difficult to see why it should be.  SF may have considered, or hoped, that her presence at Rose Lodge was only temporary, but it could no longer be temporary pending a return to Westfield Hall.  Given that Rose Lodge was not obviously suitable for her, others involved may also have hoped that other and better arrangements could be made for SF, but they would not involve her going back to where she had been before.  On that basis, it seems to me that, once Westfield Hall ceased to be available to her, then either she was resident at Rose Lodge, or she was not resident anywhere.
Suggested anomalies and unsatisfactory outcomes
38.	The exclusion of the place of detention during the period of detention, for sound policy reasons, leads to what may seem a somewhat artificial test in some cases, requiring that the position immediately prior to detention be examined, which may be several or even many years in the past.  That is inherent in the legislation.  For South Tyneside Ms Lieven submitted that to allow the appeal would produce an unsatisfactory position in a number of respects.  In particular, it would generate an incentive, so far as LSSAs are concerned, in favour of admission to hospital on a compulsory basis, because in that case the location of the hospital could not be relevant to the issue of residence.  This would be inconsistent with the guidance published in accordance with MHA section 118 which, as Langstaff J recorded at paragraph 5, favours informal admission when the patient has capacity and consents to admission.  It is not the function of an LSSA to decide whether or not to apply for detention of a patient, but there would be a tension between the recommendation in the Code of Practice in favour of voluntary admission and the consequences of such admission for the LSSA in whose area the hospital is located.  She submitted that this would be undesirable and inconsistent with the collaborative nature of the exercise which is required to accomplish properly the difficult tasks arising under MHA in circumstances such as these. 
39.	In a way her submission amounted to saying that to allow the appeal, and to find that SF had been resident at Rose Lodge before she was detained, would be inconsistent with, and would subvert, the policy recognised in the JM case by which the particular hospital should be left out of account, precisely because the person’s presence in the hospital would otherwise almost always be the factor that would determine the area of residence.
40.	According to her submission, the difference between informal and compulsory admission should not be overstated.  She relied on observations by Lord Dyson and Baroness Hale in Rabone v Pennine NHS Trust [2012] UKSC 2 at paragraphs 27-28 and 105-106, admittedly in the different context of the extent of the operational duty under article 2 of the ECHR.  At paragraph 28 Lord Dyson said: “As regards the differences between an informal psychiatric patient and one who is detained under the 1983 Act, these are in many ways more apparent than real”.
Alternative formulations
41.	Ms Lieven also relied on the fact that Rose Lodge is an NHS hospital, intended for short-term treatment, aimed at patients with learning difficulties (unlike SF), as well as on the fact that, although the admission to Rose Lodge was informal and voluntary, if SF had not given her consent it is likely that she would have been admitted under compulsion and detained.  Elaborating on that last point, and seeking to derive support from what was said in Rabone, she argued that a period of voluntary admission which immediately preceded a period of detention in the same hospital ought always to be disregarded in applying the statutory test of residence, just as the period of detention is.  Thus, the critical moment should be the time when the patient is admitted to the hospital, whether voluntarily or by way of detention, assuming at any rate that any period of informal admission is followed immediately by detention, whether under section 2 or section 3.  So, she argued, since the MHA test under section 117(3) of where the patient “is resident” is already, in a sense, distorted by being translated as where the patient was resident immediately before being detained, it would not be more difficult than that to treat the Act as requiring to be ignored a period of voluntary admission to the same institution in which the patient is later detained, that period being continuous with a subsequent period of detention.  In that way the question would fall to be addressed not at the moment of detention but (where relevant) at the earlier moment of informal admission to the same institution, leading to later detention without any break in the period spent in that institution.  (I leave aside, as not material for present purposes, the question whether SF’s having absconded from Rose Lodge on 9 December 2009 would break that continuity.)
42.	Even if section 117 could not be construed as requiring such a construction, she argued in the alternative that the section could be read so as to be capable of flexible application, such as to allow the exclusion of a period of prior continuous voluntary admission, if the facts justified that, as she said they did, or could, in a case where the admission, though voluntary, would have been by way of detention if consent had not been given.  On that basis Langstaff J’s conclusion, reached by reference to the position as it was when SF was first admitted to Rose Lodge, could be seen as correct, even if not quite for the same reasons as those given by the judge.
43.	She pointed out that the consequence of the withdrawal by a third party of accommodation previously available to the patient would differ, if the appellant is right, according to whether it happened during a period of detention (in which case it would have to be ignored, because the enquiry would be applied to the position as at an earlier date) or during a prior period of informal admission, in which case it would not be ignored.  That, she submitted would be anomalous and arbitrary, and would not be justified by anything in the policy of the legislation.
44.	I have some sympathy with that argument, and I certainly recognise that the result contended for by Sunderland may lead to unexpected results, which would not arise if the patient were first admitted to the hospital in question by way of detention.  However, I cannot find any basis in the legislation on which this could be either the required, or even a permissible, result.  As it seems to me the exclusion of the place of detention during the period of detention, recognised by the JM case, is a special exception from what would otherwise be a relatively straightforward question: where is the patient resident at the time when the question has to be decided?  It does not seem to me that it is legitimate to extend that exception beyond the clear-cut situation of detention so as to apply also to a case of prior voluntary admission to the same institution.  Of course there will be cases of voluntary admission which do not, on the facts, give rise to a shifting of the patient’s residence from being the place where he or she was living previously to admission to the hospital in question.  That was the case here, since it is accepted that until 23 October 2009 SF remained resident at Westfield Hall.  But once that accommodation ceased to be available for her, it does not seem to me that, on any applicable test for residence, she could be regarded as remaining resident there.  On that point I differ, with respect, from the judge’s conclusion.  
45.	As for Ms Lieven’s submissions described in paragraphs [41] and [42] above, I cannot accept that the change in SF’s position that occurred on 23 October can be ignored by taking an earlier date as determinative, namely the date when she was admitted to Rose Lodge, and disregarding all later events that might otherwise affect the position.  There is no justification for taking the date of voluntary admission as determinative in all cases.  As to the argument that, in the present case, the fact that the admission was voluntary should be disregarded because if SF had not agreed she would have been detained, that would require an enquiry as to the circumstances of the voluntary admission which would be difficult to conduct, perhaps some considerable time after the event, would probably be rather undesirable, and would, as it seems to me, hardly be conducive to good administration.
Conclusion
46.	In my judgment Mr Harrop-Griffiths is justified in his argument that the judge was wrong to ignore the fact that, while SF was in Rose Lodge as a voluntary patient, she ceased to have any other place of residence available to her on 23 October 2009, so that there was from that date onwards no alternative to regarding her as resident in Rose Lodge, unless she was to be seen as not resident anywhere.  I agree with the judge that the case of no residence is a last resort, an ultimate default position, which should not be held to apply except in extreme and clear circumstances, which it is not necessary to define or even illustrate for the purposes of this appeal.
47.	Thus, I hold that the first ground of appeal is well made out, in the sense that the test set out in R (Shah) v Barnet LBC is not a helpful guide to the meaning of “is resident” in MHA section 117(3).  Above all, this is so because the circumstances to which the test of ordinary residence was to be applied under the Education Act 1962 are so very different from those in which section 117(3) has to be considered.  If guidance is to be sought from judicial observations about other legislation, I find Mohamed v Hammersmith and Fulham London Borough Council a good deal more helpful and relevant.  For that reason, it seems to me, with respect, that the judge’s reasoning at paragraph 27 of his judgment, which applied the R (Shah) v Barnet LBC guidance in preference to that in Mohamed, was not correct.  
48.	The second of the grounds of appeal is, in my judgment, decisive in the present case, since after 23 October 2009 there was no place available which could be regarded as where SF “is resident” other than Rose Lodge.  Nor can I accept Ms Lieven’s arguments in favour of adopting a date earlier than the moment of detention as the date as at which it is necessary, or even legitimate, to address the question of where the patient “is resident”.
49.	For these reasons, I would allow the appeal and declare that South Tyneside Council is the local social services authority relevant for the purposes of section 117(3) of MHA in relation to SF.
Lord Justice Richards
50.	I agree.
Lord Justice Elias
51.	 I also agree.