This article asks the question of why don't we drug test doctors. Because we'd fail. Though the examples used in the article are not doctors to be fair. I just took an "anonymous" survey for a research project on the misuse of ADHD drugs while in medical school. It'll be interesting to see the results. I'm guessing the number will be damned high.
The real reason why doctors will never be drug tested is that too many doctors would be ruined in a witch hunt. What would the public do with the knowledge that Dr Bob is taking an antidepressant and anxiolytic because of a recent messy divorce involving a nasty custody battle? Nothing about his practice has changed. Patients haven't complained, in fact, they like the guy. Nurses have noticed no difference in his patient care. But let that information into the hands of lifetime bureaucrat and Dr Bob's license wouldn't be worth the paper it was printed on. It would result in a legal nightmare because that doctor would turn around and sue every party involved - the testing company, the licensing board, hospital, etc. If you think this information would be "confidential" I have a bridge I'd like to sell you.