{'fraction_non_alphanumeric': 0.0376657824933687, 'fraction_numerical': 0.036942367976850736, 'mean_word_length': 4.9347452776187755, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Timeline of pain before dementia diagnosis: a 27-year follow-up study

Supplemental Digital Content is Available in the Text. This study with repeated pain measures collected over 27 years suggests that pain is a correlate or prodromal symptom rather than a cause of dementia.


Introduction
Permanent structural changes in brains of those with chronic pain 2,7,11,25 resemble that seen in neurodegenerative diseases such as dementia. 3 Pain dimensions, namely sensorydiscriminative, cognitive-evaluative, and affective motivational, are known to activate a wide network of brain regions. 13,19 It is likely that there is an overlap in structural brain changes in chronic pain and dementia. Chronic pain affects cognitive, mood, and mental status 6,10 and is also a feature of dementia. 8,12 However, the long-term association between pain and dementia remains unclear; pain could be a cause, correlate, or a prodromal feature of dementia.
Associations of pain or painful chronic conditions with cognitive decline 5,[20][21][22]28,29 and dementia have been documented in several studies 9,15,27,33,36,37,39 ; however, few studies have examined the temporal nature of this association, and the evidence is inconsistent. Most aforementioned studies were conducted amongst older populations and had less than 5-year mean follow-up. Given that dementia is characterized by a preclinical period lasting 15 to 20 years, 24 it is possible that previous findings were affected by reverse causation whereby the observed association is primarily due to increase in pain in the preclinical period of dementia.
Accordingly, our objective was to examine the temporal association between pain scores, composed of pain interference and pain intensity, and incident dementia using time-to-event analysis with mean duration between pain assessment and dementia diagnosis varying from 25 to 3.2 years. Complementarily, we characterized pain trajectories, in almost 3 decades preceding dementia diagnosis and compared them with those observed among persons free of dementia during the same period.

Study population
The Whitehall II study is an ongoing population-based cohort started in 1985 among 10308 British civil servants (6895 men and 3413 women), aged 35 to 55 years. Data collection involves Sponsorships or competing interests that may be relevant to content are disclosed at the end of this article. questionnaires on health behaviors, physical and mental wellbeing every 2 to 3 years, and clinical examinations including anthropometric measures and health-related parameters every 4 to 5 years until the most recent examination in 2015 to 2016. Participants' written, informed consent and research ethics approval are renewed at each contact; the most recent approval was from the National Health Service London-Harrow Research Ethics Committee, reference number 85/0938.

Pain
Pain was assessed using the "bodily pain scale" of the Short-Form 36 (SF-36) questionnaire on 9 occasions since its introduction to the study in 1991 to 1993 (in 1995, 1997-1999, 2001, 2002-2004, 2006, 2007-2009, 2012-2013, and 2015-2016). SF-36 assesses quality of life based on 8 scales 35 (vitality, physical functioning, bodily pain, general health, physical role functioning, emotional role functioning, social role functioning, and mental health) of which the bodily pain scale has been used for assessment of pain in previous studies. 9 The bodily pain scale is composed of 2 questions that assess pain intensity and pain interference "over the past 4 weeks." Intensity measurement ranges from none (scored 100), very mild (scored 80), mild (scored 60), moderate (scored 40), severe (scored 20) to very severe (scored 0). Similarly, interference measurement ranges from not at all (scored 100), a little bit (scored 75), moderately (scored 50), quite a bit (scored 25) up to extremely (scored 0). Total pain is calculated by averaging the pain intensity and interference scores. To ease interpretation, the usual scoring was reversed such that higher scores on pain intensity, pain interference, and total pain indicated higher pain levels. The following 3 continuous pain measures were used: "total pain," "pain intensity," and "pain interference." We also categorized these measures into 2 groups: "moderate to severe" and "mild or no" pain.

Incidence of dementia
Dementia was ascertained by linkage to 3 electronic health records: Hospital Episode Statistics, Mental Health Services Data Set, and mortality register up to the March 31, 2019, using a unique National Health Service identifier for each individual. Dementia cases were identified based on ICD-10 codes F00, F01, F02, F03, F05.1, G30, G31.0, G31.1, and G31.8 (Table S1, http://links.lww.com/PAIN/B185); the date of diagnosis was set at the first record of disease in these databases. The sensitivity and specificity of dementia diagnosis in Hospital Episode Statistics data has been reported to be 78.0% and 92.0%. 26 Additional use of Mental Health Services Data Set in our study is likely to improve sensitivity of dementia diagnosis. 38

Covariates
Sociodemographic factors included age, birth cohort (in 5 year bands), sex, ethnicity (white and nonwhite), education (less than primary school, lower secondary school, higher secondary school, university, and higher university degree), and marital status (married/cohabiting and others) at the time of pain evaluation. Questionnaire data, electronic health records, or clinical examinations over the follow-up were used for the following health conditions: (1) a multimorbidity index comprising coronary heart disease, stroke, chronic obstructive pulmonary disease, cancers (except nonmelanoma skin cancers), type 2 diabetes, osteoarthritis and rheumatoid arthritis, Parkinson disease, and obesity (based on the body mass index $ 30 kg/m 2 ); (2) depression based on electronic health records and use of antidepressants; and (3) pain medication based on use of analgesic and antirheumatic medications.

Statistical analysis
Characteristics of the study population as a function of dementia status at the end of the follow-up were compared using Pearson x 2 and analysis of variance tests. Then 2 sets of analysis were performed, as described below.

Time-to-event analysis
We used Cox regression to assess the association between pain (separately for continuous and dichotomised scores) measured in 1991 to 1993 wave and incident dementia. These analyses were repeated with pain measurements drawn from waves 1997 to 1999, 2003 to 2004, 2008 to 2009, 2012 to 2013, and 2015 to 2016 to assess whether the length of the follow-up had an impact on observed associations. Participants were censored at dementia diagnosis, death, or March 31, 2019, whichever came first. Age was used as the timescale, and analysis was stratified on birth cohort and initially adjusted for sex, ethnicity, marital status, and education (model 1), then also for multimorbidity index, depression, and pain medication use at the time of pain measurement (model 2). Analyses were undertaken using pain as a continuous (10-point increase) and a dichotomous measure ("moderate to severe" pain vs "mild or no pain").

Retrospective analysis of 27-year pain trajectories
This analysis aimed at comparing individual pain trajectories in dementia cases with noncases among the study population. We used mixed linear models with continuous pain variables as the dependent variables and a backward timescale, such that index date (date of dementia diagnosis for cases and the earliest of March 31, 2019, or date of death for noncases) was year 0, and pain measures were modeled from year 0 to year 227. Similar analyses were undertaken for dichotomized pain measures ("moderate to severe" vs "mild or no" pain) using mixed logistic models. Mixed models have the advantage to use all available data over the follow-up, handle differences in length of follow-up, and account for the correlation of the repeated measures on the same individual. Cubic spline regression curves based on mixed models suggested the use of time, time 2 , and time 3 terms (slope terms) to model nonlinear changes in pain trajectories (see Figures S1 and S2 in the supplement, available at http://links. lww.com/PAIN/B185). Random effects for the intercept and time allowed individual differences in the pain score at intercept (year 0) and change in pain over time. Analyses were adjusted for age at year 0, sex, education, ethnicity, marital status, dementia status, the terms for slope, interaction between these covariates and the terms for slope, and for birth cohort (model 1). The analyses were then also adjusted for pain medication use, multimorbidity index, and depression at the time of pain measurement (model 2). The beta associated with the dementia term yielded the difference in pain at year 0 between dementia cases and noncases. The interaction term between dementia and slope terms denoted whether change in pain over the previous 27 years differed by dementia status. The differences in pain between cases and noncases for each of the 27 years of the follow-up were estimated using the MARGINS commands in STATA. All analyses were performed using STATA 15.1(64-bit). All resulting P-values were two-tailed, and a P value # 0.05 was considered significant.
Amongst the 9046 study participants, 567 developed dementia at the mean age of 77.0 (SD 5 5.9) years over the mean 25 years of follow-up, and 56.1% of these cases were diagnosed in the last 5 years of follow-up. Table 1 shows that dementia cases were more likely to be older (mean age 5 55.8 vs 50.3 years, P , 0.001), women (39.5% vs 30.9%, P , 0.001), less likely to be white (86.4% vs 91.0%, P , 0.001), to have university education (21.0% vs 27.5%, P , 0.001), and presented more often with chronic diseases (23.8% vs 15.9%, P , 0.001) and depression (4.8% vs 3.1%, P 5 0.03). Dementia cases also had higher mean pain scores at first wave of pain measurement (19.4 vs 15.7 for total pain, P , 0.001) which became larger at the last wave of pain measurement ( Table 1). On average, 6.9 pain measures were recorded in noncases and 5.8 in dementia cases. There was no evidence of sex differences in associations of pain with dementia (P interaction . 0.07) leading us to combine both sexes in the analysis. Table 2 shows results from Cox regression for the associations of continuous and dichotomized pain score measures recorded at 1991 to 1993, 1997 to 1999, 2003 to 2004, 2007 to 2009, 2012 to 2013, and 2015 to 2016 waves with incident dementia, using a mean follow-up of 25.0, 19.6, 14.5, 10.0, 6.2, and 3.2 years, respectively. In analysis not adjusted for health conditions (model 1), the continuous pain interference was associated with increased hazard ratio (HR) of dementia, irrespective of the length of the follow-up (time between pain assessment and date of dementia diagnosis or end of follow-up for noncases). In the fully adjusted analyses (model 2), the association remained only when the mean follow-up was 10 years (HR per 10-point increase 5 1.06; 95% CI [confidence intervals]: 1.01-1.11; P 5 0.03) or less. The association between the dichotomized pain measures and dementia strengthened as the follow-up became shorter; when mean follow-up was 3.2 years, total pain (HR 5 2.17; 95% CI: 1.40-3.38; P 5 0.001), pain intensity (HR 5 1.59; 95% CI: 1.01-2.50; P 5 0.05), and interference (HR 5 2.57; 95% CI: 1.61-4.09; P , 0.001) were all associated with dementia in fully adjusted analyses.

Pain trajectories over 27 years of follow-up
Pain trajectories over the 27-year follow-up differed between dementia cases and noncases (Figure 1 for fully adjusted model, and Figure S4 for model 1, http://links.lww.com/PAIN/B185) as shown by significant interaction between dementia status and slope terms for total pain (P interaction 5 0.004) and pain interference (P interaction , 0.001). In fully adjusted analyses (model 2, Table 3; corresponding results for Model 1 in Table S3, http:// links.lww.com/PAIN/B185), dementia cases had higher total pain scores than noncases starting 16 years before diagnosis (difference 5 1.4, 95% CI: 0.1-2.7; P 5 0.04, corresponding to 7% of an SD of the total pain score). Difference in the pain score increased steadily to reach 5.5 (95% CI: 2.5-8.4; P , 0.001) at dementia diagnosis (year 0), corresponding to 28% of SD of the total pain score. These differences were driven primarily by the pain interference component, where differences between cases and noncases began at year 216 and increased to reach 8.0 (95% CI: 4.8-11.2; P , 0.001) at dementia diagnosis (year 0). Differences in pain intensity were confined to the 7 years before Table 1 Characteristics of participants as a function of dementia status at the end of follow-up* (March 31, 2019).    Table 3). Analyses of 27-year trajectories of the probability of "moderate to severe" pain in fully adjusted analyses are shown in Figure S5, estimates shown in Table S4

Discussion
This longitudinal study with repeated pain measures collected over 27 years suggests steady progression in self-reported pain before dementia diagnosis. Time-to-event analysis, where data on pain measures over the course of the study were used to assess the impact of the length of follow-up on the association between pain and incident dementia, showed the association to be evident only when the mean follow-up was 10 years or lower. The use of backward pain trajectories describes how small differences in pain scores between dementia cases and noncases become increasingly pronounced in the decade before diagnosis of dementia. Taken together, these results highlight the time-dependent association between pain and dementia; given the long preclinical phase of dementia, there is no strong evidence from our results that pain is a causal risk factor for dementia. Several previous studies have examined the association between pain and cognitive outcomes, some 5,18,20-22,28-30 but not all studies 20,32 have suggested pain to be associated with impairment of cognitive domains such as attention, working Differences in the pain score between dementia cases and noncases in the 27 y preceding dementia diagnosis in fully adjusted analysis.  37 reported faster 12-year memory decline and increase in the dementia probability score among individuals with 2-year moderate to severe persistent pain. A systematic review and meta-analysis of longitudinal studies with a follow-up ranging 2.75 to 11.8 years found no association between persistent pain and incident cognitive decline/dementia, but stratification of studies based on follow-up period revealed an association when follow-up was shorter than 4.5 years. 1 Cognitive decline has also been shown to affect pain perception, 16 suggesting the need for closer attention to temporal framework in analysis of pain as a risk factor for dementia. Pain 9 and chronic painful conditions such as fibromyalgia, 27 osteoarthritis, 36 and headache 33 have been found to be associated with risk of dementia. Few studies examine both the associations of pain intensity and pain interference, one such study with a 4-year mean follow-up found pain interference rather than intensity to be associated with dementia. 9 Other studies show pain interference, irrespective of the site 39 or nature of painful disease 15 to be associated with dementia risk. Our results also show pain interference rather than pain intensity to be the driver of observed associations between pain and dementia. Affective and cognitive domains of pain 13 are likely to determine subjective experience of pain interference. 4 These pain domains are affected early in dementia-related neurodegeneration, 23 underlying the emergence of pain interference in the preclinical phase of dementia. In agreement, the association between pain interference and incident dementia was observed earlier than the association between pain intensity and dementia in this study. Nonetheless, the association needs to be interpreted with caution because limitations in daily activities, irrespective of pain, emerge in the decade preceding diagnosis. 31 Some authors suggest pain interference and limitations in daily activities as distinct domains 17 ; thus, increase in pain interference and limitations in daily activities might be 2 different features observed in the dementia preclinical period.
To the best of our knowledge, this is the first study to investigate the role of time in the association between pain and dementia. An important feature of this analysis is the construction of retrospective backward trajectories of pain spanning 27 years before dementia diagnosis allowing progressive change in pain to be tracked. Most previous studies used a mean follow-up of less than 5 years with pain assessed only at baseline, ignoring the time varying nature of pain. Our study, by combining findings from both backward trajectories and Cox regression models repeated at varying time points with mean follow-up ranging from 3 to 25 years, permits a more comprehensive analysis of the timeline of the association between pain and dementia in its preclinical phase.
There are several possible explanations for the observed progression of pain before dementia diagnosis. One, pain could be a causal risk factor for dementia. Chronic pain-induced chronic stress 14 through cortisol dysfunction 14 and neuroglial inflammation 14,20 can disrupt neuronal environment, accelerating neurodegenerative processes. However, differences in pain scores observed 16 years before dementia diagnoses between dementia cases and noncases in the backward trajectory models were negligible (around 1.4) when compared with the minimal clinically important difference of 4.9 suggested for rheumatoid arthritis. 34 Cox regression adjusted only for sociodemographic factors showed an association between pain interference and incidence of dementia, but further adjustment for health conditions attenuated associations except when the time between pain measures and dementia diagnosis was 10 years or less. These findings suggest that pain is not an independent, causal risk factor for dementia. Two, pain could be a preclinical symptom of dementia. Brain structures involved in motivationalaffective and cognitive-evaluative pain processing are affected early in dementia-related neurodegeneration, 12,23 underpinning the longer-term association between pain interference and dementia. Three, pain and dementia may have common causes as both share pathophysiological mechanisms within the brain. 3 Figure 1. Twenty-seven-year trajectories of pain, using continuous measures, before dementia diagnosis.
Noncase; case. Estimated from linear mixed models adjusted for age at year 0, sex, education, ethnicity, marital status, dementia status, slope terms (time, time 2 , and time 3 ), interaction of these covariates with slope terms, birth cohort, pain medication use, multimorbidity index, and depression assessed at the time of pain measurement. Estimates came from Margins command in STATA. Higher scores correspond to higher pain.
May 2021 · Volume 162 · Number 5 www.painjournalonline.com Limitations of this study include lack of data on the characteristics, type, and location of pain. The specific chronic conditions that contributed to the association between pain and dementia could not be examined in sufficient detail. Our multimorbidity index included a range of conditions to reflect overall disease burden; it is possible that some of these play a more important role than others. Finally, as dementia diagnosis was based on electronic health records, we did not have complete information on type or severity of dementia. This method might miss milder dementia, but it has the advantage of providing data on dementia for all participants recruited to the study rather than those who consent to face-to-face assessment of dementia status over the follow-up.

Conclusion
Dementia is a major challenge for social and health care because of aging of populations, highlighting the need to better understand the course of dementia, associated symptoms, and risk factors for effective preventive strategies. We found pain to increase rapidly in the preclinical period of dementia such that association of pain with dementia became stronger when assessed closer in time to dementia diagnosis. These findings suggest that pain is a prodromal symptom of dementia or both share common causal mechanisms rather than an important contributor to risk of dementia. Between pain intensity and pain interference, it was the latter that had a stronger association with dementia highlighting the need for better management of pain in older adults.