Ibn 'Abbas narrated that the Prophet (S.A.W) said:
"There is no Muslim worshiper who visits one who is ill - other than at the time of death - and he says seven times: As'alullah Al-'Azeem Rabbal 'Arshil 'Azeem an yashfik ('I ask Allah the Magnificent, Lord of the Magnificent Throne to cure you') except when he will be cured." (JA)
English reference (JA): Vol. 4, Book 2, Hadith 2083 (JA)
Arabic reference (JA): Book 28, Hadith 2227 (JA)