If I have a medical condition such as a stroke, epilepsy, heart condition, asthma or have recently had an operation can I still fly?

If I have a medical condition such as a stroke, epilepsy, heart condition, asthma or have recently had an operation can I still fly?