Hadithcore
Riyad as-Salihin, 1674

Anas (May Allah be pleased with him) said:

The Messenger of Allah (ﷺ) said, "Not the transmission of disease of one person to another and no evil omen, but I am pleased with good omens." He was asked: "What is good omen?" He replied, "A good word." <b>[Al-Bukhari and Muslim]</b>.

عن أنس رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏"‏لا عدوى ولا طِيَرة ويعجبني الفأل‏"‏ قالوا‏:‏ وما الفأل‏؟‏ قال‏:‏ ‏"‏كلمة طيبة‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 17, Hadith 164
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) The Shariah denies the concept of contagion during the pre-Islamic period of ignorance when they believed that a disease can be infectious by itself. However, diseases can transmit from sick to healthy people, by the will of Allah Almighty.<br> 2) Pessimism and taking bad omens are prohibited, as they instill lethargy, grief, and distress into people.