For the hospital, it will depend. One part will depend on his insurance(if he has any?), and how much they're pushing for him to be seen and get out. What SHOULD be the deciding factor is how he's doing. I believe a psychiatrist would have to discharge him, and he'd probably have a casemanager, too, they'd try to assess if he's safe and stable, and he'd be released about when they decide he is. If he's cooperative, doing all they recommend, it helps.
Have you checked on whether he can have visitors? I'd be surprised if he couldn't, they should have visiting hours. You may have to check ahead of time, I don't know. Where I was, anyone(except small children) could visit during those hours, unless the patient didn't want to see them for some reason. You may want to consider that, too, in case he feels ashamed or something. Also, look into whether he can recieve phone calls.
^ That's based on what I saw where I was and what I've heard from others, and seems it would make sense to be a common policy among hospitals.
Hope you can hear from him soon, and that you'll both work through this and feel better.
<font color=green>____________________________
Matthew 11:28
Come to me, all you who are weary and burdened, and I will give you rest.</font color=green> Sounds good...
__________________

I'm not into South Park, I just thought the generator made cute avis.