Productive cough with thick yellow phlegm does suggest an ongoing chest infection
and a community acquired pneumonia
(CAP) will be the initial diagosis. Chest X Rays can be insensitive so a HRCT scan chest is indicated if you wish to completely rule out this diagnosis. Rhinosinusitis with allergies making your chest symptoms feel worse is the other possibility and sinus CT is then indicated.
antibiotics are the best option to treat CAP and sinusitis (although viral triggers are more common).
Allergy testing (specific IgE blood test
or skin prick test) to exclude severe house dust mite allergy
or fungal allergen sensitization is also indicated and treatment can then be initiated according to the results.