You need to see a specialist, perhaps an allergist or hematologist if an immunological problem is present. Coughing up green is usually indicative of an infection...did the doctors ever culture your sputum to see what is growing in there? If the bacteria was resistant to the antibiotics that you were given then they would be useless. I should also ask how your sinuses are doing as they could be a source of a lingering infection..
If your doctor thinks that your immune system is weak then perhaps he could check out your immunoglobulin levels to make sure there isn't any true deficiencies. If there are, there are treatments out there that can help boost your immune system so that the frequencies of your infections decreases.
I am not a doctor, just a former RN so please take what I say for face value.
I hope this helps, Sunny
I have had this for about 6 years. I am seeing an allergist/immunologist today. My father had an immune system deficiency when they did his blood work - and he constantly was in the hospital with bronchitis and other related problems. Whatever meds he takes now has basically fixed the deficiency.