ObjectiveThe aim of this study was to investigate the relationship between Traditional Chinese medicine (TCM) and pain reduction, hospital readmission, and joint replacement in patients with osteoarthritis (OA). Chinese herbal medicine (CHM) prescription patterns were further analyzed to confirm the association with prognosis and quality of life in OA patients. MethodsWe retrospectively followed 3,850 hospitalized patients with osteoarthritis between January 2018 and December 2022 using the hospital's HIS system. Propensity score matching (PSM) was used for data matching. Cox's proportional risk model was used to assess the impact of various factors on the outcomes of patients with OA, including pain worsening, readmission, and joint replacement. The Kaplan-Meier survival curve was applied to determine the impact of TCM intervention time on patient outcomes. Data mining methods including association rules, cluster analysis, and random walks have been used to assess the efficacy of TCM. ResultsThe utilization rate of TCM in OA patients was 67.01% (2,511/3,747). After PSM matching, 1,228 TCM non-user patients and 1,228 TCM user patients were eventually included. The outcomes of pain worsening, re-admission rate, and joint replacement rate of the TCM non-user group were observably higher than those of the TCM user group with OA (p < 0.05). Based on the Cox proportional risk model, TCM is an independent protective factor. Compared with non-TCM users, TCM users had 58.4% lower rates of pain, 51.1% lower rates of re-admission, and 42% lower rates of joint replacement. In addition, patients in the high-exposure subgroup (TCM>24 months) had a markedly lower risk of outcome events than those in the low-exposure subgroup (TCM ≤24 months). Data mining methods have shown that TCM therapy can significantly improve immune-inflammatory indices, VAS scores, and SF-36 scale scores in OA patients. Conclusions TCM acts as a protective factor to improve the prognosis of patients with OA, and the benefits of long-term use of herbal medicines are even greater.