It is probable that the 'mere' sale of the customer list (meaning your name and contact information) doesn't violate the law. I also do not believe that the sale of your prescription history as part of a broader sale of the pharmacy would violate the law, in that 1) the pharmacy that is purchasing is also a covered entity under the law and 2) the provision of this information could be considered 'treatment, payment and operations'.
However, to be certain, you could 1) pay an attorney to look into it, or 2) contact the Office of Civil Rights of the Department of Health and Human Services and make a complaint. You could also call your State Attorney General.
Still, you could see an attorney and get some clarity on the matter.
I am licensed in New Mexico and Pennsylvania, and therefore any discussion of issues related to other states must considered within that context.
In addition, my comments are not intended to create a legal representation but merely to respond to the limited facts presented by the question. Any opinion herein is not meant as a precise statement of legal rights or as a recommendation of any particular course of action.
A more complete legal review can be obtained through local counsel.