The law does not recognize what might have happened only what did happen.
There is no claim here.
The purpose of a negligence claim is to "compensate" a person for what they lost--to try and place them back where they were had there been no injury/loss. In your case nothing has been taken from you. You have no loss and no lawsuit.
If you feel this is the "best" answer or is "helpful," please indicate. Since I am limited to the information you provide, I cannot guarantee the accuracy of the answer. You should seek the advise of an attorney who can explore all aspects of your question. This communication does not form an attorney client relationship.
This happens a lot. If you were dead, you would have a great case.
Please note that these answers are provided as a community service and are not meant to create an attorney-client relationship.
Fortunately, you didn't take the medicine and are alive to complain about the pharmacy's mistake. You have no case. You cannot pursue damages for what might have happened in this situation.
Fortunately, it appears you didn't actually take the medication. This means, legally speaking, you have no damages to sue over. So no, you cannot sue them. You might want to find a new pharmacy though. Personally I would speak to the manager of the pharmacy about what happened.
As you say this is a very serious, and potentially deadly, mistake.
I am licensed in Pennsylvania. Members of my firm are licensed in various states, including Pennsylvania, New Jersey and New York. We handle cases involving personal injury (car accidents slip and falls, etc.,) medical malpractice, nursing home abuse, workers' compensation and social security disability. This post is not legal advice, but instead contains general educational information. Please do not act or refrain from acting based upon what you read in this post. Also please remember that this post does not form an attorney/client relationship between you and me. If you have specific legal questions, you should contact an attorney in your state for assistance.