{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,10]],"date-time":"2026-08-10T04:28:33Z","timestamp":1786336113383,"version":"build-2736575974"},"reference-count":37,"publisher":"Springer Science and Business Media LLC","issue":"1","license":[{"start":{"date-parts":[[2026,6,4]],"date-time":"2026-06-04T00:00:00Z","timestamp":1780531200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2026,8,10]],"date-time":"2026-08-10T00:00:00Z","timestamp":1786320000000},"content-version":"vor","delay-in-days":67,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/100007880","name":"Johns Hopkins University","doi-asserted-by":"publisher","award":["Pivot Grant"],"award-info":[{"award-number":["Pivot Grant"]}],"id":[{"id":"10.13039\/100007880","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["BioData Mining"],"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    Longitudinal electronic health record (EHR) trajectories are highly heterogeneous, sparse, and irregular, making unsupervised temporal pattern discovery and uncertainty quantification challenging. We developed a Time-Aware Sequence Clustering (TASC) framework that integrates temporal spacing, clinical semantic similarity, and probabilistic subtype characterization to identify longitudinal trajectory patterns from EHR data. We demonstrate the framework using pre-surgical musculoskeletal care trajectories preceding total knee replacement (TKR). As a proof-of-concept application, we applied TASC to EHR and survey data from 2,052 patients undergoing primary TKR in the\n                    <jats:italic>All of Us<\/jats:italic>\n                    Research Program. Using electronic health records and survey data, we constructed their temporally ordered sequences of musculoskeletal-related diagnoses and comorbidities. We applied a weighted edit-distance algorithm that incorporates both clinical semantic similarity and inter-event time gaps, followed by K-Medoids clustering and subsampling-based stability analysis. Clusters were compared across sociodemographic variables, quality-of-life measures, prevalence of musculoskeletal-related diagnostic events, time to surgery, and pre- and post-surgical opioid use. We further quantified cluster membership uncertainty by computing probability-based subtype assignments from distances between partial or full trajectories and cluster medoids using a SoftMax transformation. TASC identified stable and interpretable trajectory structures from heterogeneous longitudinal EHR data in patients undergoing TKR. A five-cluster solution achieved the best silhouette score of 0.22 and demonstrated good stability under subsampling with mean Adjusted Rand Index of 0.71. The resulting trajectory clusters demonstrated distinct sociodemographic profiles, diagnostic\/comorbidity patterns, and time-to-surgery distributions, supporting the framework\u2019s ability to capture heterogeneous longitudinal care-utilization patterns. Patients with fast progression (median\u2009=\u2009252 days) to surgery were younger (mean = 53.6 years, SD =16.5 years) and had minimal comorbidity, whereas joint pain\u2013obesity (median\u2009=\u2009766 days) and joint pain\u2013fracture (median\u2009=\u20091154 days) subtypes showed intermediate progression timelines. The soft-tissue\u2013dominant subtype was characterized by prolonged pre-surgical trajectories (median\u2009=\u20092900 days) and elevated chronic opioid use, while the complex, chronic subtype comprised older patients (mean = 62.7 years, SD = 10.0 years) with multimorbidity, long delays to surgery (median\u2009=\u20095457 days), and the lowest post-surgical quality-of-life scores. Opioid use declined after surgery across all clusters, with the largest reductions observed in clusters with less complexity and shorter pre-surgical trajectories (e.g., fast progression to surgery and joint pain-obesity subtypes, 38% and 31% reduction, respectively). Probability-based analysis showed that fast progression subtype was identifiable early and with high confidence, joint pain-obesity and joint pain-fracture subtypes reflected risk patterns already present in earlier musculoskeletal history, whereas soft-tissue\u2013dominant and complex chronic subtypes required longer longitudinal care records to become distinguishable. TASC provides a flexible framework for uncertainty-aware clustering of longitudinal EHR trajectories and demonstrates how temporal and semantic sequence information can reveal heterogeneous care-utilization patterns in musculoskeletal disease. These findings support future applications of TASC to other longitudinal clinical domains and event representations.\n                  <\/jats:p>","DOI":"10.1186\/s13040-026-00569-7","type":"journal-article","created":{"date-parts":[[2026,6,4]],"date-time":"2026-06-04T12:05:09Z","timestamp":1780574709000},"update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["TASC: a time-aware sequence clustering framework with uncertainty quantification for electronic health record trajectories"],"prefix":"10.1186","volume":"19","author":[{"given":"April Yujie","family":"Yan","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Thomas K. M.","family":"Cudjoe","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Casey Overby","family":"Taylor","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2026,6,4]]},"reference":[{"issue":"3","key":"569_CR1","doi-asserted-by":"publisher","first-page":"e003422","DOI":"10.1136\/rmdopen-2023-003422","volume":"9","author":"A Dell\u2019Isola","year":"2023","unstructured":"Dell\u2019Isola A, Hellberg C, Turkiewicz A, Appleyard T, Yu D, Thomas G, et al. Use of non-surgical treatments on the journey to knee replacement in patients with knee osteoarthritis: a 10-year population-based case\u2013control study. RMD Open. 2023;9(3):e003422.","journal-title":"RMD Open"},{"key":"569_CR2","doi-asserted-by":"crossref","unstructured":"Franklin PD, Miozzari H, Christofilopoulos P, Hoffmeyer P, Ayers DC, L\u00fcbbeke A. Important patient characteristics differ prior to total knee arthroplasty and total hip arthroplasty between Switzerland and the United States. BMC Musculoskelet Disord. 2017;18(1).","DOI":"10.1186\/s12891-016-1372-5"},{"issue":"8","key":"569_CR3","doi-asserted-by":"publisher","first-page":"e0183550","DOI":"10.1371\/journal.pone.0183550","volume":"12","author":"TH Hylkema","year":"2017","unstructured":"Hylkema TH, Stevens M, van Jan PC, van Jonbergen RW, et al. Preoperative characteristics of working-age patients undergoing total knee arthroplasty. PLoS ONE. 2017;12(8):e0183550\u20130.","journal-title":"PLoS ONE"},{"issue":"10","key":"569_CR4","doi-asserted-by":"publisher","first-page":"1804","DOI":"10.1093\/rheumatology\/kes075","volume":"51","author":"A Judge","year":"2012","unstructured":"Judge A, Arden NK, Cooper C, Kassim Javaid M, Carr AJ, Field RE, et al. Predictors of outcomes of total knee replacement surgery. Rheumatology. 2012;51(10):1804\u201313.","journal-title":"Rheumatology"},{"issue":"1","key":"569_CR5","doi-asserted-by":"publisher","first-page":"92","DOI":"10.1016\/j.arth.2016.06.009","volume":"32","author":"Y Jiang","year":"2017","unstructured":"Jiang Y, Sanchez-Santos MT, Judge AD, Murray DW, Arden NK. Predictors of patient-reported pain and functional outcomes over 10 years after primary total knee arthroplasty: a prospective cohort study. J Arthroplasty. 2017;32(1):92\u2013e1002.","journal-title":"J Arthroplasty"},{"issue":"6","key":"569_CR6","first-page":"e85532","volume":"8","author":"KM Malik","year":"2018","unstructured":"Malik KM, Beckerly R, Imani F. Musculoskeletal disorders a universal source of pain and disability misunderstood and mismanaged: a critical analysis based on the U.S. model of care. Anesth Pain Med. 2018;8(6):e85532.","journal-title":"Anesth Pain Med"},{"key":"569_CR7","unstructured":"Orthopaedic Research Society. Burden of disease. https:\/\/www.ors.org\/burden-of-disease\/. Accessed 1 Dec 2025.&#8204."},{"key":"569_CR8","unstructured":"American Academy of Orthopaedic Surgeons. Total knee replacement. https:\/\/orthoinfo.aaos.org\/en\/treatment\/total-knee-replacement\/. Accessed 1 Dec 2025."},{"key":"569_CR9","unstructured":"American College of Rheumatology. Joint replacement surgery. https:\/\/rheumatology.org\/patients\/joint-replacement-surgery. Accessed 1 Dec 2025."},{"issue":"1","key":"569_CR10","doi-asserted-by":"publisher","first-page":"e000435","DOI":"10.1136\/bmjopen-2011-000435","volume":"2","author":"AD Beswick","year":"2012","unstructured":"Beswick AD, Wylde V, Gooberman-Hill R, Blom A, Dieppe P. What proportion of patients report long-term pain after total hip or knee replacement for osteoarthritis? A systematic review of prospective studies in unselected patients. BMJ Open. 2012;2(1):e000435.","journal-title":"BMJ Open"},{"key":"569_CR11","unstructured":"EuroQol Research Foundation. EQ-5D-5L User Guide. 2015. https:\/\/euroqol.org\/publications\/user-guides\/. Accessed 1 Dec 2025."},{"key":"569_CR12","first-page":"31","volume":"28","author":"N Soley","year":"2023","unstructured":"Soley N, Song S, Flaks-Manov N, Taylor CO. Risk for poor post-operative quality of life among wearable use subgroups in an all of us research cohort. Pac Symp Biocomput. 2023;28:31\u201342.","journal-title":"Pac Symp Biocomput"},{"issue":"2","key":"569_CR13","doi-asserted-by":"publisher","first-page":"89","DOI":"10.1308\/003588414X13824511649571","volume":"96","author":"E Jones","year":"2014","unstructured":"Jones E, Wainwright T, Foster J, Smith J, Middleton R, Francis N. A systematic review of patient reported outcomes and patient experience in enhanced recovery after orthopaedic surgery. Ann R Coll Surg Engl. 2014;96(2):89\u201394.","journal-title":"Ann R Coll Surg Engl"},{"key":"569_CR14","doi-asserted-by":"crossref","unstructured":"Mannor S, Jin X, Han J. K-means clustering. Encyclopedia Mach Learn. 2011:563\u20134.","DOI":"10.1007\/978-0-387-30164-8_425"},{"key":"569_CR15","doi-asserted-by":"crossref","unstructured":"Reynolds D. Gaussian mixture models. Encyclopedia Biometrics. 2009:659\u201363.","DOI":"10.1007\/978-0-387-73003-5_196"},{"key":"569_CR16","doi-asserted-by":"crossref","unstructured":"Rani S, Singh J. Enhancing Levenshtein\u2019s edit distance algorithm for evaluating document similarity. Commun Comput Inform Sci. 2018:72\u201380.","DOI":"10.1007\/978-981-13-0755-3_6"},{"key":"569_CR17","doi-asserted-by":"crossref","unstructured":"M\u00fcller M. Dynamic Time Warping. Inform Retr Music Motion. 2007:69\u201384.","DOI":"10.1007\/978-3-540-74048-3_4"},{"issue":"5","key":"569_CR18","doi-asserted-by":"publisher","first-page":"2351","DOI":"10.1109\/JBHI.2021.3129461","volume":"26","author":"H Zhong","year":"2022","unstructured":"Zhong H, Loukides G, Pissis SP. Clustering demographics and sequences of diagnosis codes. IEEE J Biomed Health Inf. 2022;26(5):2351\u20139.","journal-title":"IEEE J Biomed Health Inf"},{"key":"569_CR19","doi-asserted-by":"publisher","first-page":"102401","DOI":"10.1016\/j.datak.2024.102401","volume":"156","author":"T Guyet","year":"2025","unstructured":"Guyet T, Pinson P, Gesny E. Clustering of timed sequences \u2013 application to the analysis of care pathways. Data Knowl Eng. 2025;156:102401.","journal-title":"Data Knowl Eng"},{"key":"569_CR20","doi-asserted-by":"crossref","unstructured":"Lakshmanan GT, Rozsnyai S, Wang F. Investigating clinical care pathways correlated with outcomes. Lect Notes Comput Sci. 2013;323\u201338.","DOI":"10.1007\/978-3-642-40176-3_27"},{"issue":"1","key":"569_CR21","doi-asserted-by":"publisher","first-page":"289","DOI":"10.1186\/s12911-019-1013-7","volume":"19","author":"K Rama","year":"2019","unstructured":"Rama K, Canhao H, Carvalho AM, Vinga S. AliClu - temporal sequence alignment for clustering longitudinal clinical data. BMC Med Inf Decis Mak. 2019;19(1):289.","journal-title":"BMC Med Inf Decis Mak"},{"issue":"7","key":"569_CR22","doi-asserted-by":"publisher","first-page":"668","DOI":"10.1056\/NEJMsr1809937","volume":"381","author":"The All of Us Research Program Investigators","year":"2019","unstructured":"The All of Us Research Program Investigators. The All of Us Research Program. N Engl J Med. 2019;381(7):668\u201376.","journal-title":"N Engl J Med"},{"key":"569_CR23","unstructured":"Mikolov T, Chen K, Corrado G, Dean J. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781. 2013. Available from: https:\/\/arxiv.org\/abs\/1301.3781. Accessed 1 Dec 2025."},{"issue":"8","key":"569_CR24","doi-asserted-by":"publisher","first-page":"2093","DOI":"10.1109\/TSP.2019.2901370","volume":"67","author":"T Wang","year":"2019","unstructured":"Wang T, Li Q, Bucci DJ, Liang Y, Chen B, Varshney PK. K-medoids clustering of data sequences with composite distributions. IEEE Trans Signal Process. 2019;67(8):2093\u2013106.","journal-title":"IEEE Trans Signal Process"},{"issue":"1","key":"569_CR25","doi-asserted-by":"publisher","first-page":"258","DOI":"10.1016\/j.csda.2006.11.025","volume":"52","author":"C Hennig","year":"2007","unstructured":"Hennig C. Cluster-wise assessment of cluster stability. Comput Stat Data Anal. 2007;52(1):258\u201371.","journal-title":"Comput Stat Data Anal"},{"issue":"1\u20132","key":"569_CR26","doi-asserted-by":"publisher","first-page":"83","DOI":"10.1002\/nav.3800020109","volume":"2","author":"HW Kuhn","year":"1955","unstructured":"Kuhn HW. The Hungarian method for the assignment problem. Naval Res Logistics Q. 1955;2(1\u20132):83\u201397.","journal-title":"Naval Res Logistics Q"},{"issue":"1","key":"569_CR27","doi-asserted-by":"publisher","first-page":"193","DOI":"10.1007\/BF01908075","volume":"2","author":"L Hubert","year":"1985","unstructured":"Hubert L, Arabie P. Comparing partitions. J Classif. 1985;2(1):193\u2013218.","journal-title":"J Classif"},{"issue":"6","key":"569_CR28","doi-asserted-by":"publisher","first-page":"1849","DOI":"10.1016\/j.athoracsur.2020.07.043","volume":"111","author":"MP Subramanian","year":"2020","unstructured":"Subramanian MP, Sahrmann JM, Nickel KB, Olsen MA, Bottros M, Heiden B, et al. Assessment of preoperative opioid use prevalence and clinical outcomes in pulmonary resection. Ann Thorac Surg. 2020;111(6):1849\u201357.","journal-title":"Ann Thorac Surg"},{"key":"569_CR29","doi-asserted-by":"crossref","unstructured":"Ravi B, Pincus D, Croxford R, Leroux T, Paterson Jm, Hawker G, et al. Patterns of pre-operative opioid use affect the risk for complications after total joint replacement. Sci Rep. 2021;11(1).","DOI":"10.1038\/s41598-021-01179-5"},{"key":"569_CR30","doi-asserted-by":"publisher","first-page":"569","DOI":"10.1055\/a-2321-0397","volume":"15","author":"N Soley","year":"2024","unstructured":"Soley N, Speed TJ, Xie A, et al. Predicting postoperative pain and opioid use with machine learning applied to longitudinal electronic health record and wearable data. Appl Clin Inf. 2024;15:569\u201382.","journal-title":"Appl Clin Inf"},{"issue":"1","key":"569_CR31","doi-asserted-by":"publisher","first-page":"289","DOI":"10.1111\/j.2517-6161.1995.tb02031.x","volume":"57","author":"Y Benjamini","year":"1995","unstructured":"Benjamini Y, Hochberg Y. Controlling the false discovery rate: A practical and powerful approach to multiple testing. J R Stat Soc Ser B Stat Methodol. 1995;57(1):289\u2013300.","journal-title":"J R Stat Soc Ser B Stat Methodol"},{"key":"569_CR32","doi-asserted-by":"crossref","unstructured":"Kakas AC, Cohn DE, Dasgupta S, Barto AG, Carpenter GA, Grossberg S, et al. Apriori Algorithm. 2011;39\u201340.","DOI":"10.1007\/978-0-387-30164-8_27"},{"issue":"10","key":"569_CR33","doi-asserted-by":"publisher","first-page":"1908","DOI":"10.1093\/pm\/pnx141","volume":"18","author":"LRM Hausmann","year":"2017","unstructured":"Hausmann LRM, Youk A, Kwoh CK, Ibrahim SA, Hannon MJ, Weiner DK, et al. Testing a positive psychological intervention for osteoarthritis. Pain Med. 2017;18(10):1908\u201320.","journal-title":"Pain Med"},{"issue":"1","key":"569_CR34","doi-asserted-by":"publisher","first-page":"181","DOI":"10.1007\/s40122-021-00235-2","volume":"10","author":"SN El-Tallawy","year":"2021","unstructured":"El-Tallawy SN, Nalamasu R, Salem GI, LeQuang JAK, Pergolizzi JV, Christo PJ. Management of musculoskeletal pain: an update with emphasis on chronic musculoskeletal pain. Pain Therapy. 2021;10(1):181\u2013209.","journal-title":"Pain Therapy"},{"key":"569_CR35","doi-asserted-by":"publisher","first-page":"101987","DOI":"10.1016\/j.jcot.2022.101987","volume":"33","author":"VA Aggarwal","year":"2022","unstructured":"Aggarwal VA, Sambandam SN, Wukich DK. The impact of obesity on total knee arthroplasty outcomes: A retrospective matched cohort study. J Clin Orthop Trauma. 2022;33:101987.","journal-title":"J Clin Orthop Trauma"},{"issue":"11","key":"569_CR36","doi-asserted-by":"publisher","first-page":"3403","DOI":"10.1007\/s00167-016-4314-8","volume":"25","author":"SA Alattas","year":"2016","unstructured":"Alattas SA, Smith T, Bhatti M, Wilson-Nunn D, Donell S. Greater pre-operative anxiety, pain and poorer function predict a worse outcome of a total knee arthroplasty. Knee Surg Sports Traumatol Arthrosc. 2016;25(11):3403\u201310.","journal-title":"Knee Surg Sports Traumatol Arthrosc"},{"key":"569_CR37","doi-asserted-by":"crossref","unstructured":"Goplen CM, Verbeek W, Kang SH, Jones CA, Voaklander DC, Churchill TA, et al. Preoperative opioid use is associated with worse patient outcomes after Total joint arthroplasty: a systematic review and meta-analysis. BMC Musculoskelet Disord. 2019;20(1).","DOI":"10.1186\/s12891-019-2619-8"}],"container-title":["BioData Mining"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/article\/10.1186\/s13040-026-00569-7","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s13040-026-00569-7.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s13040-026-00569-7.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,10]],"date-time":"2026-08-10T03:44:05Z","timestamp":1786333445000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1186\/s13040-026-00569-7"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,4]]},"references-count":37,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2026,12]]}},"alternative-id":["569"],"URL":"https:\/\/doi.org\/10.1186\/s13040-026-00569-7","relation":{},"ISSN":["1756-0381"],"issn-type":[{"value":"1756-0381","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,4]]},"assertion":[{"value":"14 December 2025","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"22 May 2026","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"4 June 2026","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"Data were derived from the\n                      All of Us\n                      Research Program, a longitudinal cohort under a protocol approved by the\n                      All of Us\n                      Institutional Review Board (AoU IRB). All participants provided informed consent for their data to be used for research. The current study involved only secondary analysis of de-identified Researcher Workbench data without re-identification; no additional ethics review was required under our institutional regulations. The\n                      All of Us\n                      Research Program is conducted in accordance with applicable ethical guidelines, including the principles of the Declaration of Helsinki.","order":1,"name":"Ethics","label":"Ethics approval and consent to participate","group":{"name":"EthicsHeading","label":"Declarations"}},{"value":"The authors declare no competing interests.","order":2,"name":"Ethics","label":"Competing interests","group":{"name":"EthicsHeading","label":"Declarations"}}],"article-number":"60"}}