A diagnosis is when the cause of the illness is identified (e.g., the common cold, pneumonia, lung cancer, etc.). A prognosis is a prediction about how the illness will develop.
In the case of people who are terminally ill, the prognosis is often the physician’s estimate of how long the illness will take to run its course before the patient dies.