5 weeks pregnant and morphine

Last night I went to the ER because I have gastritis. I told them right way I was pregnant. They gave me zofran and it didn't help. The doctor then prescribed 2 mg of iv morphine. He said the risks were low. I was in so much pain, I agreed to take it. I feel so horrible that I took it. Has anyone taken this with no complications? Thanks.