The hospital has called the police and has blocked all exits. Tom has the right to take his child. He has a legal document showing his rights. In addition to this, he has signed the discharge letter and the documents transferring the care to the new doctors.
The fact that social services wants a protection order now, shows that they didn't have the authority to block the move before the order was made!