Identifying Mentions of Pain in Mental Health Records Text: A Natural Language Processing Approach

Stud Health Technol Inform. 2024 Jan 25:310:695-699. doi: 10.3233/SHTI231054.

Abstract

Pain is a common reason for accessing healthcare resources and is a growing area of research, especially in its overlap with mental health. Mental health electronic health records are a good data source to study this overlap. However, much information on pain is held in the free text of these records, where mentions of pain present a unique natural language processing problem due to its ambiguous nature. This project uses data from an anonymised mental health electronic health records database. A machine learning based classification algorithm is trained to classify sentences as discussing patient pain or not. This will facilitate the extraction of relevant pain information from large databases. 1,985 documents were manually triple-annotated for creation of gold standard training data, which was used to train four classification algorithms. The best performing model achieved an F1-score of 0.98 (95% CI 0.98-0.99).

Keywords: Natural language processing; electronic health records; mental health; pain; transformers.

MeSH terms

  • Algorithms
  • Databases, Factual
  • Humans
  • Mental Health*
  • Natural Language Processing*
  • Pain