Under Minnesota law, it is a crime to drive, operate, or be in physical control of any motor vehicle if your body contains any amount of a Schedule I or II controlled substance other than marijuana or its derivatives. Schedule I or II substances not only include illicit substances such as heroin, LSD, and Ecstasy, but also common prescription medications such as oxycodone, codeine, hyrdrocodone, Adderall, and Ritalin.
If you have a valid medical prescription for a Schedule I or II controlled substance, it is not illegal to drive, operate, or physically control a motor vehicle with the prescribed substance in your system. However, even with a valid prescription, you can still get a DWI if the state can prove beyond a reasonable doubt that you are under the influence of the controlled substance (ie. that it impairs your ability to safety drive).
Read your prescriptions carefully and talk to your prescribing doctor before getting behind the wheel. If not, you could end up with a DWI without drinking a drop of alcohol and simply by taking your medications. Be safe out there!