If you are pregnant and admitted to the hospital, the hospital staff cannot keep your baby against your will. However, if you are deemed to be a danger to yourself or your baby, the hospital may place a temporary restraining order on you which would restrict your ability to leave the hospital or take your baby with you. If this happens, you would be required to appear in court to argue your case.