Visual abstractsVisuals
ResearchJournal of Medical Internet Research · Sep 14, 2026

Temporal Analysis of Patient-Centered Sentiment in Clinical Notes for Patients With Mental Health Conditions: Retrospective Cohort Study

Morsy A, Peters CJ, Miller L, Zirikly A
Digital Health & AIAdult

Study type: Observational study: it can show a link, but not prove that one thing causes another.

Read the full paper free at PubMed Central ↗

Abstract

Background Clinical notes offer rich, longitudinal insights into patient health trajectories. However, existing clinical sentiment analysis primarily evaluates overall note tone rather than the patient's distinct perspective. This gap is particularly critical in mental health care, where patient-perspective sentiment closely correlates with severe clinical outcomes, including mortality. Objective This study aimed to characterize temporal sentiment trajectories and changes in mental health clinical notes. We are specifically interested in the problem from the patient perspective, as this can differ from the overall and the provider-perspective sentiment. Furthermore, we examine its association with postdischarge mortality to check if there is any correlation. Using large language models (LLMs) and lexicon-based methods, we compared and highlighted the strengths and weaknesses of both approaches. Methods We conducted a retrospective analysis of 16,447 clinical notes from 6,382 patients from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database, focusing on the Brief Hospital Course and Discharge Instructions sections for patients with ICD-10 (International Classification of Diseases, Tenth Revision) mental health diagnoses. Sentiment was labeled from 3 perspectives (patient, physician, and general) using 2 LLMs (DeepSeek-7B and Mistral-7B) and compared to lexicon-based tools (ClinSent-lexicon, TextBlob, and VADER [Valence Aware Dictionary and sEntiment Reasoner]). Temporal trends were quantified at the patient level using Kendall τ. Associations between sentiment patterns and mortality were assessed using independent-samples (Welch) t tests. Model performance was evaluated on a manually annotated subset (n=165) using precision, recall, and F1-score. Results Temporal sentiment trajectories showed substantial directional change among patients with multiple hospital admissions, with greater fluctuations in Discharge Instructions compared to Brief Hospital Course notes. Patient-perspective sentiment was more balanced, while physician and general perspectives were predominantly neutral. LLMs showed better alignment with patient-centered annotations than lexicon-based methods. Discharge-note sentiment trajectories were significantly more negative among patients who died within 30-90 days of discharge than among survivors across both LLMs. Conclusions Temporal sentiment analysis revealed section-dependent patterns in clinical narratives that partially reflected patient-perceived experience. LLM-based approaches improved alignment with patient-centered sentiment, although overall performance remained limited. These findings underscore the need for larger, more robust datasets and modeling strategies for clinical sentiment analysis.

Topics

Humans; Retrospective Studies; Mental Disorders; Large Language Models; Patient-Centered Care; Female; Male

DOI: 10.2196/96771 · PubMed: 42735402

Cite this article

Morsy A, Peters CJ, Miller L, Zirikly A. Temporal Analysis of Patient-Centered Sentiment in Clinical Notes for Patients With Mental Health Conditions: Retrospective Cohort Study. J Med Internet Res. 2026. doi:10.2196/96771

RIS (EndNote, Zotero, Mendeley)BibTeX

Spotted a mistake? Suggest a correction

Similar articles

J Am Geriatr Soc · Jul 21, 2026 · Guideline · Geriatrics

American Geriatrics Society issues recommendations for using generative artificial intelligence in older adult care

J Med Internet Res · Sep 30, 2026 · Research · Digital Health & AI

Automated Health Care Thematic Analysis Using a Multiagent Large Language Model: Algorithm Development and Evaluation Study

J Med Internet Res · Oct 7, 2026 · Research · Digital Health & AI

From Innovation to Impact: The CREATE Framework as a Blueprint for Large Language Model Adoption in Opioid Treatment Programs

J Med Internet Res · Sep 3, 2026 · Research · Digital Health & AI

Patient-Centered Summarization Framework for AI Clinical Summarization: Mixed Methods Study

Psychol Med · Jul 21, 2026 · Research · Psychiatry & Mental Health

Scalable, context-sensitive psychiatric assessment with large language models and brief diaries