I think it is safe to stop around 30 weeks with medical advice. I know some women are advised to stay on it until birth due to known clotting disorders, however there becomes issues with that. If you stay on the heparin until birth some CPs do not allow labour to begin in it's own time and you then need to look at the risks associated with induction (esp being your first).