Need help

Okay so I've been in the process of weening myself off opiates, and I just found out I'm pregnant... I want to be off them 100% as fast as humanly possible but I have no idea how to do this so it's safe for the baby.. my first doc appointment is on Wednesday and I want to be honest because I know they'll help me but I'm worried they might try and take the baby away? I'm not sure how to handle this but all I know is I want to get myself healthy for this baby. Any advice would be greatly appreciated