Whenever the Messenger of Allah ﷺ visited a sick person, he would say, "Take away the affliction, Lord of mankind. Heal, for You are the Healer. There is no healer but You. Grant a cure that leaves behind no illness."Hammad's wording was, "There is no cure but Your cure, a cure that leaves behind no illness."
حدثنا عفان حدثنا حماد بن سلمة عن حميد وحماد
أن رسول الله ﷺ كان إذا دخل على المريض قال أذهب الباس رب الناس اشف أنت الشافي لا شافي إلا أنت اشف شفاء لا يغادر سقما وقد قال حماد لا شفاء إلا شفاؤك شفاء لا يغادر سقما
Its isnad is sahih. It was mentioned previously at 8197, and it is found in all the standard collections in the chapters on medicine, except Muslim, who has it in the chapter on greetings. Bukhari related it in 7/157, in the chapter on the supplication of one visiting a sick person, Muslim in 4/1722 no. 2191, Abu Dawud in 4/212 no. 3883, and Ibn Majah in 2/1166 no. 3530.