ABSTRACT Surgery is common and appropriate postoperative pain management is critical as poor management can impair recovery and lead to adverse events, including prolonged opioid use and transition to chronic pain. Additional specific risks in elder surgical patients include delirium and falls. Currently prejudice rather than evidence guides the complex problem of elder perioperative pain management. Given the gravity of the US opioid epidemic, policy makers are quickly establishing rules and regulations for opioid prescribing. These policies are blanket regulations that neglect emerging evidence regarding the need for differential opioid prescriptions based on clinical and patient factors, particularly in elders. Currently, there lacks tools to identify elders at high risk for adverse pain outcomes. Such tools are needed to provide critical evidence on pain management to stakeholders and move the field away from pain treatment for the ‘average’ elder patient to pain treatment for an individual. In this grant, we propose an innovative approach to advance the systematic analysis of postoperative pain in elders. Our approach will develop scalable, open source risk stratification tools for adverse pain outcomes in elders. We will accomplish this work in three aims. First, we will develop clinical phenotypes to identify and extract key discriminating features necessary to assess postoperative pain using EHRs. Next, we will develop pain risk stratification models using machine learning, including deep learning, methods and tools based on phenotypes developed in Aim 1. Finally, we will validate our models externally at the VA and disseminate our work through open source libraries and public websites. This project will deliver validated risk-stratification tools derived from real world evidence to identify elder patients at high risk for adverse pain outcomes following surgery, which can potentially reduce prescribed opioids circulating in the community– a key to curbing the opioid epidemic.