Hei, don't worry, it's just a matter of time only.
Usually after babies stay in hospital because of sickness, they might afraid of its people, eg. doctors, nurses and the beds etc. My boy stayed in the hospital for a week when he's around 2, and thereafter in around 3-4 months, whenever he went to clinics or saw something like "an injection", he cried crazily and wanted to leave immediately. All you have to do is to hold him tight, give support to him and divert him to the toys or things your kid loves, after some time, your kid should be fine. Don't worry.