What are the concerns with having pain pills while pregnant?

Opioids to fetus. There are definite risks before 12-13 weeks. However after this time frame the real risk is creating an opioid dependent baby who after birth will have a serious risk of withdrawal if the opioid that was used during the pregnancy is not received. Withdrawal can be quite a risky situation for a newborn.
Withdrawal in baby. If you use opioids while pregnant there is minimal risk to the fetus after the first 13weeks. The newborn however will have withdrawal symptoms after birth.