Avoiding harms in the practice of medicine