A person is sick but still goes on work.He knows he is somewhat sick,but still goes to work without considering the potential harm he could be doing to the vulnerable ICU patients by going to work with sickness .In an extreme case that someone or some people die from a sickness unintentionally passed on by this worker ,is this worker considered a killer in Islam.
Many scholars began books with the below Hadith. Imam Al-Bukhari commences his book of Hadith (Saheeh Al-Bukhari) with this Hadith and explains that every action that is done without seeking Allah’s pleasure is invalid and devoid of reward.
Narrated 'Umar bin Al-Khattab:
I heard Allah's Messenger (ﷺ) saying, "The reward of deeds depends upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for." Sahih al-Bukhari 1
It is possible that the limits of the saying, 'actions are by intention', are that the action is good, corrupt, acceptable, rejected, rewarded, or not rewarded according to the intention. Therefore, this statement informs us of the Islamic ruling concerning this: the correctness or incorrectness of the action is in accordance with the correctness or incorrectness of the intention.
The saying of the Prophet (PBUH) after this: 'and for everyone to what he intended' informs that one can not gain anything from his action except what he intended. So if he intended good, he gets good. If he intended evil then he gets evil. This second statement (of the Hadith) is not merely reiterating the first, because the first statement points to the fact that the goodness or corruptness of the action is according to the intention necessary for that action to exist. The second statement points to the fact that the reward of a person for his action is according to his good intention, and that the punishment for his action is according to his evil intention.
If a sin is done unintentionally, inshallah he is forgiven by Allah as it was never his/her intention do so. For example, on eating at McDonalds (USA) you may find out that the french fries are laced with beef flavoring. Your intention was only to eat the vegetarian potato fries and you were unaware that they also had (non-halal) sprinkling of beef on them. As long as you were unaware, you are not accountable for it.