# Sentiment polarity in nursing notes predicts perioperative complications and shorter hospital stay in hip arthroplasty: Subgroup-specific associations and mediation by complications

**Authors:** Li-li Weng, Yan Ni, Zhou-ying Jian, Yi-bin Zhu, Xiao-ling Huang

PMC · DOI: 10.1371/journal.pone.0335637 · 2025-10-30

## TL;DR

This study shows that positive sentiment in nursing notes is linked to fewer complications and shorter hospital stays for hip arthroplasty patients.

## Contribution

The novel contribution is identifying subgroup-specific associations between sentiment polarity and perioperative outcomes, mediated by complications.

## Key findings

- Higher sentiment polarity scores are associated with reduced risk of perioperative complications in specific subgroups.
- Positive sentiment scores correlate with shorter hospital length of stay, mediated by fewer complications.

## Abstract

Recent advancements in natural language processing (NLP) technology have enabled the extraction of sentiment information from nursing notes. This study aims to investigate the association between sentiment scores and perioperative complications (POC), as well as the length of stay (LOS) in hospital stay, among patients undergoing hip arthroplasty (HA).

A total of 382 patients undergoing HA were enrolled for this retrospective study, with a POC rate of 22.17% and a median LOS in hospital of 3.56 days. First, the variance inflation factor (VIF) was calculated to perform multicollinearity diagnostics. Subsequently, a restricted cubic spline (RCS) curve was fitted to evaluate the linear relationship between sentiment scores and the risk of POC. Next, multiple logistic regression models were constructed for association analysis. Furthermore, subgroup analyses were conducted to identify susceptible populations, while mediation analysis was employed to explore the mediating role of sentiment scores. Finally, we performed a series of analyses focusing on the secondary outcome of LOS in hospital.

After adjusting for covariates (Model 1 adjusted for age and hypertension; Model 2 adjusted for some laboratory indicators), elevated sentiment polarity scores reduced the risk of POC (Model 1: OR=0.227, 95%CI: 0.062–0.840; Model 2: OR=0.219, 95%CI: 0.058–0.8214). However, this association was no longer significant after adjusting for the reason of surgery (OR=0.587, 95%CI: 0.152–2.319). After adjusting for the operation reason, the association between sentiment polarity and POC was observed in three subgroups: left HA patients, those without dyslipidemia, and those not taking aspirin (all P < 0.05). We did not observe the mediating effect of sentiment polarity (all P for IE > 0.05). This study also found that higher polarity scores were significantly associated with shorter hospital LOS (β = −2.119, 95%CI: −3.113, −1.124), with POC serving as a mediator in the relationship between sentiment polarity and hospital LOS in both the overall population and the non-dyslipidemia subgroup (P for IE < 0.05).

Our findings indicated that sentiment polarity in nursing notes can serve as a valuable predictor of perioperative outcomes in patients undergoing HA.

## Linked entities

- **Diseases:** dyslipidemia (MONDO:0002525)

## Full-text entities

- **Diseases:** dyslipidemia (MESH:D050171), HA (MESH:D025981), hypertension (MESH:D006973)
- **Chemicals:** aspirin (MESH:D001241)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12574854/full.md

---
Source: https://tomesphere.com/paper/PMC12574854