The Canadian model CanadaJohn referred to seems the most reasonable...any drugs with high street values should be in a time controlled safe, dispensed only after hours when the pharmacy is securely locked up, and held for pickup the next day or mailed.
As for CCW, it might decrease the number of pharmacy robberies, but I suspect it would increase the number of killings. Desperate junkies will generally leave once they have what they want, but if they suspect they will meet armed resistance, the most desperate may just march in guns blazing, and perhaps leave one alive to show them where the oxy is located.
Believe it or not I used to work with a guy who got arrested after a five hour standoff with cops when they tried to arrest him for bumping off pharmacies.
Pharmacy Robber Charged With 6 Robberies, More Charges Expected - Acadiana's Multi-Media News Station
...and given the timeline, he had to have been actively engaged in his crime spree while I was working with him.