According to the version of Al Nufaili, A’ishah said “The Prophet ﷺ used to pass by a patient while he was observing I’tikaf(in the mosque) but he passed as usual and did not stay asking about him.” According to the version of Ibn Isa she said “The Prophet ﷺ would visit a patient while he was observing I’tikaf.”
كَانَ النَّبِيُّ ﷺ يَمُرُّ بِالْمَرِيضِ وَهُوَ مُعْتَكِفٌ فَيَمُرُّ كَمَا هُوَ وَلاَ يُعَرِّجُ يَسْأَلُ عَنْهُ وَقَالَ ابْنُ عِيسَى قَالَتْ إِنْ كَانَ النَّبِيُّ ﷺ يَعُودُ الْمَرِيضَ وَهُوَ مُعْتَكِفٌ