This depends on the specific illness. If the employer has a special duty of care due to the illness, they can of course only fulfill this duty if they are aware of the illness. In particular, if the illness has an impact on the workplace, there is a duty to inform. This is the case, for example, with infectious diseases or if there is a risk of contamination in the production of food, for example with salmonella.