Were you trying to kill the pain or were you really just curious? If your prescribed meds aren't covering your pain, they need to address that. If this is addictive behaviour, you need to look at that as well. The PM doctor will most likely discharge you. They are very strict. Good luck!
Pain management Doctors are famous for doing a full urine screen. By that I mean they can tell the difference between hydrocodone, Oxycodone, dilaudid, codine, and yes heroin will show up as heroin. Yes they will be able to tell the levels also. Unless they loose the sample I would expect a discharge. There is not any excuse you can come up with. you may try to be honest with the Dr. Good luck