Ibn `Abbas (May Allah be pleased with them) reported: When `Ali (May Allah be pleased with him) came out after visiting the Messenger of Allah (PBUH) during his last illness, the people asked: "How is Messenger of Allah (PBUH), O Abul-Hasan?" He replied: "Praise be to Allah, he (PBUH) is feeling better."[Al-Bukhari].
This Hadith shows that if a patient is in a critical condition and people are advised not to visit him, it will be appropriate to enquire of his blood relatives about his health. The family members, too, are supposed to give an encouraging report about the patient's condition to enquirers.