Please read:
I was visiting my sister in/at the hospital.
"At the hospital" suggests that you were meeting within the entire hospital grounds, whereas "in the hospital" refers to inside the actual building itself.
What are the meaning of within and inside?
Normally, within = inside. Right?
Quoc