The paper discusses a method for using a large set of electronic health record (EHR) data to predict adverse drug event outcomes for patients undergoing drug therapies. Combining rigorous data science principles with subject matter expertise, the research developed machine learning models to predict targeted outcomes related to anticoagulant therapy. The first objective of the work was to create a patient-level risk score for a specific negative outcome, a bleeding event. The research tested predictive models using support vector machine, random forest, logistic regression and neural network methods. The research merged external determinants of health data, including Social Determinants of Health (SDoH), with the EHR data which enhanced predictive capabilities. Practical implementations to improve patient safety and quality of live are discussed.