Ahem.
Being a chronic pain patient myself AND having worked in the industry, I assure you that this can happen quite innocently. And really - Walmart doesn't have access to CVS's records or vice versa. There is no one central database of patients on controlled substances which can be accessed by every single pharmacy/company.
The OP can be flagged locally, for sure. But outside of that? Yeah, not so much.
(Though I do understand and agree with your point, DV - that being, people who do run scams like this make it very hard for us genuine patients to receive the treatment we actually do need)