Jove
Visualize
Contact Us
JoVE
x logofacebook logolinkedin logoyoutube logo
ABOUT JoVE
OverviewLeadershipBlogJoVE Help Center
AUTHORS
Publishing ProcessEditorial BoardScope & PoliciesPeer ReviewFAQSubmit
LIBRARIANS
TestimonialsSubscriptionsAccessResourcesLibrary Advisory BoardFAQ
RESEARCH
JoVE JournalMethods CollectionsJoVE Encyclopedia of ExperimentsArchive
EDUCATION
JoVE CoreJoVE BusinessJoVE Science EducationJoVE Lab ManualFaculty Resource CenterFaculty Site
Terms & Conditions of Use
Privacy Policy
Policies

Related Experiment Video

Updated: Jun 3, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
07:31

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack

Published on: May 15, 2020

Detection of Self-Harm in Electronic Mental Health Records Using Privacy-Preserving Local Language Models:

Andrey Kormilitzin1,2, Dan W Joyce3,4,5, Apostolos Tsiachristas1,2,6

  • 1Department of Psychiatry, University of Oxford, Warneford Hospital, Warneford Lane, Oxford, England, OX3 7JX, United Kingdom, 44 01865305337.

JMIR Mental Health
|June 2, 2026
PubMed
Summary

Related Concept Videos

You might also read

Related Articles

Articles linked to this work by shared authors, journal, and citation graph.

Sort by
Same author

Accuracy of administrative data in ascertaining health conditions: a systematic review.

JAMIA open·2026
Same author

University student mental health research: look back to move forward.

BJPsych open·2026
Same author

A socially assistive robot to support mental wellbeing in LGBTQ+ young people at risk of self-harm: a randomized controlled trial.

Nature medicine·2026
Same author

Blood biomarkers to improve dementia diagnostic accuracy: a cross-sectional analysis.

BMC geriatrics·2026
Same author

From early intervention in psychosis to intensive care: correlates of restrictive psychiatric practice in a national retrospective cohort study.

The British journal of psychiatry : the journal of mental science·2026
Same author

Automating thematic review of prevention of future deaths reports: concordance study of a child-suicide analysis using large language models.

BMJ mental health·2026
This summary is machine-generated.

A privacy-preserving language model accurately identified self-harm events in electronic health records. This demonstrates the feasibility of using advanced AI for sensitive mental health data within secure systems, improving suicide risk assessment.

Area of Science:

  • Artificial Intelligence in Healthcare
  • Natural Language Processing for Clinical Data
  • Mental Health Informatics

Background:

  • Self-harm is a critical predictor of suicide and a key metric in mental health care.
  • Routinely collected clinical data often lacks precise self-harm information due to unstructured text formats.
  • Contemporary language models offer potential for analyzing clinical notes but raise data governance concerns.

Purpose of the Study:

  • To evaluate a privacy-preserving language model for accurate self-harm detection and timing within the UK National Health Service (NHS) secure infrastructure.
  • To assess the model's performance using electronic health records from secondary mental health care.
  • To determine if local deployment can overcome data governance challenges.

Main Methods:

Keywords:
Gemma3Ollamaelectronic health recordslarge language modelsprivacyself-harmtemporal information extraction

Related Experiment Videos

Last Updated: Jun 3, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
07:31

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack

Published on: May 15, 2020

  • Utilized a multistage workflow involving a random sample of 1000 patients with psychiatric diagnoses from Oxford Health NHS Foundation Trust.
  • Employed a Gemma3-4b model for initial candidate note flagging, followed by expert annotation of 1352 notes for self-harm presence and timing.
  • Compared a privacy-preserving 27-billion-parameter Gemma 3 language model (Gemma3-27b) against a RoBERTa baseline classifier, evaluating performance using precision, recall, and F1-score.

Main Results:

  • Gemma3-27b outperformed the RoBERTa classifier, achieving an F1-score of 0.92 for notes with self-harm and 0.97 for notes without.
  • For recent self-harm detection, Gemma3-27b achieved an F1-score of 0.79.
  • The global weighted F1-score for Gemma3-27b was 0.88, compared to 0.85 for RoBERTa.

Conclusions:

  • A Gemma3-27b language model, with prompt development but no fine-tuning, matched or surpassed a fine-tuned RoBERTa classifier in identifying self-harm events and timing.
  • Improvements were most significant in challenging, lower-frequency timing categories.
  • This study confirms the technical viability of privacy-preserving self-harm detection within secure NHS research environments.