I was in a psychiatric hospital as a teen- which, granted, is different than medical, but friendships are formed extremely fast under those sorts of circumstances. Especially with the right mixture of personalities. Also, eating disorder patients are kept on medical floors until they are physically stable.