If an illness weakens your work ability in the long term and to a significant extent, the employer may have grounds for dismissal. This requires an assessment by a doctor concerning the possibility for rehabilitation.
Usually if a person’s disability lasts around a year and an assessment states that it will be permanent, this is considered proof that they can no longer return to their former job.