A Method for the Detection and Management of Adverse Events in Clinical Trials