Machine Learning Approach to Inpatient Violence Risk Assessment Using Routinely Collected Clinical Notes in Electronic Health Records

JAMA Netw Open. 2019 Jul 3;2(7):e196709. doi: 10.1001/jamanetworkopen.2019.6709.

Abstract

Importance: Inpatient violence remains a significant problem despite existing risk assessment methods. The lack of robustness and the high degree of effort needed to use current methods might be mitigated by using routinely registered clinical notes.

Objective: To develop and validate a multivariable prediction model for assessing inpatient violence risk based on machine learning techniques applied to clinical notes written in patients' electronic health records.

Design, setting, and participants: This prognostic study used retrospective clinical notes registered in electronic health records during admission at 2 independent psychiatric health care institutions in the Netherlands. No exclusion criteria for individual patients were defined. At site 1, all adults admitted between January 2013 and August 2018 were included, and at site 2 all adults admitted to general psychiatric wards between June 2016 and August 2018 were included. Data were analyzed between September 2018 and February 2019.

Main outcomes and measures: Predictive validity and generalizability of prognostic models measured using area under the curve (AUC).

Results: Clinical notes recorded during a total of 3189 admissions of 2209 unique individuals at site 1 (mean [SD] age, 34.0 [16.6] years; 1536 [48.2%] male) and 3253 admissions of 1919 unique individuals at site 2 (mean [SD] age, 45.9 [16.6] years; 2097 [64.5%] male) were analyzed. Violent outcome was determined using the Staff Observation Aggression Scale-Revised. Nested cross-validation was used to train and evaluate models that assess violence risk during the first 4 weeks of admission based on clinical notes available after 24 hours. The predictive validity of models was measured at site 1 (AUC = 0.797; 95% CI, 0.771-0.822) and site 2 (AUC = 0.764; 95% CI, 0.732-0.797). The validation of pretrained models in the other site resulted in AUCs of 0.722 (95% CI, 0.690-0.753) at site 1 and 0.643 (95% CI, 0.610-0.675) at site 2; the difference in AUCs between the internally trained model and the model trained on other-site data was significant at site 1 (AUC difference = 0.075; 95% CI, 0.045-0.105; P < .001) and site 2 (AUC difference = 0.121; 95% CI, 0.085-0.156; P < .001).

Conclusions and relevance: Internally validated predictions resulted in AUC values with good predictive validity, suggesting that automatic violence risk assessment using routinely registered clinical notes is possible. The validation of trained models using data from other sites corroborates previous findings that violence risk assessment generalizes modestly to different populations.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Adult
  • Aggression / psychology
  • Behavior Observation Techniques / methods
  • Electronic Health Records*
  • Female
  • Hospitals, Psychiatric / statistics & numerical data*
  • Humans
  • Inpatients* / psychology
  • Inpatients* / statistics & numerical data
  • Machine Learning*
  • Male
  • Middle Aged
  • Netherlands
  • Prognosis
  • Reproducibility of Results
  • Risk Assessment / methods*
  • Risk Factors
  • Violence* / prevention & control
  • Violence* / psychology
  • Violence* / statistics & numerical data