morphine iv and dilaudid iv help

i went to the emergency room yesterday because ive been having a very painful gallstone episode. the E.R. doctor gave me tylenol , morphine and dilaudid iv for pain and it ddnt really helped. also prescribed me hydrocodone-acetaminopen 5-325 tablets but when i took it my body cant handle it and i just vomitted the medication.. im 22 weeks pregnant now and im really scared that  it will affect my baby. Has anybody had the same experience with me? id really appreciate a response 😢