We say "have epilepsy". When you talk about conditions or diseases, "a/an" is not necessary.
We say "have epilepsy" (not "have an epilepsy").
My niece has epilepsy.
My niece has an epilepsy.
When you talk about conditions or diseases, a/an is not necessary.
Having epilepsy can involve some challenges.
Children are more likely to have epilepsy of genetic or unknown origin.
Follow the same convention with the expressions "treat epilepsy", "cause epilepsy", "prevent epilepsy", etc.
Head trauma can cause epilepsy.
But you can introduce a possessive pronoun (my, your, his, her, etc.) to identify this condition.
Your doctor may prescribe one of the anti-epileptic medications to treat your epilepsy.
The word epilepsy can also function as an adjective. In such a situation, it can be preceded by the articles "an".
Last Monday I received an epilepsy diagnosis.
A partial list of other conditions that do not take the indefinite article a/an: