Yes, the diversion of prescribed medication is an issue.
Again, it's an issue that the Correctional Service of Canada is well aware of, and they have increased efforts in terms of surveillance, monitoring, and substituting one form of drug for another. That includes, for example, substituting a liquid form of a medication for a pill form of a medication and watching somebody actually consume a liquid with it so that the pill can't be cheeked and then diverted.
I don't want to get into too many of the details of how people divert drugs. Some of them are unpleasant to discuss, and I don't want to give anybody any ideas either, but there are ways to divert those drugs.