Diabetes mellitus is one of the most severe chronic diseases worldwide and will become the seventh leading cause of death by 2030. To increase the quality of care for Type 2 Diabetes with low side effects methods, three main interrelated levels, including predicting, controlling, and preventing, are investigated in decision support systems. Classification is one of the methods used to provide insight into predicting the future onset of Type 2 diabetes (T2D) in those at high risk of progression from pre-diabetes to T2D. However, imbalanced class distribution is one of the limitations in electronic medical records that leads to patients' misclassification and poor predictive performance. A novel balancing method for improving T2D prediction performance in imbalanced electronic medical records by utilizing a fixed partitioning distribution scheme capable of keeping valuable information besides balancing the data is developed. Drug response prediction and medicine recommendations by utilizing various machine learning techniques have been investigated in recent years. Rapid clinical decisions in the early stages of the disease and accurate medicine recommendations based on past experiences can lower the patients' life-threatening. However, how medicine recommenders and treatment response prediction can be combined and how medicine recommenders can recommend only effective medicines have not yet been investigated. A modular effective anti-diabetic drugs recommender using the glycated hemoglobin indicator before and after using antidiabetics is developed to estimate the medication effectiveness. The proposed model recommends the most appropriate antidiabetic for each individual based on the patient’s characteristics using a hybrid switching method containing the prediction-based and clustering-based modules. The explainability of the proposed model helps extract meaningful patterns from the data that can be applied in controlling T2D. At the causal discovery level, We conduct the first population-based cohort study using a subset of data from the Canadian Primary Care Sentinel Surveillance Network from 2000 to 2015. Cox proportional hazards (PH) regressions are conducted to estimate our primary outcome, time to T2D among prediabetics. In addition, causal mediation analysis decomposed the total effect estimate of cardiovascular disease risk on developing T2D into natural direct and indirect effects through Statin therapy.