Natural language processing of medical records: new understanding of suicide ideation by dementia subtypes

Several recent studies have identified that a recent diagnosis of dementia may be associated with increased risk of suicide ideation and behavior (Günak et al., 2021; Schmutte et al., 2021). It is unclear why a new diagnosis of dementia confers such risk, with possible explanations including distress associated with receiving a diagnosis with the implications that worsen with time and other factors such as psychiatric comorbidities that accompany the early phases of the illness. It may also be that preserved cognition relative to latter stages of dementia could, in some form, translate to increased likelihood of acting on suicidal thoughts by way of increased ability to plan and carry out suicidal behaviors. Thus, understanding the phenomenology of suicide in newly diagnosed dementia is a pressing area of research. Also, since the majority of data on diagnoses, dementia, and suicide risk derive from cohort studies, it is difficult to understand how suicide and dementia converge in the clinic setting. In this issue of International Psychogeriatrics, Naismith et al., (2022) investigate whether natural language processing (NLP) applied to free text in the Electronic Health Record (EHR) could add to the understanding of dementia and suicide risk. Naismith et al.’s (2022) study is notable both for its results as well as the means by which the results were derived. Key takeaways include that suicide ideation appears to be more commonly included in records of people with Lewy Body subtype and those with depression than in other subtypes such as vascular dementia. Interestingly, putative risk factors for ideation within dementia, such as hallucinations and agitated behavior, were not related to suicide ideation. From amethodological standpoint, the study provides an example of how NLP can be applied to timely research questions using the coded and freetext fields of the EHR.The free-text field in EHR is a “catch all” for information that cannot otherwise be captured by structured and coded fields. In the EHR, the free-text field serves as a tool to keep track of the health of patients while also serving as a channel of communication between healthcare providers. It may even be argued that much of the clinically actionable information exists within the free text—contextual narrative of risk factors, symptoms, treatments, and assessment of quality of life. A recent study estimates average amount of free text per consultation was 68.2 words, compared to only 3.9 coded words, suggesting great value can be derived from the noncoded free-text field (Millares Martin, 2021). This may be even more true for mental health and older patients in managed care as ailment-specific details may be heterogenous. As such, Naismith et al.’s inclusion of free-text data adds a great deal of more information than that might be extracted from coded data alone (e.g., billing codes or diagnoses). In understanding how NLP can support geropsychiatric research, it is important to understand its strengths and limitations. The free-text field (Wilton, 1991), as the name suggests, lacks the structure expected for automated processing. NLP is a subfield of artificial intelligence (AI) that strives to solve this problem. NLP has made considerable progress over the past decade including in healthcare. First, NLP systems are subject to a tradeoff— simplistic but transparent, or, sophisticated but difficult to assess the performance or perform replication (Naylor et al., 2021). The study (Naismith et al., 2022) derived associations between dementia subtypes and incidence of suicide ideation using NLP techniques on free-text fields. Using a relatively simple discoverable term matching method to identify records for suicide ideation while the diagnosis was identified based on coded fields, the study draws strength from both transparency and replicability. However, some clinical applications especially in mental health field may demand more complex models (Badal et al., 2021a; Badal et al., 2021b). Second, NLP system performance is not dependent not only on its own internal sophistication but also on the domain and the subject matter it is applied to. System performance depends upon language peculiarities such as possible overlap of terms with other diagnosis. To illustrate this point, a search on PubMed (White, 2020) reveals “ideation” is almost always used in context of suicide in medical terminology. In contrast, “inflammation” has many more contexts: immunity, hypertension, irritable bowel International Psychogeriatrics (2022), 34:4, 319–321 © International Psychogeriatric Association 2022