Subscribe to RSS
DOI: 10.1055/a-2765-6792
A Sequence Clustering Approach to Mining Sleep Trajectories from Nursing Narratives and Structured Clinical Data
Authors
Abstract
Background
Sleep quality critically influences recovery in neurological patients, yet its longitudinal monitoring during hospitalization remains limited. Nursing narrative notes offer an underutilized resource to track sleep trajectories objectively across time.
Objectives
To propose and apply a formal pipeline that integrates structured clinical data and unstructured nursing annotations to monitor sleep trajectories during post-acute inpatient neurorehabilitation, relying exclusively on free-to-use software tools and without increasing nursing workload.
Methods
A total of 17,039 nighttime nursing annotations were extracted and categorized into four sleep quality states. Two expert raters manually labeled a training set of 2,000 annotations (κ = 0.84). A random forest classifier achieved 0.93 sensitivity and 0.94 specificity and was used to classify the remaining notes. Sleep sequences were constructed and clustered using sequence analysis (TraMineR) and hierarchical clustering (AGNES, Ward's method). The obtained clusters (silhouette = 0.40) were compared using non-parametric statistics across clinical, functional, and social variables in a cohort of 303 post-acute consecutive neurorehabilitation inpatients.
Results
Four distinct sleep trajectory clusters were identified, each characterized by unique functional and socio-environmental profiles. The first group (n = 102; 33.7%) combined high functional independence, strong social support, stable economy, short hospitalization, and favorable sleep quality. The second group (n = 76; 25.1%) presented moderate functional independence, precarious economic conditions, and the highest proportion of poor sleep quality. The third group (n = 76; 25.1%) exhibited severe functional impairment, long hospitalization, poor housing conditions, but paradoxically the highest proportion of good sleep quality. The fourth group (n = 49; 16.2%) showed profound disability, relatively favorable socio-economic conditions, and predominance of intermediate sleep quality, likely influenced by medication. Distinctive sets of social and functional keywords emerged for each cluster.
Conclusion
This pipeline identified clinically meaningful sleep profiles from nursing notes, highlighting functional and social determinants' role in shaping neurorehabilitation sleep trajectories.
Keywords
sleep monitoring - nursing documentation - natural language processing - neurorehabilitation - trajectory clusteringProtection of Human and Animal Subjects
This study involved secondary analysis of routinely collected nursing narrative annotations about patients' sleep. The protocol was reviewed and approved by the Institut Guttmann Ethics Committee. Data were extracted by authorized personnel and de-identified before analysis; no direct identifiers were available to the research team. All procedures complied with the Declaration of Helsinki and applicable data-protection regulations. Data were stored on secure, access-controlled servers at Institut Guttmann.
Data Availability Statement
The datasets generated for this study are available upon reasonable request to the corresponding author.
AI Disclosure Statement
During the preparation of this work the author(s) used ChatGPT-4o by OpenAI, in order to assist in drafting and editing text. After using this tool/service, the author(s) reviewed and edited the content as needed and take(s) full responsibility for the content of the publication.
Contributors' Statement
A.G.-R.: conceptualization, methodology, formal analysis, investigation, data curation, software, visualization, writing—original draft; A.R.M.: conceptualization, methodology, formal analysis, investigation, data curation, validation, writing—review and editing; M.L.A.: conceptualization, methodology, formal analysis, investigation, data curation, validation, writing—review and editing; L.G.P.: conceptualization, methodology, formal analysis, investigation, data curation, validation, writing—review and editing; S.G.G.: conceptualization, methodology, formal analysis, investigation, data curation, validation, writing—review and editing; M.N.B.: investigation, data curation, software, visualization, writing—review and editing; E.O.: conceptualization, project administration, formal analysis, software, supervision, writing—review and editing; E.H.-P.: conceptualization, project administration, formal analysis, supervision, writing—review and editing.
Publication History
Received: 29 April 2025
Accepted: 04 December 2025
Article published online:
18 December 2025
© 2025. Thieme. All rights reserved.
Georg Thieme Verlag KG
Oswald-Hesse-Straße 50, 70469 Stuttgart, Germany
-
References
- 1 Richards KC, O'Sullivan PS, Phillips RL. Measurement of sleep in critically ill patients. J Nurs Meas 2000; 8 (02) 131-144
- 2 Blackman J, Morrison HD, Lloyd K. et al. The past, present, and future of sleep measurement in mild cognitive impairment and early dementia—towards a core outcome set: a scoping review. Sleep 2022; 45 (07) zsac077
- 3 de Zambotti M, Goldstein C, Cook J. et al. State of the science and recommendations for using wearable technology in sleep and circadian research. Sleep 2024; 47 (04) zsad325
- 4 Bandyopadhyay A, Oks M, Sun H. et al. Strengths, weaknesses, opportunities, and threats of using AI-enabled technology in sleep medicine: a commentary. J Clin Sleep Med 2024; 20 (07) 1183-1191
- 5 Lefkovitz I, Walsh S, Blank LJ, Jetté N, Kummer BR. Direct clinical applications of natural language processing in common neurological disorders: scoping review. JMIR Neurotechnol 2024; 3: e51822
- 6 Sivarajkumar S, Tam TYC, Mohammad HA. et al. Extraction of sleep information from clinical notes of Alzheimer's disease patients using natural language processing. J Am Med Inform Assoc 2024; 31 (10) 2217-2227
- 7 Linacre JM, Heinemann AW, Wright BD, Granger CV, Hamilton BB. The structure and stability of the Functional Independence Measure. Arch Phys Med Rehabil 1994; 75 (02) 127-132
- 8 Scrutinio D, Battista P, Guida P, Lanzillo B, Tortelli R. Sex differences in long-term mortality and functional outcome after rehabilitation in patients with severe stroke. Front Neurol 2020; 11: 84
- 9 Mehrholz J, Wagner K, Rutte K, Meissner D, Pohl M. Predictive validity and responsiveness of the functional ambulation category in hemiparetic patients after stroke. Arch Phys Med Rehabil 2007; 88 (10) 1314-1319
- 10 Price R, Choy NL. Investigating the relationship of the functional gait assessment to spatiotemporal parameters of gait and quality of life in individuals with stroke. J Geriatr Phys Ther 2019; 42 (04) 256-264
- 11 Soldatos CR, Dikeos DG, Paparrigopoulos TJ. The diagnostic validity of the Athens Insomnia Scale. J Psychosom Res 2003; 55 (03) 263-267
- 12 Niu S, Wu Q, Ding S, Wu L, Wang L, Shi Y. Comparison of three measures for insomnia in ischemic stroke patients: Pittsburgh sleep quality index, insomnia severity index, and Athens insomnia scale. Front Neurol 2023; 14: 1118322
- 13 R Core Team. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. 2025. Accessed April 28, 2025 at: https://www.R-project.org/
- 14 Buysse DJ, Reynolds III CF, Monk TH, Berman SR, Kupfer DJ. The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research. Psychiatry Res 1989; 28 (02) 193-213
- 15 Jean-Louis G, Grandner MA, Seixas AA. Social determinants and health disparities affecting sleep. Lancet Neurol 2022; 21 (10) 864-865
- 16 Scrutinio D, Lanzillo B, Guida P. et al. Development and validation of a predictive model for functional outcome after stroke rehabilitation: the Maugeri model. Stroke 2017; 48 (12) 3308-3315
- 17 Chen W, Kowatch R, Lin S, Splaingard M, Huang Y. Interactive cohort identification of sleep disorder patients using natural language processing and i2b2. Appl Clin Inform 2015; 6 (02) 345-363
- 18 Kadura S, Eisner L, Lopa SH. et al. Nudging towards sleep-friendly health care: a multifaceted approach on reducing unnecessary overnight interventions. Appl Clin Inform 2024; 15 (05) 1025-1039
