According to the University of California San Francisco School of Medicine, beneficence refers to acting for the good of others. Nonmaleficence, on the other hand, means to do no harm.
Beneficent acts include rescuing a person from danger or helping a person to improve their situation. Specific examples of beneficent acts include rescuing a drowning person, providing vaccination for the general population and advising a smoker to quit smoking. Examples of nonmaleficence include not giving a person a harmful drug and refraining from saying hurtful things to another other person.
Beneficence and nonmaleficence are principles that apply to doctors in their clinical practice. The doctors' code of ethics includes the principle of first doing no harm, which refers to nonmaleficence. Therefore doctors must not provide treatments that are known to be harmful to their patients and must not provide treatments that are known to be ineffective. Also, doctors have a duty to help their patients. They have to provide effective treatment, which is a beneficent act, if a patient requires it.
In medical practice, treatments often have benefits as well as risks involving side effects or complications. By weighing the benefits against the risks, doctors are balancing the principles of beneficence and nonmaleficence.