Based on the real clinical data of Hospital Information System to explore the common clinical syndromes of traditional Chinese medicine after breast cancer surgery, analysis of traditional Chinese medicine in the treatment of breast cancer after the compatibility law. The real medical records of breast cancer patients after surgery in a tertiary hospital in Sichuan Province were collected and screened to build a medical record database. Python language was used for data preprocessing to remove outliers and fill in missing values. Using International Business Machines Corporation (IBM) Statistical Product and Service Solutions (SPSS) Modeler software, Apriori association rules algorithm for data analysis, mining Chinese medicine treatment of breast cancer after common syndromes and the corresponding medication rules. A total of 472 cases of clinical real medical record data were included. Data analysis showed that there were 42 TCM syndromes after breast cancer surgery, of which the highest frequency was liver depression and spleen deficiency, qi deficiency and blood stasis, qi stagnation and blood stasis, qi and blood deficiency, qi and yin deficiency, phlegm and blood stasis. A total of 416 kinds of traditional Chinese medicine were involved. High-frequency drugs included angelica sinensis, coix seed, bupleurum, ginger magnolia bark, keel, oyster, astragalus, platycodon grandiflorum, antler frost, vinegar tortoise shell, poria cocos, lily, Jianqu, Ophiopogon japonicus (Maidong), Shancigu, etc. A total of 18 pairs of commonly used drug combinations were excavated, such as Fushen-Gancao-Chaihu-Angelica, Huangqi-Baishao-Jianghoupu, Chaihu-Huanhua-Maidong-Lily, Baizhu-Huangqi-Maidong, Fuling-Baishao, etc. The clinical syndrome type of traditional Chinese medicine after breast cancer surgery is mainly liver depression and spleen deficiency syndrome. The clinical treatment is mainly soothing liver and relieving depression, and harmonizing liver and spleen. Analyze the syndrome type and the corresponding drug compatibility law, and provide decision support for the clinical dialectical prescription of traditional Chinese medicine after breast cancer surgery.