Depending on your attitude to hospitals, when one appears in a dream it can either represent a place of safety, or a place where one’s very being is threatened and we become vulnerable.
It can also represent that aspect within yourself that knows when some kind of respite is needed, possibly in order to re-evaluate a situation.
If you look what part of you was being treated or discussed it may give you an idea about what your subconscious thinks you should be paying attention to.
You may also dream of someone else in hospital, in which case it could be that your sleeping mind thinks you should help them.. or the someone else may simply be an aspect of yourself that you associate with this other person.
Say, for instance, you have a happy-go-lucky friend who is sick in your dream, it could be that you need to have a look at your own care-free side, or lack of it.