That's a very circumstantial decision, but I think in most cases the answer is yes. If the individual in question will use the time to say goodbye to loved ones or do something they've always wanted to do, or get their affairs in order, then it is clearly the right thing to do.
However, if the patient is psychologically liable to just shut down after hearing that prognosis, then maybe it would be best to tell the patient's family/care givers but not the patient himself.
And of course, there's always that scene from House M.D. where a terminally ill patient got better but had gone through all the preparation for death - sold his house, had good-bye parties, and had run up lots of credit card debt trying to rush through his bucket list... Whoops.