Pretty much any residency program will have it IN WRITING that a resident cannot moonlight without informing the program.
It will be very easy for a lawyer to find where it is in the contract, highlight it, show it on a large screen and demand the resident on cross-examination to repeat it five times in a very loud voice so the judge can hear it.
Such a case IMHO would be a 99% chance of having a seriously bad outcome for a resident. Even if the resident avoided being guilty of malpractice, it would be on paper that the resident was in violation of the legal standards of practice. One could even argue they were practicing without legal authority to do so. The lawyer could try to an out of court settlement and say something to the effect of....
"Would you really want the state medical board to find out that you were illegally practicing medicine? I really think you ought to settle for $50,000, Yes, I know the patient having a mild headache in your mind doesn't warrant that much money or a malpractice case but my client is a sensitive and caring man and that headache as he described it to me was one that was so serious he may have PTSD from it."
http://www.bettercallsaul.com/