When visiting the sick, one should address the sick person and recite the following dua:
يَا فُلَانُ، شَفَى اللهُ عَزَّ وَجَلَّ سَقَمَكَ، وَغَفَرَ لَكَ ذَنْبَكَ، وَعَافَاكَ فِي دِينِكَ وَجِسْمِكَ إِلَى مُدَّةِ أَجَلِكَ
O so-and-so (in place of the word ‘fulaan’, mention the name of the sick person), may Allah Ta‘ala cure your sickness, forgive your sins, and grant you aafiyah (ease) in your deen and body till the time you pass away
عن سلمان رضي الله عنه قال: عادني رسول الله صلى الله عليه وسلم وأنا مريض، فقال: يا سلمان، شفى الله عز وجل سقمك، وغفر لك ذنبك، وعافاك في دينك وجسمك إلى مدة أجلك (عمل اليوم والليلة لابن السني، الرقم: 548)
Hazrat Salmaan (radhiyallahu ‘anhu) reports that on one occasion Rasulullah (sallallahu ‘alaihi wasallam) visited me while I was sick. Rasulullah (sallallahu ‘alaihi wasallam) recited the following dua:
يَا سَلْمَانُ، شَفَى اللَّهُ عَزَّ وَجَلَّ سَقَمَكَ، وَغَفَرَ لَكَ ذَنْبَكَ، وَعَافَاكَ فِي دِينِكَ وَجِسْمِكَ إِلَى مُدَّةِ أَجَلِكَ