Prescribing medications to patients with chronic diseases or complications such as diabetes and stroke requires special attention, especially when patients are co-treated by an internist and a neurologist. The risk of polypharmacy and inappropriate drug administration can adversely affect patient health. This study uses the Support Vector Machine (SVM) algorithm to classify and analyze drug administration patterns in patients with chronic diseases or complications. The data used includes patient medication history, diagnosis, and prescriptions from various specialists. The SVM algorithm was implemented to identify potential overlaps or similarities in drug administration. The results of the analysis using SVM successfully identified drug administration patterns that could potentially lead to polypharmacy. The model was able to detect the similarity of drug content with 92% accuracy. The results showed that 15% of the total prescriptions analyzed had the potential for overlapping drug content. The use of the SVM algorithm in the analysis of drug prescribing proved effective in reducing the risk of polypharmacy and inappropriate drug administration in patients with chronic diseases or complications. The implementation of this machine learning-based system can help doctors make more informed prescribing decisions, improve patient safety, and optimize treatment outcomes.