Firstly: The Ruling of Medical Treatment
Scholars are of two positions regarding medical treatment:
The first position: Medical treatment is permissible. This is the position of the majority: the Hanafis, Malikis, and Hanbalis.
The second position: Medical treatment is mustahabb. This is the position of the Shafi`i school, the majority of the Salaf, the generality of the Khalaf, and Ibn Baz.
Secondly: The Ruling of Reciting Ruqyah and Asking for It
Ruqyah  It is permissible to request ruqyah. However, not doing so, being independent of others, and doing it for oneself is superior. (healing supplications and invocations) is permissible by agreement of the four schools of jurisprudence.  Ruqyah is permissible when three conditions hold: that it be with the word of Allah the Exalted, His names, or attributes; that it be in Arabic or at least understood; and that he be convinced that the ruqyah does nothing on its own, but only through Allah the Exalted.
Thirdly: The Ruling of Groaning
The groaning of a sick person is not makruh.  As long as it the groaning is not done to complain. Ibn Taymiyyah says: “It is related from Tawus that he disliked the groaning of sick people. He said: ‘He is complaining.’” (Majmu` al-Fatawa, 24/284) Ibn al-Qayyim says: “To be accurate, there are two types of groaning: groaning done to complain, which is makruh, and groaning for the purpose of resting and alleviation, which is not makruh. And Allah knows best.” (`Uddat al-Sabireen, p. 272) This is explicitly mentioned by Shafi`is, is one narration from Ahmad, and is the position of choice according to Ibn Baz.
Fourthly: The Ruling of Wishing for Death
It is makruh to wish for death due to hardship that has befallen one. As for when one wishes for it because he is afraid of being tried in his religion, that is not makruh. This is by agreement of the four schools of jurisprudence.
Fifthly: Visiting Sick Muslims
It is mustahabb to visit sick Muslims. This is by agreement of the four schools of jurisprudence.
Sixthly: Visiting Sick Dhimmis
It is permissible to visit a sick dhimmi, particularly if one hopes that he might enter the fold of Islam. This is the position of the Hanafi and Shafi`i schools, one narration from Ahmad. It is also the position of Ibn Hazm, Ibn `Abd al-Barr, Ibn Taymiyyah, al-Shawkani, and Ibn `Uthaymin. The Permanent Council issued its verdict in accordance with this position.
Seventhly: Mannerisms for Visiting the Sick Supplicating for the sick person
It is mustahabb for one visiting a sick person to supplicate for them. This is explicitly mentioned by Malikis, Shafi`is, and Hanbalis. Keeping the visit short
The visitor should keep their visit short and not sit at length with the sick person.  Unless he requests that he stay. This is explicitly mentioned by Malikis, Shafi`is, and Hanbalis. Encouraging the sick person to repent
It is mustahabb to encourage the sick person to repent. This is explicitly mentioned by Hanafis, Shafi`is, and Hanbalis. Encouraging the sick person to prepare their will
It is mustahabb to encourage the sick person to prepare their will. This is explicitly mentioned by Hanafis, Shafi`is, and Hanbalis. Urging the sick person to improve their opinion of Allah
It is mustahabb to encourage the sick person to improve their opinion of Allah, Glorified and Exalted. This is explicitly mentioned by Hanafis and Shafi`is. Not visiting the sick person daily
One must not visit a sick person daily.  Al-Nawawi says: “I say that this is for people in general. As for the sick person’s relatives, friends, and others that he finds comfort in…or who would find it difficult if they didn’t see him every day, they should visit him continuously until he asks them not to or they know that he dislikes it.” (Al-Majmu`, 5/112) Ibn al-Muflih says: “The difference of opinion is due to human differences. Action is based on context and what is apparent.” (Al-Furu`, 3/254) This is explicitly mentioned by Shafi`is and Hanbalis.