Contacts with primary and secondary healthcare prior to suicide: case–control whole-population-based study using person-level linked routine data in Wales, UK, 2000–2017

Background Longitudinal studies of patterns of healthcare contacts in those who die by suicide to identify those at risk are scarce. Aims To examine type and timing of healthcare contacts in those who die by suicide. Method A population-based electronic case–control study of all who died by suicide in Wales, 2001–2017, linking individuals’ electronic healthcare records from general practices, emergency departments and hospitals. We used conditional logistic regression to calculate odds ratios, adjusted for deprivation. We performed a retrospective continuous longitudinal analysis comparing cases’ and controls’ contacts with health services. Results We matched 5130 cases with 25 650 controls (5 per case). A representative cohort of 1721 cases (8605 controls) were eligible for the fully linked analysis. In the week before their death, 31.4% of cases and 15.6% of controls contacted health services. The last point of contact was most commonly associated with mental health and most often occurred in general practices. In the month before their death, 16.6 and 13.0% of cases had an emergency department contact and a hospital admission respectively, compared with 5.5 and 4.2% of controls. At any week in the year before their death, cases were more likely to contact healthcare services than controls. Self-harm, mental health and substance misuse contacts were strongly linked with suicide risk, more so when they occurred in emergency departments or as emergency admissions. Conclusions Help-seeking occurs in those at risk of suicide and escalates in the weeks before their death. There is an opportunity to identify and intervene through these contacts.

Suicide and suicidal behaviours are recognised as important issues for public health policy and practice in the UK and globally. Although there has been some progress in reducing suicide mortality globally, much of the decline is driven by decreases in China and India 1 and this is more likely attributable to improved living standards than specific suicide prevention efforts. A recent meta-analysis identified a general lack of progress in the suicide prevention field in the past 50 years. 2 The authors highlight the scarcity of studies on short-term or acute risk and of longitudinal studies of proximal warning signs for suicidal behaviour. Many people who die by suicide have been in contact with health services in the year before their death. [3][4][5][6][7][8][9][10][11][12][13][14][15] This provides a unique opportunity for intervention.
Previous studies have focused on suicide following discharge from psychiatric hospitals, with long-standing consistent findings of a peak incidence of deaths occurring within 3 months of discharge. 3 A few studies have extended their analyses to all those who have died by suicide (i.e. known and unknown to mental health services) and measured the proportion of those in contact with health services prior to their death. 4,5 They found that fewer than 1 in 3 of those who die by suicide are in contact with mental health services in the year before they die and that the majority (49-92%) make contact with primary healthcare. 4,5 Most suicide studies combining primary and secondary care data do not include population-representative controls for comparison. 6 The ones that do are small in scale and/or based on data collected by interviewing next of kin and healthcare professionals. 7 The only large-scale (over 4000 deaths by suicide) case-control population-based study analysed primary care data only. 8 There is a need for suicide studies with population-representative controls examining the type and cause of contacts across all health services.
To the best of our knowledge, ours is the first study on suicide combining all of the following characteristics: a population-based data-set; a study period of 17 years; linkage of administrative, primary, emergency department and secondary care data at a person level; a case-control design with live controls (at the time of the cases' death) drawn from the general population; and a continuous longitudinal analysis over the last 12 months of life. We aim to explore the type and time of healthcare services contacted by those who die by suicide in the year before their death in order to identify potential opportunities for prevention.

Study design and participants
Wales, a country within the UK, has a population of 3.1 million. Of the approximately 33 000 deaths registered each year, around 350 are suicides or events of undetermined intent. 9 It is conventional practice to include the latter in the definition of suicide.
The Suicide Information Database-Wales (SID-Cymru) is a population-based electronic cohort of individuals who died by suicide in Wales (cases) and matched controls hosted in the Secure Anonymised Information Linkage (SAIL) Databank. 10 The SAIL Databank (www.saildatabank.com) is an expanding resource of anonymised secure privacy-protecting person-based linkable data from health and public settings to support research. SAIL assigns an anonymous linkage field unique for each individual using a privacy-protecting split file approach, which can then be used to link across data-sets at a person level. We used all records linked deterministically or probabilistically with a matching score ≥0.9. 11 SID-Cymru defines those who died by suicide (cases) using ICD-10 codes for suicide (X60-84) and undetermined deaths (Y10-34, Y87, and Y87.2; excluding Y33.9 before 2007) recorded in the Office for National Statistics deaths register. 10 The minimum age at death for inclusion was 10 years for suicide and 15 years for undetermined deaths. 9 Our study population includes deaths between 1 January 2001 and 31 December 2017. We set the index date for each case as the date of death or the start date of a healthcare contact during which their death occurred (e.g. following an emergency admission due to overdose or during a psychiatric admission). The contact prior to the index date is where an opportunity for prevention exists.
Controls were selected using incidence density sampling. We randomly matched each case to five controls by gender and week of birth (±1 year). 10 Controls were alive at the time of the case's death, to minimise bias, 12 and were unique. During control selection, those with a similar period of Welsh residency were chosen to ensure similar quality of data coverage.
Six data-sets were utilised in our analysis: the Welsh Demographic Service; Office for National Statistics -Deaths; the General Practice Database (GPDcovering 77%, i.e. 333/432, of all general practices in Wales); Emergency Department Data Set for NHS Wales; Patient Episode Database for Wales; and the Outpatient Data Set for NHS Wales (full details are in supplementary Table 1, available at https://doi.org/10.1192/bjp.2020.137). Owing to variable data availability across individual data-sets, we used: (a) those registered with a general practice providing data to SAIL in the year before their index date to study general practice contacts; (b) those with an index date in 2010 or later to study emergency department contacts; (c) the whole-Wales population to study hospital admissions; (d) those with an index date in 2005 or later to study hospital out-patient contacts; and (e) all those with an index date in 2010 or later and registered with a general practice providing data to SAIL in the year before their index date to simultaneously study contacts across all four settings.
SAIL's Information Governance Review Panel granted ethical approval to conduct this research (IGRP number 0204). Under permissions granted to the SAIL Databank, individuals' informed consent was not necessary and all data was anonymised.

Measures
Four demographic variables were extracted at the point of the index date from the Welsh Demographic Service data-set: gender; age categories (10-24, 25-64, >65 years); level of deprivation; and rural/ urban context. Variables dependent on geographical location were extracted from general practice residential records in the GPD. We used quintiles of the Welsh Index of Multiple Deprivation (WIMD) 2011 score as a measure of area deprivation at lowerlayer super-output area level; approximately 1500 individuals per area level. 13 WIMD deprivation levels 1 to 5 were defined using national WIMD score quintiles as cut-offs, with level 1 representing the lowest deprivation areas. Rural/urban context is an indicator for England and Wales categorising each area into 'urban' (i.e. settlement types with a population of 10 000 or more) and 'rural' (i.e. the union of the categories 'town and fringe' and 'village, hamlet and isolated dwellings'). 14 We examined all general practice, emergency department, and hospital in-patients and out-patients contacts for each case/control before their index date in each setting's data-set separately. We defined 'contact' as a recorded entry in the GPD, Emergency Department Data Set, Patient Episode Database for Wales or Outpatient Data Set. In the GPD, we excluded administrative codes and associated diagnoses such as 'letter from emergency department', but did include telephone and face-to-face contacts with any member of the general practice team. We also identified specific types of contact in the year leading to the index date across data-sets.
We identified specific types of contact (e.g. mental health, substance misuse diagnoses, prescriptions) in the year leading to the index date across data-sets (supplementary Table 2). Contacts were classified on the basis of validated read-code and ICD-10 code lists and with the input of expert clinicians (supplementary Table 3, including references). We stratified hospital admissions into emergency and elective admissions. Any contact may be associated with more than one type of diagnostic or treatment category.

Statistical analysis
We used SQL Db2 (www.ibm.com/analytics/db2) to interrogate data in the SAIL Databank and performed the analysis using R (www.r-project.org) for Windows. Descriptive statistics were used to summarise group characteristics and proportions of people and presenting complaints to each setting. This included counts, percentages and 95% confidence intervals (CIs) estimated by Wilson score with continuity correction. 15 We used conditional logistic regression to compare ratios of cases and controls while adjusting for deprivation (WIMD quintile).
We measured contacts with health services using the linked data-set across all settings (general practice, emergency department, and hospital in-patients and out-patients) within 1 week, 1 month and 1 year before the index date. We recorded where the last contact in the year leading to the index date occurred and why. We examined whether a patient had a mental health or self-harm contact in any of the health data-sets within 1 year of the index date. We studied the trajectory of healthcare contacts before the index date, measuring: (a) the proportion of cases and controls with contacts in the 1 to 365 days before the index date and (b) the rate of cases and controls with contacts in a 1-week window starting at day 7 to day 365 before the index date. For the trajectory analysis only, we corrected P-values from each graph for multiple testing using false discovery rate. 16 Finally, we conducted a sensitivity analysis repeating all analyses using only those with a coroner's conclusion of 'suicide', i.e. death by intentional self-harm, to ascertain any bias introduced by the inclusion of undetermined deaths.
Owing to variable data availability across individual data-sets, in the year leading to the index date, 3504/5130 cases (68.3%) had GPD data available, 2476/5130 cases (48.3%) had emergency department data, all 5130 cases had hospital in-patient data, 3861/5130 cases (75.3%) had hospital out-patients data, and 1721/5130 cases (33.5%) had data coverage across all settings (general practice, emergency department, hospital in-patients and hospital out-patients) (supplementary Fig. 1). All subpopulations of cases had similar demographic profiles to the full study population of cases, so it could be reasonably assumed that these organisational and administrative differences did not affect representativeness (supplementary Table 4).

General practice
Most cases and controls had a general practice contact in the year leading to the index date. Table 1 shows full results for cases and controls with different types of general practice contact, with gender stratification in supplementary Table 5. All the studied types of contact were more likely in cases than in controls. The OR was distinctively highest for self-harm: OR = 33.1 (95% CI 23.8-45.9). All the studied contacts were more common in females than males for both cases and controls, with ORs relatively similar between them. The only notable exceptions, with ORs for females higher than males, were alcohol misuse contacts (OR = 225.7 (95% CI 31.6-1609.1) v. OR = 7.7 (95% CI 6.2-9.7)) and prescription of psychotropics (OR = 9.5 (95% CI 8.3-10.8) v. OR = 7.7 (95% CI 7.1-8.3)).

Secondary care
One-third of cases had a hospital admission in this period. Table 2 shows full results for cases and controls with different types of secondary care contact, with gender stratification in supplementary Table 6. Hospital admissions with a recorded mental health specialist contact, as well as both emergency and elective admissions, were more common in cases than in controls. Emergency admissions were more common than elective admissions in cases, with the opposite being true in controls. All the studied types of hospital in-patient admission were more common in cases than in controls. The highest OR was for self-harm emergency admissions (OR = 94.9; 95% CI 63.5-141.9). More females (518/1131 (45.9%); OR = 4.0 (95% CI 3.6-4.4)) than males (1244/3999 (31.2%); OR = 3.3 (95% CI 3.1-3.5)) had hospital admissions in the year before their index date. The same was true for all studied hospital admissions except for very rare contacts (<2%), drugs misuse emergency admissions, and alcohol and drugs misuse elective admissions. ORs for females were higher than for males, particularly for alcohol misuse emergency admissions (OR = 45.4 (95% CI 22.4-90.8) v. OR = 16.6 (95% CI 12.7-21.7)). Confidence intervals were wide because of the small number of controls for these contacts (<0.5%). Injury and poisoning emergency admissions were relatively common in both genders (females: 221/1131 (19.6%); males: 488/1244 (12.3%)) and showed higher ORs in females (OR = 19.8 (95% CI 15.1-26.0) v. OR = 10.4 (95% CI 9.1-12.0)).
Contacts with primary and secondary healthcare: analysis of linked data across all healthcare settings Use of healthcare services in the year leading to the index date Table 3 shows full results for cases and controls with healthcare contacts across services, with gender stratification in supplementary Table 7. Overall, more females and cases had contacts with healthcare services in the time leading to their index date, particularly in periods closer to this date. The general practice was the most common point of contact (one-quarter of cases in the week before the index date and two-thirds in the month before the index date). ORs were highest for emergency department contacts: OR = 10.1 (95% CI 7.2-14.0) and OR = 5.5 (95% CI 4.8-6.3) in the week and month before the index date respectively. Indeed, 4.5 and 16.6% of all those who died by suicide had been seen in the emergency department in the week and month before the index date respectively. This was followed by hospital admissions, general practice and hospital out-patient contacts. Females contacted healthcare services more than males: 172/359 (48.0%) v. 367/1362 (27.0%) in the week before the index date, and 327/359 (91.1%) v. 931/1362 (68.4%) in the month before. ORs for females were higher than for males, particularly for emergency department contacts (OR = 20.0 (95% CI 9.3-42.7) v. OR = 7.9 (95% CI 5.4-11.4) in the week before the index date; and OR = 8.4 (95% CI 6.2-11.2) v. OR = 4.8 (95% CI 4.1-5.6) in the month before).
Trajectories of health service use in the year prior to the index date A continuous, follow-back representation of the frequency of cases and controls contacting healthcare services in the d days before the index date can be seen in the upper row of Fig. 1. The frequency of individuals contacting healthcare services mostly follows a logarithmic decaying trend more accentuated in cases than in controls, with ORs between 2.5 and 3.0 and always statistically significant. The frequency of individuals with a general practice contact follows a similar pattern. In emergency department contacts, this decreases linearly and more rapidly before sharply dropping in the weeks before the index date for cases, while it remains mostly linear during the whole period for controls, with a slope close to that for cases. A similar pattern can be seen for emergency hospital admissions, albeit with greater slope difference between cases and controls.
An additional continuous, follow-back representation of cases and controls contacting healthcare services in the week starting at day d before the index date can be seen in the lower row of Fig. 1. At any given week in the year before the index date, the frequency of cases contacting healthcare services (any) was higher than that for controls. We observed mostly linear trends, increasing for casesparticularly in general practice contactsand flat for controls. Two exceptions were emergency department contacts and emergency hospital admissions, which exhibited a sharp increase in the weeks before the index date.
The continuous follow-back representation for mental health and self-harm contacts can be seen in supplementary Fig. 2. The frequency of cases with mental health contacts in the d days before the index date decayed linearly first and abruptly close to the index date compared with controls, and the frequency of cases with mental health contacts in the week starting d days before the index date had the equivalent upward behaviour. At any given week in the      Fig. 1 Rate of people (ppl) who died by suicide (cases) and controls with any type of contact at each healthcare setting in the 12 months before the index date (the date of death or the start date of a healthcare contact during which the death occurred). Contacts in the 1-365 days before the index date (IDX) (top) and in the week starting 7-365 days before the index date (bottom). Columns correspond to contacts with any setting (Any), primary care/general practice (GP), emergency department (ED), emergency hospital admissions (H-E), planned hospital admissions (H-P) and out-patients (OP). Graphs outside and inside the shaded area share y-axis limits. P-values correspond to conditional logistic regression adjusted for deprivation.
Contacts with primary and secondary healthcare prior to suicide year before the index date, the frequency of cases with a mental health contact was higher than that for controls. The frequency of cases with self-harm contacts in the d days before the index date decayed mostly linearly, and the frequency of cases with self-harm contacts in the week starting d days before the index date was flat until peaking in the weeks before the index date. In this case, the difference between the frequencies for cases and controls with a selfharm contact at any given week in the year before the index date was not always statistically significant.

Sensitivity analysis
Of the study population, 4091/5130 (79.7%) had their deaths coded as intentional self-harm/suicide (ICD-10 codes X60-84) and 1039/ 5130 (20.2%) were 'deaths of undetermined intent' (Y10-34, Y87 and Y87.2; excluding Y33.9 before 2007). A sensitivity analysis including only those who died by suicide showed no significant differences to any of our findings using the full study population. Supplementary Table 8 shows the demographics for the full sensitivity study population and for those with data coverage across all settings (equivalent to supplementary Table 4). Supplementary Table 9 shows the type of healthcare setting contacted before the index date for the fully linked sensitivity study population across healthcare settings (equivalent to Table 3).

Discussion
We found high frequencies of contact with healthcare services in those who died by suicide, particularly in close proximity to their death. Almost four out of five of those who died by suicide had contact with healthcare services in the month before their death. As close as 1 week before, almost one in three had a contact with healthcare services, a rate twice that for the general population. The majority of these contacts were in general practice settings: 26% of cases had a general practice contact in the week before they died. A general practice setting was also the most common last point of contact (for 71% of cases). Males consistently had fewer contacts than females across all settings, but still three-quarters of males who died by suicide had at least one healthcare contact in the month before they died. Conversely, OR estimates for females with healthcare contacts were generally higher than for males in comparison with the general population across all settings and time points. Thus, females show a larger change in healthcare contact patterns during a crisis than males.
Our longitudinal analysis by week showed that those who died by suicide were more likely to contact healthcare services in any given week in the year before their death than the general population. The likelihood of contact increased with time closer to their death. This was particularly marked for emergency department contacts and emergency hospital admissions, whose likelihood of contact increased dramatically in the weeks before the index date. This may reflect the well-recognised increase in risk of suicide seen in the period shortly after hospital attendance for selfharm. 17 At earlier time points, many contacts represent repeated visits (i.e. not the last visit before the index date), except for elective hospital admissions, as evidenced by the comparison between the cumulative and weekly graphs. There does appear to be an escalating build-up of help-seeking contacts over time leading to an acute crisis. Cues flagging those at risk of suicide seem to accumulate in the year before they die by suicide, predominantly in the weeks before such crisis.
We found that the association between risk of suicide and mental health diagnoses, alcohol misuse, drugs misuse and selfharm was stronger in secondary care settings, particularly the emergency department and hospital. This is possibly related to the severity of such contacts. For example, even though self-harm emergency hospital admissions were rare events, they were almost 100 times more likely in cases than in controls. However, 'injury and poisoning' and 'accidental hanging and poisoning' in hospital admissions may potentially be miscoded, resulting in an underestimation of self-harm contacts. Over 1 in 4 of those who took their own lives attended emergency departments because of injury or poisoning in the previous year.

Comparison with other studies
Our estimates related to contacts with services were similar to those found in the literature since 1975. [4][5][6][7][8]18 Differences in the type, coverage and quality of the data used and in the way the same variables are defined, as well as social and demographic differences, may affect results and explain any variability. Previous studies have highlighted general practice as a point of contact in the year before death by suicide for many patients (range 49-92%) but this focus on general practice neglects contacts with other sectors of the healthcare system and is lacking in the comprehensive assessment of healthcare contacts in our study. 4,5 These high levels of contact in part reflect the high levels of contact that these patients have with general practices, and our study puts these contacts into context by comparison with general population controls. An increase in the likelihood of contact closer to death in those who die by suicide was suggested previously, but no comparison was made with contact patterns in the general population. 19 Our finding that 41% of those who died by suicide were in contact with an emergency department in the year before their index date is consistent with Gairin et al's, 20 potentially indicating little improvement in the management of those presenting in this setting since 1997. The association between risk of suicide and mental health diagnoses, alcohol misuse, drugs misuse and self-harm has been extensively reported elsewhere, generally on the basis of analysis of single healthcare settings. 21,22 Strengths and limitations Linking data at a person level across healthcare settings and performing a time-continuous analysis, we have been able to present a detailed picture of the type and pattern of health service contacts in the year before their death for those who died by suicide, compared with general population controls, in routinely collected administrative data covering a whole population over 17 years. To reduce bias, controls were matched on gender and week of birth and alive at the time of death of the case. By linking to demographic data, we adjusted our results for deprivation. The demography of Wales is characterised by relatively high levels of deprivation and population sparsity compared with other parts of the UK. 23 These factors are known to affect access to services and mental health outcomes. Having said that, our findings on contacts with healthcare settings were similar to studies conducted in other regions. 5 The size of our study allowed us to look at male and female contacts separately.
We identified and removed from the analysis any healthcare contact where the individual died during that contact or during a resulting admission. Most published studies use death date as the index date, which may bias results. 4,5 For example, individuals who die during a 1-month hospital stay cannot contact a general practice, emergency department or out-patients in that period, thus artificially lowering the rate for these settings in the month before the index date. Similarly, if a diagnosis is recorded for the first time during the contact leading to death, it may not be correct to consider that diagnosis as a risk factor, since it would have presented after the last opportunity for intervention (outside in-patient suicide prevention factors). Thus, our definition of index date represents the last date at which patients had an opportunity to contact any healthcare service. However, we do note that during an admission, healthcare services have an opportunity to identify those at risk of suicide on the basis of history of previous contacts with such services.
Limitations of the use of routinely collected data for research purposes have been reported elsewhere. 12,24 We reduced misclassification bias by using validated code lists, developed and updated with the help of expert clinicians to identify our study cohort and outcomes of interest. The use of a case-control study design where both groups experienced the same ascertainment issue somewhat alleviated missing variables and missing data biases.
Since secondary care and other contacts are communicated to general practices, we were unable to guarantee that only face-toface or telephone general practice contacts were included in the analysis. This is similar to other studies of this type 25 and may have inflated results of contacts in general practice settings. We alleviated this by excluding administrative codes such as 'letter from emergency department' or 'patient seen in emergency department' and associated diagnoses, keeping telephone and face-to-face contacts with any member of the general practice team.
Health data coverage was not always available for the whole study population or study period. We circumvented this limitation by running independent analyses with each of the data-sets (health settings). All subpopulations based on data coverage limitations in the linked data-set had comparable demographic distributions to the full population, implying that results were generalisable.

Implications for research, policy and practice
This study provides an opportunity to identify better strategies for suicide prevention by highlighting the importance of patients' patterns of contacts with services. We may be missing opportunities to help those at risk that exist for over a year before they die. We have highlighted the need for general practices, who are often the last point of contact, to consider their patients' contacts with other health services as part of their assessment. In the UK, contacts with secondary care services are notified to general practices. While general practice has the potential to support those at risk of suicide through therapeutic conversations and suicide risk assessment there are challenges that should be acknowledged in this setting. These include time constraints, workload, training and a lack of integration with specialist mental health services and broader public health suicide prevention initiatives. Addressing these barriers, given the importance of this setting as a point of contact among those who go on to take their own lives, is vital to promote effective enhanced system-level approaches. 25 It does appear that help-seeking occurs in those at risk of suicide and escalates, particularly in the weeks before death and in females. Although patients do not always disclose suicidal ideation or mental health problems, there are markers that should be acted on, such as a previous suicide attempt, sleep disturbance and chronic pain. This study highlights the importance of evaluating patients following emergency department or hospital discharge, particularly when for mental health-related problems, self-harm, alcohol or substance misuse, and of ensuring follow-up. General practice contacts and emergency hospital admissions due to alcohol and drugs misuse were particularly associated with risk of suicide in females, and intervention with females presenting to services with these problems at scale may have a proportionate impact on suicide prevention efforts.
Despite these existing cues, identifying those at risk of suicide is complex. Predictive models and tools such as those used in other specialties 26 or using traditional epidemiological techniques are not powerful enough in this context. 27 There may be promise in exploring advance machine-learning techniques to help progress our understanding of suicide, identifying novel risk factors and/or new interaction models. 28 These techniques could also result in clinical decision support tools, which may help suicide prevention efforts, especially in general practice settings. Given the low incidence of suicide, even in clinical populations, predicting outcomes is likely to be an unrealistic goal. However, these machine-learning-based strategies may be a useful adjunct to clinical management. 29 Health professionals without mental healthcare training may not routinely ask about suicidal thoughts even with patients who have a history of attempted suicide, 30 and raising awareness of suicide risk and improving training of such staff may help them to ask these questions, put safety plans in place and signpost patients to other services. These opportunities for suicide prevention highlight the importance of adherence to guidance following presentation to services with self-harm, 31 particularly comprehensive psychosocial assessments, supported by initiatives such as the National Collaborating Centre for Mental Health's core competency frameworks for self-harm, 32 creating a core curriculum for health service staff.