pain clinics
Pain clinics typically test you for specific levels.
They are looking to see if you have a specific level of whatever drug that they have prescribed you.
They would, however test for illicit drugs such as THC and cocaine in order to determine if the patient might have a tendency to abuse the drug(s) prescribed.
Pain clinics are notorious for testing levels and also doing pill counts and can do so at any time the doctor sees fit.
If your levels are too high, low or otherwise non existent then you are subject to get the dreaded drop letter with the emergency room referral.