I see this all the time at work, our drug control is administered by the NRC - a federal agency
You can have a script for codeine, Oxycontin and although you may not be allowed to enter the plant for work, you won't lose your job as it is federally legal to prescribe
Marijuana, OTOH is not federally legal to possess or prescribe - 10 year ban