The prediction of hospital length of stay using unstructured data

BMC Med Inform Decis Mak. 2021 Dec 18;21(1):351. doi: 10.1186/s12911-021-01722-4.

Abstract

Objective: This study aimed to assess the performance improvement for machine learning-based hospital length of stay (LOS) predictions when clinical signs written in text are accounted for and compared to the traditional approach of solely considering structured information such as age, gender and major ICD diagnosis.

Methods: This study was an observational retrospective cohort study and analyzed patient stays admitted between 1 January to 24 September 2019. For each stay, a patient was admitted through the Emergency Department (ED) and stayed for more than two days in the subsequent service. LOS was predicted using two random forest models. The first included unstructured text extracted from electronic health records (EHRs). A word-embedding algorithm based on UMLS terminology with exact matching restricted to patient-centric affirmation sentences was used to assess the EHR data. The second model was primarily based on structured data in the form of diagnoses coded from the International Classification of Disease 10th Edition (ICD-10) and triage codes (CCMU/GEMSA classifications). Variables common to both models were: age, gender, zip/postal code, LOS in the ED, recent visit flag, assigned patient ward after the ED stay and short-term ED activity. Models were trained on 80% of data and performance was evaluated by accuracy on the remaining 20% test data.

Results: The model using unstructured data had a 75.0% accuracy compared to 74.1% for the model containing structured data. The two models produced a similar prediction in 86.6% of cases. In a secondary analysis restricted to intensive care patients, the accuracy of both models was also similar (76.3% vs 75.0%).

Conclusions: LOS prediction using unstructured data had similar accuracy to using structured data and can be considered of use to accurately model LOS.

Keywords: Data mining; Emergency department; Health services research; Length of stay.

Publication types

  • Observational Study

MeSH terms

  • Emergency Service, Hospital*
  • Hospitalization*
  • Hospitals
  • Humans
  • Length of Stay
  • Retrospective Studies