There are a couple of potential solutions here.
One of them being that you may simply have to have concessions made for your ADHD, which would result in you only being scheduled for daytime shifts.
Another is that, instead of an extended-release medication, you’d need to use instant-release, so that you could chop and change the times at which you take your medication based on what your shift patterns were. With this solution, you’d need to have about an hour at every pill ‘changeover’ where you and your decisions were being monitored to make sure you didn’t do anything that might harm a patient, or forget any important facts.
The best thing to do would be to have a word with your specialist, and have a word with some of the people you’re studying under, and ask what the common solutions for this kind of problem are. If you know any doctors who have ADHD, that would be even better. It MAY end up that you have to be unmedicated, and need to rely very heavily on coping mechanisms, but hopefully not. See what the information is like from people on the front lines 🙂