Medical resident exploits mobile prescription system to push opioids