Pregnant...

I had found out I had a bulging disc in my back and I was prescribed pain meds. I had been taking them for awhile probably a couple of months. Well fast forward I take a pregnancy test and it’s positive. I’m freaking out because I had no idea I was pregnant. (We weren’t trying and not expecting it at all) I’m so worried about my baby not being okay. I’ve already talked to my doctors but still it’s a feeling I can’t shake for some reason. I’m just needing to see if anyone has gone through this? Did everything turn out okay? I also had to detox since my body had been so used to taking them. HELP!!!!