So worried

So I had surgery about a month ago and my doctor had prescribed me hydrocodone for pain. It’s pretty strong stuff. Anyway I’ve been taking them almost everyday and I just took a pregnancy test which came out positive.

Could this affect the baby? I’m scared it can cause birth defects or miscarriage

Please help!