The process of monitoring, detecting, and assessing adverse effects of medications to ensure drug safety.