Predicting patients with dementia most at risk of needing psychiatric inpatient or enhanced community care using routinely collected clinical data: a retrospective multi-site cohort study

Background Dementia is a common and progressive condition whose prevalence is growing worldwide. It is challenging for healthcare systems to provide continuity in clinical services for all patients from diagnosis to death. Aims To test whether patients who are most likely to need enhanced support later in the disease course can be identified at the point of diagnosis, thus allowing the targeted intervention. Method We used clinical information collected routinely in de-identified electronic patient records from two United Kingdom NHS Trusts to identify at diagnosis which patients were at increased risk of needing enhanced care (psychiatric inpatient or intensive (crisis) community care). Results We examined the records of a total of 25,326 patients with dementia. A minority (16% in Cambridgeshire and 2.4% in London) needed enhanced care. Patients who needed enhanced care differed from those who did not in age, cognitive test scores, and Health of the Nation Outcome Scale scores. Logistic regression discriminated risk with an area under the receiver operating characteristic curve (AUROC) of up to 0.78 after 1 year and 0.74 after 4 years. We were able to confirm the validity of the approach in two Trusts which differed widely in the populations they serve. Conclusions It is possible to identify, at the time of diagnosis of dementia, patients most likely to need enhanced care later in the disease course. This permits the development of targeted clinical interventions for this high-risk group.


Background
Dementia is a common and progressive condition whose prevalence is growing worldwide.It is challenging for healthcare systems to provide continuity in clinical services for all patients from diagnosis to death.

Aims
To test whether individuals who are most likely to need enhanced care later in the disease course can be identified at the point of diagnosis, thus allowing the targeted intervention.

Method
We used clinical information collected routinely in de-identified electronic patient records from two UK National Health Service (NHS) trusts to identify at diagnosis which individuals were at increased risk of needing enhanced care (psychiatric in-patient or intensive (crisis) community care).

Results
We examined the records of a total of 25 326 patients with dementia.A minority (16% in the Cambridgeshire trust and 2.4% in the London trust) needed enhanced care.Patients who needed enhanced care differed from those who did not in age, cognitive test scores and Health of the Nation Outcome Scale The syndrome of dementia involves a progressive loss of cognitive ability and gradually increasing impairment of function which ultimately leads to death.Dementia is already a significant problem, with an estimated 55 million sufferers worldwide, and a growing problem, with a predicted 139 million people living with dementia by 2050. 1 An estimated 60% of current cases are in low-and middle-income countries, but even in high-income countries the number of patients and the level of their disability means that healthcare systems struggle to meet demand.For example, in the UK specialist dementia services often struggle to follow up all patients regularly throughout the disease course.As a result, patients are often discharged from the service following diagnosis, stabilisation on any medication and when initial care needs have been met.Some patients need further and more intensive psychiatric support, including intensive care in the community through psychiatric 'crisis teams' or admission to specialist dementia wards in psychiatric hospitals, although the proportion needing these services is not known. 2,3Clinical criteria for entry to crisis team care vary, but in Cambridgeshire and Peterborough (UK) patients are considered appropriate if their clinical condition is such that without intensive support they would be at significant risk of harm or require admission.Patients are considered for in-patient care if it is not possible to provide appropriate or safe care in the community.
Support after diagnosis is a major concern to patients with dementia and their carers.Universal provision of such support throughout the course of the condition is challenging, so targeting interventions may be attractive if patients at highest risk of deterioration and subsequent need for enhanced care can be identified at the time of diagnosis.Given this context, attempts have been made to identify risk factors for several healthcare outcomes among people with dementia.Knapp et al (2016) examined the records of 3000 people with Alzheimer's disease and identified a number of demographic and clinical characteristics associated with increased risk of nursing home, general hospital or psychiatric hospital admission. 4hey analysed characteristics of patients relatively close to the point of needing increased care, when differences may be maximised and the time for effective intervention may be limited.Sommerlad et al  (2019) found high rates of admission to general hospitals among people with dementia (>50% in the first year after diagnosis) and described risk factors for admission, including comorbid psychiatric disorder and socioeconomic deprivation. 5The previous focus on admission to general (acute) hospitals is understandable, but the reasons for admission are likely to include physical health problems common in older people (such as infections or fractures) that might not be due to dementia itself and may not be as amenable to intervention from psychiatric services.We are not aware of any studies that have examined specifically the association between factors measurable at the point of diagnosis and later need for psychiatric hospital admission.Furthermore, the number of psychiatric beds has declined in the UK and they have been replaced in part with intensive community support from crisis teams. 6We are not aware of any studies that have looked at risk factors at the point of diagnosis that predict need for intervention by these teams.
In this study, we examined the differences between individuals with dementia who later needed in-patient psychiatric care or crisis team intervention and those who did not, at the point of diagnosis.We demonstrate that patients with dementia who go on to need inpatient psychiatric or intensive community care can already be differentiated from those who do not at the point of diagnosis using routinely collected clinical data.These data can be used to create models that identify those patients at highest risk.The ability to identify high-risk patients allows for trials of targeted clinical interventions to improve outcomes.
Our objectives were: (a) to establish the proportion of individuals diagnosed with dementia who subsequently require psychiatric admission or intensive community support; (b) to establish the mean time between first contact with dementia services and the need for enhanced care; (c) to compare clinical information collected routinely at the point of diagnosis between individuals who subsequently needed enhanced care (psychiatric in-patient or intensive (crisis) community care) and those who did not; (d) to use any such differences to explore the feasibility of developing mathematical risk prediction models suitable for defining a highrisk cohort, in support of future interventional studies; and (e) to see whether such an approach could be replicated in an independent data-set.

Method
Secondary mental healthcare services in Cambridgeshire and Peterborough are provided by a single National Health Service (NHS) trust, Cambridgeshire and Peterborough NHS Foundation Trust (CPFT), which covers the combined county and some neighbouring areas to provide a total catchment population of ∼0.89 million people, of whom approximately 157 000 are over 65 years old. 7CPFT's memory assessment service provides between 2000 and 2500 assessments every year, and there are estimated to be 8600 people with dementia in Cambridgeshire. 8

Source data and patients
The electronic patient records analysed for our original analysis were obtained from CPFT's RiO clinical records system, designed by CSE Servelec, and operational 2013-2020 for older people's mental health services in CPFT.Records were de-identified into the CPFT Research Database.We examined the records of patients with a diagnosis of dementia, judged by the presence of cliniciancoded World Health Organization (WHO) ICD-10 codes starting F00 to F03, G3 and F06.We excluded those diagnosed with F06 (mild cognitive impairment (MCI)) unless they subsequently received a diagnosis of dementia.All patients examined had a diagnosis recorded between 2013 and 2020 inclusive.
Our primary outcome was the future need for intensive community (crisis team) support or in-patient psychiatric admission, collectively referred to here as enhanced care.We analysed three cohorts of patients in our initial analysis (Fig. 1).First, we analysed all individuals with a diagnosis of dementia (data-set 1).Second, we analysed those with this diagnosis but excluding those who had <6 months between diagnosis and needing intensive support (data-set 2), to avoid analysing individuals who were diagnosed at a point of crisis (which might maximise differences between patient groups, and at a time point less amenable to intervention).For each patient, scores on the 12 items were summed to determine their total score, with 48 being the maximum.(e) Index of Multiple Deprivation: this national deprivation index, derived from postcode of residence (indicating an area or 'neighbourhood'), measures deprivation in seven domains: income, employment, education, health, crime, barriers to housing and services, and living environment.There are 32 844 neighbourhoods in England, and the index is a rank: 1 indicates the most deprived area and 32 844 the least deprived. 14he deprivation index was split into five quintiles such that patients in quintile 1 were from the most deprived areas and those in quintile 5 were in the least deprived.(f) Marital status: patient marital status was listed in the database as civil partnership, cohabiting, married, separated, divorced, single or not known.Patients with unknown marital status were excluded from the analysis.(g) Ethnicity: the ethnicity national codes were listed in the electronic record.Any patients of unknown ethnicity were excluded.(h) Age: the patients' age at diagnosis was recorded in the database.(i) Gender: male or female was reported in the database.(j) Diagnostic codes: all patients in the statistical analyses had a diagnosis of dementia.The codes for dementia were: Alzheimer's dementia (F00/G30), vascular dementia (F01), dementia in other diseases (F02), unspecified dementia (F03).Some patients also had additional diagnoses recorded, such as delirium (F05), mild cognitive impairment (F06.7,although only those patients who also had a subsequent diagnosis of dementia were included), substance use (F1), severe mental illness (F2/F30/F31), depression (F32/F33), anxiety (F40/ F41), obsessive-compulsive disorder (OCD) (F42) and stress/ adjustment reactions (F43).

Statistical analysis
Owing to non-normal distributions of the data, continuous variables were analysed using the non-parametric Mann-Whitney U-test.For the categorical variables marital status or ethnicity, a chi-squared test of contingency was first performed.The contingency was between (a) group (patients who subsequently required crisis/in-patient services versus those who did not) and (b) marital status or ethnicity.Individual Fisher's exact tests were performed on each of the categories within these groups.
To correct for multiple comparisons, P-values were adjusted using the Holm method. 15Fisher's exact test was also performed for the categorical variable gender.R version 4.0.3(for Windows) was used for the analysis. 16We completed a post hoc analysis of some other variables in response to reviewers' comments, for example use of cholinesterase inhibitors or memantine, but these were not significantly different between the groups and did not enhance the accuracy of the model.Data on patients' place of residence or care home was not available at patients' first diagnosis date.We predicted the requirement for crisis/in-patient care (enhanced care).The binary outcomes examined were whether patients did or did not require a crisis team or admission to an in-patient unit within 1 year, 2 years, 3 years, etc. of their diagnosis.The follow-up time for the study was 10 years.Follow-up for each patient was until they were admitted to crisis or in-patient care, died or the study ended (whichever occurred first).Predictors were the following: age, ACE score, HoNOS subscores, gender, ethnicity, marital status, diagnostic codes and deprivation index.
We examined eight different models and compared their ability to predict the number of patients needing enhanced care based on the area under the receiver operating characteristic curve (AUROC) values of each model for years 1-4 from the patients' diagnosis date.For example, the binary outcome for the model at year 2 examined whether patients were or were not admitted to high-risk units within 0-2 years inclusive.The models built were: linear discriminant analysis (LDA), logistic regression (via a generalised linear model, GLM), classification and regression trees (CART), k-nearest neighbours (KNN), neural network (NN), naive Bayes (NB), support vector machine (SVM) and random forest (RF).The models were trained and tested by using 80% of the data for the training data-set and 20% for the test data-set.Cross-validation was performed five times for each model.Where models were tied (for example LDA and GLM yielded similar results, as we might expect given that they are closely related), we favoured the simpler and most directly explicable (i.e.GLM in this case).AUROCs generated by LDA and GLM from the data were, as expected, very similar (at 1 year: 0.78 for both models for data-set 1 and 0.75 for data-set 2).
As logistic regression (GLM) was the optimal model (see Results), the t-statistic was used to rank the predictors in order of importance (specifically, by |t|).The car package in R was used to assess for multicollinearity.Logistic regression assumes that there are not perfect correlations between the predictors. 17e examined the variance inflation factor (VIF), which indicates if coefficients are increased due to correlations with other predictors.The standard threshold of 2 was chosen. 17For data-sets 1 and 2, only two predictors had a VIF >2 and when these were excluded the AUROC of the model did not change significantly.(With the GLM, for data-set 1 the AUROC changed to 0.74 to 0.79 and for data-set 2 the AUROC changed from to 0.7 to 0.76.) After development of the model, we examined absolute and relative risks for needing enhanced care among strata with the highest predicted risk.

Missing values and sensitivity analysis
Many patients in the primary sample did not have a complete data-set at the time of diagnosis.Not all patients had a cognitive test score, ethnicity, marital status, deprivation index and gender reported in the electronic record.When data-sets 1 and 2 were analysed, an assumption was made that the values were missing at random.In a sensitivity analysis, we used the R package MICE (Multiple Imputations by Chained Equations) to predict missing values.

Replication
Replication was conducted using de-identified patient records from the South London and Maudsley NHS Foundation Trust (SLaM). 18ata from SLaM were ascertained via the Clinical Record Interactive Search (CRIS) resource.SLaM serves a local population of 1.36 million residents in the ethnically and socially diverse south London boroughs of Croydon, Lambeth, Lewisham and Southwark.CRIS is the anonymised version of SLaM's record system 'Electronic Patient Journey'.It provides research access to more than 500 000 health records within a robust governance framework. 18,19In line with the whole of London, the SLaM catchment area has a lower proportion of older adults (>60 years) than England as a whole (SLaM catchment: 13%; England: 22.3%). 18Dementia diagnoses are made in memory services, and patients are followed up beyond 3 months after the diagnosis of dementia only if social or non-cognitive problems arise, a similar model to that used in Cambridgeshire and Peterborough.
The SLaM data-set included 14 072 patients; 323 patients had a period of <6 months between diagnosis and enhanced care and were excluded.After excluding those with a HoNOS score and MMSE recorded more than 93 days after diagnosis, 6729 patients were in the final SLaM data-set (Supplementary Fig. 1, available at https:// doi.org/10.1192/bjp.2024.14).Of these, 2.4% received enhanced care (either in-patient admission or crisis team community support).Replication was performed by fitting a logistic regression using the same predictors in the new data-set.In the replication version, HoNOS scores on each item were dichotomised (score 0-1 = absent, score 2-4 = present).We found that there were some differences in the data-sets, which precluded full direct replication.For example, the MMSE was much more commonly used in SLaM than the ACE.Although replication using exactly the same model and variables as in CPFT yielded similar results, for the main analysis of the SLaM data we used their most commonly used cognitive tool, and again found similar results.This suggests that the findings are a genuine reflection of cognition rather than specific to the cognitive test used and that these results may be widely applicable, for example to other trusts using the MMSE rather than the ACE.

Patient characteristics: primary sample
The patient groups we analysed from CPFT data are shown in Fig. 1 (all patients with dementia in data-set 1, those with partial data excluding those with <6 months between diagnosis and need for enhanced care in data-set 2, and those with full data and excluding those with less <6 months between diagnosis and need for enhanced care in data-set 3).Characteristics of CPFT patients from data-sets 1 and 2 are summarised in Supplementary Table 1.

Differences at the time of diagnosis between groups later needing intensive care or not
Scores on the HoNOS items were significantly higher in individuals who subsequently required crisis or in-patient care ('high-needs' group) compared with those who did not in our original data-set.Table 1 summarises all variables analysed, with univariate tests for data-set 1 (summarised in Supplementary Table 2 for data-set 2).
Age, gender, marital status and ethnicity differed significantly between groups.Patients who subsequently required enhanced care were more likely to be younger and married.Enhanced community care was more common in Cambridgeshire (∼3 times more common than admission).The risk factors for needing admission or enhanced community care were the same for both groups.All the variables examined were then used in the creation of a model to predict which patients were at most risk of needing crisis or in-patient care.

Predictors of later need for crisis/in-patient care
Out of the eight models examined for data-set 1, logistic regression (a GLM) was used for the remainder of the analysis; this had AUROC values of 0.74-0.78for periods of 1-4 years after diagnosis.The best alternative models performed worse than or similar to the logistic regression (see Supplementary Fig. 2 for details).The AUROC was 0.71-0.75for data-set 2 (Supplementary Fig. 3) and 0.6-0.65 for data-set 3 (Supplementary Fig. 4).
The odds ratio (or the arithmetic change in log odds) that the person is admitted to crisis or in-patient care and outputs of the winning model are shown in Table 2 (shown in Supplementary Table 3 for data-set 2).Later need for intensive support was positively and significantly associated with male gender and greater behavioural disturbance, but was inversely associated with age and the level of physical/functional impairment (judged via physical disability on the HoNOS).Greater cognitive problems, as judged via the HoNOS, predicted more future need in the combined logistic regression model (which accounts for all variables simultaneously); and, similarly, worse cognition (as judged by lower ACE scores) predicted greater future need.
We considered whether death may have been a confounding variable.However, there were no significant differences in the rates of death between the two groups.For data-set 1, the proportions of those who died were 55.8 and 56.1% for those requiring and those not requiring enhanced care, respectively (χ 2 = 0.0418, not significant).For data-set 2, the proportions of those who died were 55.3 and 55.4% for those requiring and those not requiring enhanced care, respectively (χ 2 = 7.30 × 10 −5 , not significant).This indicates that differential mortality was not a confounding variable in this case.Supplementary Fig. 5 shows receiver operating characteristic (ROC) curves for each year since the patient's first diagnosis, from 1-4 years, for all three CPFT data-sets (patients with full data, partial data and the whole population).All models performed well but models based on larger data-sets performed better, likely owing to a higher number of crisis or in-patient events in a larger population.For data-set 1 (11 254 patients), the AUROC was between 0.74 and  In the original data-set 13 241 patients had dementia and/or mild cognitive impairment (MCI).After excluding those with MCI only, 11 254 patients had dementia (data-set 1); of these, 9704 had >6 months between their first diagnosis and admission to crisis or in-patient (data-set 2).Of those patients, 2502 had a Health of the Nation Outcome Scale (HoNOS) and Addenbrooke's Cognitive Examination (ACE) score within 93 days of diagnosis date.After excluding those with missing ACE scores, deprivation index, gender, marital status and ethnicity, as well as those diagnosed before the age of 40, there were 1658 patients with a clean data-set (data-set 3).Predicting risk of needing enhanced care in dementia 0.78 for the logistic model between 1-4 years since the first diagnosis date.Similarly, for data-set 2 (9704 patients), the AUROC was between 0.71 and 0.75 for the logistic model.For data-set 3 (1658 patients with complete data), the AUROC was between 0.6 and 0.65 for the logistic model since the first diagnosis date.However, when replicated in London with a larger complete data-set of 6729 patients (the SLaM data-set), the AUROC was better, at 0.746 (Supplementary Fig. 6).
Having established these significant predictors, we ranked them by their predictive contribution (Supplementary Fig. 7).For datasets 1 and 2, the most important variables were age, dementia subtype and behavioural scores on the HoNOS.Variables in both sets that did not significantly predict outcome were activities of daily living, ethnicity, occupation and self-harm.

Identifying patients most at risk for needing crisis or inpatient care
The logistic regression model was used to determine the probabilities of patients being admitted to crisis or in-patient units over time.Based on these probabilities, the predicted top 10% of patients most at risk of needing crisis or in-patient care were identified (Fig. 2).For data-set 2, those in the cohort with the highest predicted risk had an 10.6% chance of needing enhanced care after 1 year and a 19.3% chance after 2 years.The other 90% had a 2% chance of needing enhanced care after 1 year and a 5.6% chance after 2 years.Therefore, after 2 years, there was a 3.5-fold increase in the need for enhanced care for the 10% at highest predicted risk.After 6 years, 37.5% of the highest-predicted-risk patients needed crisis or in-patient care compared with 14% of the other 90%.When we analysed all patients (data-set 1), including those with <6 months between diagnosis and enhanced care (perhaps the most useful population for clinical application) we found a likelihood of needing enhanced care of 31.8% at 2 years among the 10% at highest risk, and 8.7% among the other 90% of patients.

Participant characteristics: replication sample
The overall characteristics of the SLaM data-set are described in Supplementary Table 1.The SLaM data-set's ethnic groups included 20.6% Black and 69.9% White patients.This is more ethnically diverse than the CPFT data-set, which included 0.986% Black and 92.4% White patients.More of the population in SLaM was female compared with CPFT, and patients were diagnosed at an average age of 82, similar to the CPFT age characteristics.

Group differences at first contact: replication sample
Supplementary Table 4 summarises differences between groups who later needed enhanced care and those who did not, using univariate analysis.Patients in the future-enhanced-care group were more likely to be younger and married, with no group differences in ethnicity or gender.Scores on 4 of the 12 HoNOS items (behaviour, hallucinations, depression and relationships) were significantly higher among patients who subsequently required enhanced care compared with those who did not.Scores on the disability item of the HoNOS were lower for those in the futureenhanced-care group.
All the variables examined were then used in the creation of a model to predict which patients were at most risk of needing crisis or in-patient care (Supplementary Table 5).

Logistic regression model performance in replication sample
The AUROC for the SLaM data-set/model was 0.746 (Supplementary Fig. 7).The logistic regression model (accounting for multiple variables simultaneously) also found that younger patients were more likely to need crisis/in-patient care, and likewise those from more deprived areas.Although ethnicity was not a significant predictor in univariate analysis (Supplementary Table 4), in the full logistic regression model, Asian patients were less likely to require enhanced care (Supplementary Table 5).Higher HoNOS subscores for behavioural disturbance, depression and relationship problems, and a lower score on the physical illness/disability item, were predictive of need for enhanced care.

Discussion
In this paper we present the largest data-set to date examining people diagnosed with dementia and their subsequent risk of needing psychiatric in-patient or community crisis ('enhanced') care.At the point of diagnosis, individuals who subsequently needed enhanced care in the CPFT data-set were younger, more likely to be male, had more impaired cognition as measured by formal cognitive testing, and higher HoNOS scores, in particular for the behavioural disturbance item.We were able to use these differences to model risk with a clinically acceptable level of accuracy (AUROC = 0.78-0.74)and define the 10% of patients at highest predicted risk.The process was replicated and a similar model created using the SLaM data-set, which had an AUROC of 0.74.This was a more diverse population, with 69.9% White and 20.6% Black patients.We were reassured overall by the lack of difference based on ethnic origin across the two databases as this is in contrast to other areas of psychiatry where access to services does show ethnic disparity. 20Consistent with the CPFT data-set, patients who needed enhanced care were younger and had higher HoNOS subscores for behavioural disturbance, hallucinations, relationships and lower subscores for physical illness/disability.Data from both trusts show that those from more deprived areas more often required enhanced care.Some differences were found with demographic variables and HoNOS subscores.In addition, the SLaM data-set showed that higher scores on the depression scale were predictive of those needing enhanced care.
Six years after diagnosis, only a minority of patients in Cambridgeshire needed enhanced care in the absence of routine follow-up (16% in Cambridgeshire for data-set 1, 12.8% for dataset 2 and 12% for data-set 3).This was also true in London, where only 2.4% of the total group had needed enhanced care.It may not therefore be fruitful to continue to see all patients with a dementia diagnosis with the aim of averting a deterioration requiring enhanced care, as only a minority will need it.There may be value in attempting to identify the patients who are at highest risk of needing enhanced care in order to target interventions.We identified factors measured at the time of original diagnosis that predicted which patients would later need enhanced care, even though, on average, the time to needing enhanced care for dataset 2 was 2.65 years.Although our initial analysis excluded patients who needed enhanced care soon after diagnosis (within 6 months), so that we were predicting future rather than nascent current crises, the length of time between diagnosis and the need for enhanced care means that interventions could be implemented to attempt to improve outcomes.Subsequent analysis of all data on all patients, including those with <6 months between diagnosis and enhanced care, still found an overall mean time of 1.88 years between diagnosis and the need for enhanced care, where it was needed.Interventions could be implemented and some that have been reported to bring benefit include 'case management', which has reduced long-term placement (e.g.residential care placement), although with a lesser or no impact on hospital admission. 21argeting such interventions more specifically at those at highest London et al risk, and for outcomes where they might be more successful, such as crisis events, might yield better results.
Clinical services supporting people with dementia in the UK could feasibly focus on those most at risk, as the number of individuals in this group is not prohibitively large.For example, the memory assessment services in Cambridgeshire routinely see ∼2500 patients a year.Resource limitations mean that not all patients can be supported by secondary care services indefinitely, but focusing on the 10% most at risk would mean following up 250 patients per year.Based on the present analysis for data-set 1, after 2 years, focusing resources on the 250 patients most at risk would cover approximately 78 patients who would have needed enhanced care.Importantly, the parameters included here, including those used for modelling, were derived from data already collected in routine clinical practice: no extra time would be required from the clinical team to record data to identify patients at Predicting risk of needing enhanced care in dementia highest risk of needing enhanced care.Furthermore, we were able to identify similar factors predicting need for enhanced care in a second trust with very different patient demographics, differences in the data they record and differences in service provision, and use these to build models with similar levels of accuracy.This suggests such an approach may be widely applicable.

Limitations
Our study has some limitations.As a retrospective cohort study, it is at risk of including confounding variables.The time period examined here also included a global pandemic, which had an impact on rates of referral, diagnosis and in-patient admission. 22Although all services were disrupted to some extent, crisis and in-patient services continued to function throughout the pandemic.Our cognitive data in the CPFT cohort were based on ACE scores.Although this test was completed by the majority of patients in our data-set, the choice of cognitive test might be related to other clinical features, which may themselves relate to risk of needing enhanced care; for example, those most cognitively impaired might complete an alternative cognitive test if they are not able to tolerate a full ACE.Our original model was run on a minority of patients in order to exclude those with missing variables; however, subsequent analyses on the total population and an independent data-set obtained similar results in terms of ability to predict need for enhanced care.We acknowledge that admission or crisis team intervention is only one (proxy) outcome measure, and further work should explore other possibilitiesfor example, quality of life measures or time to requiring institutional living.We found some differences between the two NHS trusts, for example in the proportion of patients receiving in-patient or crisis care.This most likely represents a difference in service provision between the two trusts but is itself interesting and warrants further investigation.Last, although our approach involved independent replication in a second NHS trust, other organisations may need to develop a tool based on their locally available data, as data-sets are not uniform across the UK.Nevertheless, the similar results in two different trusts do suggest that the identification of patients at the point of diagnosis is possible and likely to extend to different populations using only routinely collected data.

Clinical and research implications
In summary, our findings suggest that only a minority of people with dementia deteriorate enough to require in-patient psychiatric admission or community crisis team care over 6 years after diagnosis, and those who are at highest risk can be identified at the time of diagnosis, many months or years before they reach crisis point.This raises the possibility of intervening in a targeted fashion.Such an intervention might be as simple as continued contact with secondary care services rather than discharging to primary care, or more active interventions such as case management. 21The logical extension of our work would be an intervention trial in the high-risk cohort we have been able to identify, to see whether outcomes can be improved.If successful, this would have a positive impact on healthcare systems and would likely be welcomed by patients and their carers.

Fig. 1
Fig. 1 Patient population for the three Cambridgeshire and Peterborough NHS Foundation Trust data-sets (the primary patient sample).In the original data-set 13 241 patients had dementia and/or mild cognitive impairment (MCI).After excluding those with MCI only, 11 254 patients had dementia (data-set 1); of these, 9704 had >6 months between their first diagnosis and admission to crisis or in-patient (data-set 2).Of those patients, 2502 had a Health of the Nation Outcome Scale (HoNOS) and Addenbrooke's Cognitive Examination (ACE) score within 93 days of diagnosis date.After excluding those with missing ACE scores, deprivation index, gender, marital status and ethnicity, as well as those diagnosed before the age of 40, there were 1658 patients with a clean data-set (data-set 3).

Fig. 2
Fig. 2 Top 10% of patients who are most at risk of needing enhanced (crisis or in-patient) care.The top 10% of patients who are most of risk of needing enhanced care (orange) and the remaining patients (blue) are shown by the Kaplan-Meier survival curves for (a) data-set 1 (n = 11 254 patients) and (b) data-set 2 (n = 9704 patients).Time is shown in years since the patient's first diagnosis date.The number at risk indicates the number of patients who have not yet required enhanced care at each time point.

Table 2
Output of the logistic regression for 11 254 patients in the Cambridgeshire and Peterborough NHS Foundation Trust data-set IMD1-IMD5, the 1st, 2nd, 3rd, 4th and 5th quintiles on the Index of Multiple Deprivation; ICD-10, 10th revision of the International Statistical Classification of Diseases and Related Health Problems; ACE, Addenbrooke's Cognitive Examination; HoNOS, Health of the Nation Outcome Scale.*P < 0.05,**P < 0.01,***P < 0.001.Data are rounded to three significant figures.

Table 1
Variables examined for 11 254 patients in the Cambridgeshire and Peterborough NHS Foundation Trust data-set Enhanced care, crisis or in-patient care; ACE, Addenbrooke's Cognitive Examination.a.A Health of the Nation Outcome Scale (HoNOS) item score ≥2 was taken to indicate the presence of a problem.*P < 0.05,**P < 0.01,***P < 0.001).Data are rounded to three significant figures.