Considering the vast amount of unstructured data in nursing documentation from the electronic health record systems, natural language processing (NLP) was used to find an association with any antecedent factors and any contiguous sequences of two and three words/events related to aggressive behaviors for predicting restraint/seclusion in an adolescent psychiatric inpatient unit.
The purposes of this study were 1) to apply an NLP method to develop a model for predicting the need for the use of restraint/seclusion based on analysis of EHR free text psychiatric nursing notes and 2) to understand predictors of aggressive behavior within a context, by identifying any contiguous sequences of two and three words/events related to aggressive behaviors that might be potential antecedent factors, using NLP. An explorative and predictive quantitative design using data mining of secondary was conducted using patients' electronic health records collected between January 2017 and August 2017. The data (455 adolescent psychiatric inpatients, 80,000 clinical notes) was retrieved from the records of the Bradley hospital. Additionally, all paper-based data was entered manually for data analysis. All the data were analyzed using two software R 3.4.2. (R Core Team, 2013) for data mining, and Python 3.6.3. (Python, 2017) for NLP, following Fayyard’s KDD process (Fayyad, 1995). NLP was used to extract unstructured data, using Python 3.4.2 (with Python natural language toolkit, ver. NLTK 3.) in order work with human language data. Specifically, we used powerful word embedding approach word2vec (Mikolov et al. 2013) to convert words into a sparse vector space where objects with similar semantics where locate closely. All identified patients’ risk factors from NLP were analyzed by three different algorithms: two shallow models, including logistic regression and decision tree, and one deep model including recurrent neural networks (RNN) with long short-term memory (LSTM). The NLP-based algorithm identified all potential antecedent factors and contiguous sequences of two and three words/events in the free text. From this study, we can better understand the sequential patterns of aggressive behavior within the psychiatric inpatient units, using NLP from unstructured nursing data. NLP could extract meaningful data from narrative unstructured nursing text to predict/identify the need for the use of restraint/seclusion in psychiatric adolescent inpatient units. Multiple factors potentially could be used to provide early intervention for reducing the use of restraint/seclusion. In addition, we could better understand the aggressive behavior as a highly dynamic contextual problem.