Identification of Health Conditions in Unstructured Health Records with Deep Learning-Based Natural Language Processing
Authors: Lin Jake , Korpi Tomi , Kuukka Anna , Tirkkonen Anna , Kariluoto Antti , Kaijansinkko Juho , Satamo Maija , Pajulammi Hanna , Haapanen Markus J. , Häyrynen Sergei , Pursiainen Eetu , Ciovica Daniel , von Bonsdorff Mikaela B. , Jylhävä Juulia 
Published: October 2024

Importance

Many clinically significant health conditions are frequently underreported, underdiagnosed or recorded only in unstructured textual health records, yet they contain critical information for patient assessment, care and prognosis.

Objective

To determine whether deep learning-based natural language processing employed for named entity recognition can effectively identify health conditions, such as incontinence, falls, mobility limitations and loneliness in unstructured textual electronic health records. The identified conditions were further used to predict all-cause mortality.

Design

This cohort study utilized electronic health records from public primary, secondary, tertiary, long-term and home care from 2010 to 2022, providing up to 12 years of follow-up. The named entity recognition task to identify incontinence, falls, mobility limitations, and loneliness was implemented using Google’s Bidirectional Encoder Representations from Transformers deep learning model pre-trained for the Finnish language. Diagnostic codes for incontinence and falls were collected for comparisons.

Setting

Retrospective electronic health records across the Central Finland wellbeing services county.

Participants

Structured summary data and 10.6 million free-text entries from 102,525 patients aged 50 to 80 years at baseline.

Exposure

Incontinence, falls, mobility limitations and loneliness were considered as exposures.

Main Outcomes and Measures

The performance of the named entity recognition models was evaluated by precision, recall and F1 scores benchmarked against human ratings. Cox regression models were used to assess and compare NER- and diagnostic code-identified falls and incontinence onsets in predicting all-cause mortality.

Results

The deep learning model demonstrated excellent performance with recall, precision and F1 scores of 0.86, 0.88, and 0.87 for falls; 0.84, 0.78, and 0.81 for incontinence; 0.86, 0.84, and 0.85 for mobility limitations and 0.91, 0.84, and 0.87 for loneliness, respectively. Compared to diagnostic codes, named entity recognition identified greater numbers of falls (31987 vs 4090) and incontinence (7059 vs 3873) onsets and yielded greater hazard ratios: 1.31 vs 1.04 for falls and 1.99 vs 0.65 for incontinence.

Conclusions and Relevance

Deep learning-based named entity recognition models reliably identified incontinence, falls, loneliness and mobility limitations in free-text medical records, presenting new opportunities to use unstructured clinical data to identify vulnerable patients and apply the method in research applications.

KEY POINTS

Question

Can deep learning-based natural language processing (NLP) identify health conditions, such as incontinence, falls, mobility limitations and loneliness in unstructured electronic health records (EHRs)?

Findings

The results of this cohort study demonstrate that a deep-learning NLP model can effectively identify incontinence, falls, mobility limitations and loneliness in textual EHR data. This approach also results in improved mortality prediction compared to available diagnostic codes.

Meaning

NLP approaches could be used to identify underreported and underdiagnosed health conditions in textural EHR data, enabling identification of vulnerable and at-risk patients.