This is Dr. David
I am sorry you have pneumonia.
you could be having bronchiectasis after your pneumonia infection
you might need a course of steroid therapy and stronger cough medications after your infection.
talk to your doctor about a short course of steroid therapy to help the cough and also cough medication like codeine with guaifenesin to help the cough.
let me know if this helps.