Predicting involuntary admission following inpatient psychiatric treatment using machine learning trained on electronic health record data
Open accessPublished version of a preprint
Abstract
Background: Involuntary admissions to psychiatric hospitals are on the rise. If patients at elevated risk of involuntary admission could be identified, prevention may be possible. Our aim was to develop and validate a prediction model for involuntary admission of patients receiving care within a psychiatric service system using machine learning trained on routine clinical data from electronic health records (EHRs). Methods: EHR data from all adult patients who had been in contact with the Psychiatric Services of the Central Denmark Region between 2013 and 2021 were retrieved. We derived 694 patient predictors (covering e.g. diagnoses, medication, and coercive measures) and 1134 predictors from free text using term frequency-inverse document frequency and sentence transformers. At every voluntary inpatient discharge (prediction time), without an involuntary admission in the 2 years prior, we predicted involuntary admission 180 days ahead. XGBoost and elastic net models were trained on 85% of the dataset. The models with the highest area under the receiver operating characteristic curve (AUROC) were tested on the remaining 15% of the data. Results: The model was trained on 50 634 voluntary inpatient discharges among 17 968 patients. The cohort comprised of 1672 voluntary inpatient discharges followed by an involuntary admission. The best XGBoost and elastic net model from the training phase obtained an AUROC of 0.84 and 0.83, respectively, in the test phase. Conclusion: A machine learning model using routine clinical EHR data can accurately predict involuntary admission. If implemented as a clinical decision support tool, this model may guide interventions aimed at reducing the risk of involuntary admission.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Machine learning approaches have previously been utilized to predict adverse mental health outcomes, including progression of schizophrenia and bipolar disorder and involuntary psychiatric admission.
“Machine learning approaches have previously been utilized to predict adverse mental health outcomes, including progression of schizophrenia and bipolar disorder [51] and involuntary psychiatric admission [52].”
From Factors associated with postpartum depression symptoms following antepartum hospitalization (2026) · cites this paper as [52]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
XGBoost: A Scalable Tree Boosting System
Chen, T., & Guestrin, C. (2016) · Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining · doi:10.1145/2939672.2939785 · Cited by 54,569 · see citing works
Hamilton, M. (1960) · Journal of Neurology, Neurosurgery & Psychiatry · doi:10.1136/jnnp.23.1.56 · Cited by 32,817 · see citing works
A Unified Approach to Interpreting Model Predictions
Lundberg, S., & Lee, S.-I. (2017) · arXiv · doi:10.48550/arxiv.1705.07874 · Cited by 23,707 · see citing works
Regularization and Variable Selection Via the Elastic Net
Zou, H., & Hastie, T. (2005) · Journal of the Royal Statistical Society Series B: Statistical Methodology · doi:10.1111/j.1467-9868.2005.00503.x · Cited by 20,957 · see citing works
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Reimers, N., & Gurevych, I. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1410 · Cited by 12,778 · see citing works
Scikit-learn: Machine Learning in Python
(2011) · Journal of Machine Learning Research · doi:10.5555/1953048.2078195 · Cited by 8,539 · see citing works
Decision curve analysis: a novel method for evaluating prediction models
Vickers, A. J., & Elkin, E. B. (2006) · Medical Decision Making · doi:10.1177/0272989x06295361 · Cited by 6,341 · see citing works
Collins, G. S., Moons, K. G. M., Dhiman, P., Riley, R. D., Beam, A. L., Van Calster, B., Ghassemi, M., Liu, X., Reitsma, J. B., van Smeden, M., et al. (2024) · BMJ · doi:10.1136/bmj-2023-078378 · Cited by 4,718 · see citing works
Clozapine for the Treatment-Resistant Schizophrenic: A Double-blind Comparison With Chlorpromazine
Kane, J. (1988) · Archives of General Psychiatry · doi:10.1001/archpsyc.1988.01800330013001 · Cited by 4,156 · see citing works
Christodoulou, E., Ma, J., Collins, G. S., Steyerberg, E. W., Verbakel, J. Y., & Van Calster, B. (2019) · Journal of Clinical Epidemiology · doi:10.1016/j.jclinepi.2019.02.004 · Cited by 2,119 · see citing works
McEvoy, J. M., Lieberman, J. A., Stroup, T. S., Thomas, S., Meltzer, H. Y., Rosenheck, R. A., Swartz, M. S., Perkins, D. O., Keefe, R. S. E., Davis, C. E., et al. (2006) · American Journal of Psychiatry · doi:10.1176/appi.ajp.163.4.600 · Cited by 1,019 · see citing works
Machine Learning for Precision Psychiatry: Opportunities and Challenges
Bzdok, D., & Meyer‐Lindenberg, A. (2017) · Biological Psychiatry Cognitive Neuroscience and Neuroimaging · doi:10.1016/j.bpsc.2017.11.007 · Cited by 833 · see citing works
Skegg, K. (2005) · The Lancet · doi:10.1016/s0140-6736(05)67600-3 · Cited by 630 · see citing works
ClinicalBERT: Modeling Clinical Notes and Predicting Hospital Readmission
Huang, K., Altosaar, J., & Ranganath, R. (2019) · arXiv · doi:10.48550/arxiv.1904.05342 · Cited by 618 · see citing works
Logistic regression was as good as machine learning for predicting major chronic diseases
Nusinovici, S., Tham, Y. C., Yan, M. Y. C., Ting, D. S. W., Li, J., Sabanayagam, C., Wong, T. Y., & Cheng, C. (2020) · Journal of Clinical Epidemiology · doi:10.1016/j.jclinepi.2020.03.002 · Cited by 569 · see citing works
Epidemiology of involuntary placement of mentally ill people across the European Union
Salize, H. J., & Dreßing, H. R. (2004) · The British Journal of Psychiatry · doi:10.1192/bjp.184.2.163 · Cited by 384 · see citing works
The mania rating scale: Scale construction and inter-observer agreement
Bech, P., Rafaelsen, O. J., Kramp, P., & Bolwig, T. G. (1978) · Neuropharmacology · doi:10.1016/0028-3908(78)90022-9 · Cited by 383 · see citing works
Psychiatric illness and risk factors for suicide in Denmark
Mortensen, P. B., Agerbo, E., Erikson, T., Qin, P., & Westergaard‐Nielsen, N. (2000) · The Lancet · doi:10.1016/s0140-6736(99)06376-x · Cited by 348 · see citing works
Digital medicine and the curse of dimensionality
Berisha, V., Krantsevich, C., Hahn, P. R., Hahn, S., Dasarathy, G., Turaga, P., & Liss, J. (2021) · npj Digital Medicine · doi:10.1038/s41746-021-00521-5 · Cited by 344 · see citing works
Espinoza, R. T., & Kellner, C. H. (2022) · New England Journal of Medicine · doi:10.1056/nejmra2034954 · Cited by 340 · see citing works
Desai, R. J., Wang, S. V., Vaduganathan, M., Evers, T., & Schneeweiß, S. (2020) · JAMA Network Open · doi:10.1001/jamanetworkopen.2019.18962 · Cited by 294 · see citing works
Sheridan Rains, L., Zenina, T., Dias, M. C., Jones, R., Jeffreys, S., Branthonne-Foster, S., Lloyd-Evans, B., & Johnson, S. (2019) · The Lancet Psychiatry · doi:10.1016/s2215-0366(19)30090-2 · Cited by 230 · see citing works
Walker, S., Mackay, E., Barnett, P., Sheridan Rains, L., Leverton, M., Dalton-Locke, C., Trevillion, K., Lloyd-Evans, B., & Johnson, S. (2019) · The Lancet Psychiatry · doi:10.1016/s2215-0366(19)30406-7 · Cited by 221 · see citing works
Meehan, A. J., Lewis, S. J., Fazel, S., Fusar-Poli, P., Steyerberg, E. W., Stahl, D., & Danese, A. (2022) · Molecular Psychiatry · doi:10.1038/s41380-022-01528-4 · Cited by 219 · see citing works
Why do tree-based models still outperform deep learning on tabular data?Preprint
Grinsztajn, L., Oyallon, E., & Varoquaux, G. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2207.08815 · Cited by 168 · see citing works
Interventions to Reduce Compulsory Psychiatric Admissions: A Systematic Review and Meta-analysis
de Jong, M. H., Kamperman, A. M., Oorschot, M., Priebe, S., Bramer, W., van de Sande, R., Van Gool, A. R., & Mulder, C. L. (2016) · JAMA Psychiatry · doi:10.1001/jamapsychiatry.2016.0501 · Cited by 167 · see citing works
The Brøset violence checklist (BVC)
Woods, P., & Almvik, R. (2002) · Acta Psychiatrica Scandinavica · doi:10.1034/j.1600-0447.106.s412.22.x · Cited by 156 · see citing works
Katsakou, C., & Priebe, S. (2007) · Epidemiologia e Psichiatria Sociale · doi:10.1017/s1121189x00004802 · Cited by 124 · see citing works
Xiaowei, S., Mitnitski, A., Cox, J. L., et al. (2004) · Studies in health technology and informatics · doi:10.3233/978-1-60750-949-3-736 · Cited by 105 · see citing works
Incidence Rates of Deliberate Self-Harm in Denmark 1994–2011
Morthorst, B. R., Soegaard, B., Nordentoft, M., & Erlangsen, A. (2016) · Crisis · doi:10.1027/0227-5910/a000391 · Cited by 100 · see citing works
Irving, J., Patel, R., Oliver, D., Colling, C., Pritchard, M., Broadbent, M., Baldwin, H., Stahl, D., Stewart, R., & Fusar-Poli, P. (2021) · Schizophrenia Bulletin · doi:10.1093/schbul/sbaa126 · Cited by 92 · see citing works
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Reimers, N., & Gurevych, I. (2019) · arXiv · doi:10.48550/arxiv.1908.10084 · Cited by 86 · see citing works
Machine Learning vs Statistical Methods for Time Series Forecasting: Size MattersPreprint
Cerqueira, V., Torgo, L., & Soares, C. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1909.13316 · Cited by 75 · see citing works
Involuntary psychiatric hospitalization and its relationship to psychopathology and aggression
Mosele, P. H. C., Figueira, G. C., Filho, A. B., de Lima, J. A. R. F., & Calegaro, V. C. (2018) · Psychiatry Research · doi:10.1016/j.psychres.2018.04.031 · Cited by 46 · see citing works
Danielsen, A. A., Fenger, M. H. J., Østergaard, S. D., Nielbo, K. L., & Mors, O. (2019) · Acta Psychiatrica Scandinavica · doi:10.1111/acps.13061 · Cited by 38 · see citing works
Self-citationKarasch, O., Schmitz-Buhl, M., Mennicken, R., Zielasek, J., & Gouzoulis-Mayfrank, E. (2020) · BMC Psychiatry · doi:10.1186/s12888-020-02803-w · Cited by 31 · see citing works
(2021) · Health informatics · doi:10.1007/978-3-030-70558-9 · Cited by 25 · see citing works
van Veen, M., Wierdsma, A. I., van Boeijen, C. A., Dekker, J., Zoeteman, J. B., Koekkoek, B., & Mulder, C. L. (2019) · BMC Psychiatry · doi:10.1186/s12888-019-2145-0 · Cited by 25 · see citing works
Bernstorff, M., Hansen, L., Enevoldsen, K., Damgaard, J. G., Hæstrup, F., Perfalk, E., Danielsen, A. A., & Østergaard, S. D. (2024) · Acta Psychiatrica Scandinavica · doi:10.1111/acps.13687 · Cited by 22 · see citing works
Self-citationPredicting involuntary hospitalization in psychiatry: A machine learning investigation
Silva, B., Gholam‐Rezaee, M., Golay, P., Bonsack, C., & Morandi, S. (2021) · European Psychiatry · doi:10.1192/j.eurpsy.2021.2220 · Cited by 18 · see citing works
Bernstorff, M., Hansen, L., Perfalk, E., Danielsen, A. A., & Østergaard, S. D. (2022) · Acta Psychiatrica Scandinavica · doi:10.1111/acps.13463 · Cited by 18 · see citing works
Self-citationHansen, L., Enevoldsen, K., Bernstorff, M., Nielbo, K. L., Danielsen, A. A., & Østergaard, S. D. (2021) · Acta Neuropsychiatrica · doi:10.1017/neu.2021.22 · Cited by 17 · see citing works
Self-citationTransferring Clinical Prediction Models Across Hospitals and Electronic Health Record Systems
Curth, A., Thoral, P. J., van den Wildenberg, W., et al. (2020) · Communications in computer and information science · doi:10.1007/978-3-030-43823-4_48 · Cited by 16 · see citing works
Lexical stability of psychiatric clinical notes from electronic health records over a decade
Hansen, L., Enevoldsen, K., Bernstorff, M., Perfalk, E., Danielsen, A. A., Nielbo, K. L., & Østergaard, S. D. (2023) · Acta Neuropsychiatrica · doi:10.1017/neu.2023.46 · Cited by 14 · see citing works
Self-citationTimeseriesflattener: A Python package for summarizing features from (medical) time series.
Bernstorff, M., Enevoldsen, K., Damgaard, J., Danielsen, A., & Hansen, L. (2023) · Journal of Open Source Software · doi:10.21105/joss.05197 · Cited by 10 · see citing works
Perfalk, E., Bernstorff, M., Danielsen, A. A., & Østergaard, S. D. (2024) · European Psychiatry · doi:10.1192/j.eurpsy.2024.1790 · Cited by 6 · see citing works
Self-citationPerfalk, E., Bernstorff, M., Danielsen, A. A., & Østergaard, S. D. (2025) · Acta Psychiatrica Scandinavica · doi:10.1111/acps.13791 · Cited by 5 · see citing works
Self-citationTRIPOD+AIPreprint
Collins, G., Dhiman, P., Logullo, P., Moons, K. G. M., & CALSTER, B. V. (2020) · doi:10.17605/osf.io/zyacb · Cited by 4 · see citing works
Flagged first, then by citations
Research works printed but not linked: 1
- World Health Organization. (n.d.-b). International statistical classification of diseases and related health problems/World Health Organization (Vol. 2004). World Health Organization.
Cited by
Sorted by citations
Factors associated with postpartum depression symptoms following antepartum hospitalization
Goulding, A. N., Palacios, D., Aras, S., Chen, H., Pasupuleti, S., Toscano, M., Cirino, N., Christie, I. C., Liu, Z., Miller, E. S., et al. (2026) · Pregnancy · doi:10.1002/pmf2.70319
- Authors
- Perfalk, E., Damgaard, J. G., Bernstorff, M., Hansen, L., Danielsen, A. A., & Østergaard, S. D.
- Affiliations
- Aarhus University (DK)
- Corresponding author
- Perfalk, Erik
- ORCID
- Venue
- Psychological Medicine
- Publisher
- Cambridge University Press (CUP)
- Published
- 2024-11
- Volume
- 54
- Issue
- 15
- Pages
- 4348-4361
- ISSN
- 0033-2917 (ISSN-L)
- 1469-8978
- PMC
- PMC11650168
- OpenAlex
- W4404474356
- Cited by
- 12
- References
- 48
- Citations by year
- 2026: 7 · 2025: 5
- FWCI
- 6.02
- Type
- journal article
- Language
- en
- Update notices
- correction (2024-11-18)
- Open access
- hybrid
- doi.org
- Licence
- Locations
- Psychological Medicine (publishedVersion, cc-by-nc-nd)
- medRxiv (acceptedVersion, cc-by-nd)
- PubMed Central (publishedVersion, cc-by-nc-nd)
- PubMed (publishedVersion)
- Funders
- Lundbeckfonden (R344‐2020‐1073, R358-2020-2341, R283-A16461)
- Novo Nordisk (NNF20SA0062874)
- Novo Nordisk Fonden (NNF20SA0062874)
- Region Midtjylland
- H. Lundbeck A/S
- Topics
- Social Sciences › Psychology › Clinical Psychology › Healthcare Decision-Making and Restraints
- Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
- Social Sciences › Psychology › Clinical Psychology › Psychiatric care and mental health services
- Keywords
- involuntary psychiatric admission, psychiatric inpatient care, prediction model, electronic health records, clinical decision support, coercion in mental health care, XGBoost, elastic net, risk prediction
- MeSH terms
- Machine Learning, Adult, Mental Disorders, Commitment of Persons with Psychiatric Disorders, Denmark, Female, Hospitals, Psychiatric, Humans, Inpatients, Male, Middle Aged, Patient Discharge, Electronic Health Records
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review