I agree that it was a psychiatric hospital rather than rehab. I tivo'd it and had to watch the ending three times to figure out what the heck was going on, so I'm pretty certain of that. I still couldn't tell you for certain what he had and hadn't hallucinated, because Cuddy both offered to help him detox and walked out the door instead. My thought is that he took so much vicodin that he was hallucinating. But we'll have to wait until next season, I guess...
If you didn't TiVo it, then try the fox web page to watch a full episode. It's way to difficult to explain the episode, and like I say, I'm still not certain I understand it.