She is supposed to be dying. Also read somewhere that it turns into a storyline about her choosing when she will die but don't know how much truth is in tat.
Hayley did not know herself that she was ill when she went to the doctor, so it was a shock to her. No doubt she will deteriorate quickly with the condition. Many people are terminally ill without it showing until the later stages.