When were medical ethics created?
Medical ethics
The term medical ethics first dates back to 1803, when English author and physician Thomas Percival published a document describing the requirements and expectations of medical professionals within medical facilities. The Code of Ethics was then adapted in 1847, relying heavily on Percival's words. Over the years in 1903, 1912, and 1947, revisions have been made to the original document. The practice of Medical Ethics is widely accepted and practiced throughout the world.
Patient safety
Millennia ago, Hippocrates recognized the potential for injuries that arise from the well-intentioned actions of healers. Greek healers in the 4th century BC drafted the Hippocratic Oath and pledged to "prescribe regimens for the good of my patients according to my ability and my judgment and never do harm to anyone." 
Since then, the directive "primum non nocere" (“first do no harm) has become a central tenet for contemporary medicine. However, despite an increasing emphasis on the scientific basis of medical practice in Europe and the United States in the late 19th Century, data on adverse outcomes were hard to come by and the various studies commissioned collected mostly anecdotal events.