Pnuemonia shot and ivig

I am reaching out for some info. I just had surgery to remove my tonsils, uvula &shave down pallette, because of severe sleep apnea. My lungs were very weak, so I was on a breathing tube for 2 1/2 days. I had IVIG treatment this Monday and I need to have a pneumonia shot. My question is can I have this shot so soon after my treatment. Will it be effective or do I have to wait a number of days? I'd like to have it before leaving the hospital tomorrow if at all possible.