In the right context, you really can say "I am leaving the hospital." If you are at lunch with some coworkers at the hospital and you say that, they will know that you aren't a patient being discharged, and they will know because you are in the middle of lunch that you aren't just stepping out for an errand.
And if you use the name of the institution, instead of a generic description, it is even more clear that you are quitting your job. If you work at Smith Memorial Hospital and say "I am leaving Smith Memorial," that generally means that you are quitting your job there. Sometimes people will phrase it this way because "quitting" can have a somewhat negative connotation.