Taking the wrong medication can cause you serious harm. Imagine if you took a heart medication when your heart was fine, took an extremely high dose of a pain killer that conflicts with your medications or took a drug you through was for allergies but was actually for anxiety. Each of these situations could lead to serious side effects.
If the pharmacy you go to gives you the wrong drug, then you need to let them know right away. If the color or shape of the drug isn't what you expected, you need to ask. It could be that the generic or branded drug has been altered, or you could have been given the wrong medication. You should make sure that the pharmacist replaces the medication, giving you the correct medication, and gives you an explanation for the mistake.
You should receive an apology and reimbursement for any costs you've suffered because of this issue, especially if you've suffered side effects or an injury. If those things aren't offered, then your attorney can help you file a lawsuit to help you remedy the situation.
How can these issues be avoided? Bar code scanning is one helpful method that can catch mistakes, like putting the wrong medication into the wrong patient's bag. Still, human error is a major factor. Illegible prescriptions from doctors, similar drug labels and dosing mix-ups are still possible.
Remember, you can ask your doctor to pronounce the name of the drug, tell you the dosage and spell it for you, so you can verify that you have the right medication later. Also ask what the medication is for, so you can confirm this with the pharmacy.
Source: Consumer Reports, "What can I do if the pharmacy gives me the wrong drug?," accessed July 08, 2016