When can they safely take baby?

I was put into the hospital yesterday because of contractions, I am terrified of losing this baby I am 19 weeks and so scared of losing this baby