Persistent cough need advice

I have had the same cough now for about 3 to 4 weeks with dark green mucus coming out of my system. I know any type of mucus could be a sign of infection or might just be. Well, my fiancé and I sleep with the fan on at night because he sweats at night and I'm usually freezing so I turn the fan on for him. Anyway, today I've realized when I cough I have a pain right below my chest plate in the center I'm not sure why. I was reading it could be pneumonia but I'm not sure. I already have Bronchitis and use a breathing machine to clear my lungs when needed. Could this be pneumonia or something else? I'm thinking of taking a visit to my primary  care
Thanks