Im worried.

I smoke cannabis on the daily I don't use much but I do use it... How ever I found out I'm 20 weeks pregnant... I have irregular periods and I haven't had one for 7 months plus I was told I couldn't have kids because of pcos. I have quit as soon as I found out but they will test the baby and if it test positive for thc they will call DHS... Do I have enough time to clear my system? I'm worried I'll lose my baby.

Edit I forgot to add. I'm not in a state where it's legel I just live on the boarder of a state that is. I'm also over weight and that's why I'm worried do I have enough time to clear out systems.