Thanks for the question.
This certainly is concerning and you need to see your doctor.
Bile is green.
Or yellow when vomited.
What concerns me here is that brown, in addition to food, might reflect minor bleeding.
If you are getting this from the lungs, then serious infection.
This cough could be pneumonia, and one can walk around with atypical pneumonia until it is a real problem.
This is serious enough that I would recommend you go to A&E now.
OK, so you might have more questions or want to give me more information: Please use reply to expert if you have further questions.
Also, please click a positive rating [hopefully excellent (5)—that’s how we are paid, per rating]. If you forgot something, just use reply and come back. I am here http://www.justanswer.com/medical/expert-dr-thomas/