Applying machine learning on health record data from general practitioners to predict suicidality
- PMID: 32944503
- PMCID: PMC7481555
- DOI: 10.1016/j.invent.2020.100337
Applying machine learning on health record data from general practitioners to predict suicidality
Abstract
Background: Suicidal behaviour is difficult to detect in the general practice. Machine learning (ML) algorithms using routinely collected data might support General Practitioners (GPs) in the detection of suicidal behaviour. In this paper, we applied machine learning techniques to support GPs recognizing suicidal behaviour in primary care patients using routinely collected general practice data.
Methods: This case-control study used data from a national representative primary care database including over 1.5 million patients (Nivel Primary Care Database). Patients with a suicide (attempt) in 2017 were selected as cases (N = 574) and an at risk control group (N = 207,308) was selected from patients with psychological vulnerability but without a suicide attempt in 2017. RandomForest was trained on a small subsample of the data (training set), and evaluated on unseen data (test set).
Results: Almost two-third (65%) of the cases visited their GP within the last 30 days before the suicide (attempt). RandomForest showed a positive predictive value (PPV) of 0.05 (0.04-0.06), with a sensitivity of 0.39 (0.32-0.47) and area under the curve (AUC) of 0.85 (0.81-0.88). Almost all controls were accurately labeled as controls (specificity = 0.98 (0.97-0.98)). Among a sample of 650 at-risk primary care patients, the algorithm would label 20 patients as high-risk. Of those, one would be an actual case and additionally, one case would be missed.
Conclusion: In this study, we applied machine learning to predict suicidal behaviour using general practice data. Our results showed that these techniques can be used as a complementary step in the identification and stratification of patients at risk of suicidal behaviour. The results are encouraging and provide a first step to use automated screening directly in clinical practice. Additional data from different social domains, such as employment and education, might improve accuracy.
Keywords: Electronic health records; General practice; Machine learning; Suicide.
© 2020 The Authors.
Conflict of interest statement
All authors declare no competing interests.
Figures
Similar articles
-
Predicting future suicidal behaviour in young adults, with different machine learning techniques: A population-based longitudinal study.J Affect Disord. 2020 Jun 15;271:169-177. doi: 10.1016/j.jad.2020.03.081. Epub 2020 Apr 18. J Affect Disord. 2020. PMID: 32479313
-
Predicting suicide attempt or suicide death following a visit to psychiatric specialty care: A machine learning study using Swedish national registry data.PLoS Med. 2020 Nov 6;17(11):e1003416. doi: 10.1371/journal.pmed.1003416. eCollection 2020 Nov. PLoS Med. 2020. PMID: 33156863 Free PMC article.
-
Identification of suicidal behavior among psychiatrically hospitalized adolescents using natural language processing and machine learning of electronic health records.PLoS One. 2019 Feb 19;14(2):e0211116. doi: 10.1371/journal.pone.0211116. eCollection 2019. PLoS One. 2019. PMID: 30779800 Free PMC article.
-
The use of machine learning in the study of suicidal and non-suicidal self-injurious thoughts and behaviors: A systematic review.J Affect Disord. 2019 Feb 15;245:869-884. doi: 10.1016/j.jad.2018.11.073. Epub 2018 Nov 12. J Affect Disord. 2019. PMID: 30699872
-
A systematic review of validated suicide outcome classification in observational studies.Int J Epidemiol. 2019 Oct 1;48(5):1636-1649. doi: 10.1093/ije/dyz038. Int J Epidemiol. 2019. PMID: 30907424
Cited by
-
Detection of primary Sjögren's syndrome in primary care: developing a classification model with the use of routine healthcare data and machine learning.BMC Prim Care. 2022 Aug 9;23(1):199. doi: 10.1186/s12875-022-01804-w. BMC Prim Care. 2022. PMID: 35945489 Free PMC article.
-
Leveraging data science to enhance suicide prevention research: a literature review.Inj Prev. 2022 Feb;28(1):74-80. doi: 10.1136/injuryprev-2021-044322. Epub 2021 Aug 19. Inj Prev. 2022. PMID: 34413072 Free PMC article. Review.
-
A systematic review of clinical health conditions predicted by machine learning diagnostic and prognostic models trained or validated using real-world primary health care data.PLoS One. 2023 Sep 8;18(9):e0274276. doi: 10.1371/journal.pone.0274276. eCollection 2023. PLoS One. 2023. PMID: 37682909 Free PMC article.
-
Opportunities, challenges, and requirements for Artificial Intelligence (AI) implementation in Primary Health Care (PHC): a systematic review.BMC Prim Care. 2025 Jun 9;26(1):196. doi: 10.1186/s12875-025-02785-2. BMC Prim Care. 2025. PMID: 40490689 Free PMC article.
-
Nudging General Practitioners to explore suicidal thoughts among depressed patients.BMC Prim Care. 2023 Apr 1;24(1):88. doi: 10.1186/s12875-023-02043-3. BMC Prim Care. 2023. PMID: 37005569 Free PMC article.
References
-
- Barak-Corren Y. Predicting suicidal behavior from longitudinal electronic health records. Am. J. Psychiatr. 2017;174(2):154–162. - PubMed
-
- Belsher B.E. Prediction models for suicide attempts and deaths: a systematic review and simulation. JAMA Psychiatry. 2019;76(6):642–651. - PubMed
-
- Breiman L. 2015. The randomForest Package.
LinkOut - more resources
Full Text Sources