It's best to be honest about what you take partly because they take urine
samples at many or all pre-natal appts. and will be able to detect
the opiate in your urine. Another reason to be honest about it is that the OB needs to know what you take in order to treat you accurately.
Some OBs want to take over your pain management for the duration of the pregnancy. Some will not, as in my case and I have to see a pain management specialist as well, which I did before I became pregnant.