Ibn 'Abbas (May Allah be pleased with them) reported:
The Prophet (ﷺ) visited a bedouin who was sick. Whenever he visited an ailing person, he would say, "La ba'sa, tahurun in sha' Allah [No harm, (it will be a) purification (from sins), if Allah wills]."[Al-Bukhari]. (TH)
App reference (TH): Book 7, Hadith 14 (TH)
Arabic/English book reference (TH): Book 7, Hadith 907 (TH)