كتاب الحج
15
The Book of Pilgrimage
(15)
Chapter: It is permissible for the Muhrim to stipulate a condition for exiting Ihram because of sickness and the like
(15)
باب جَوَازِ اشْتِرَاطِ الْمُحْرِمِ التَّحَلُّلَ بِعُذْرِ الْمَرَضِ وَنَحْوِهِ ‏

`A'isha (Allah be pleased with her) reported that Allah's Messenger (ﷺ) went (into the house of) Duba`a bint Zubair and said to her:

Did you intend to perform Hajj? She said: By Allah, (I intend to do so) but I often remain ill, whereupon he (the Holy Prophet) said to her: Perform Hajj but with condition, and say: O Allah, I shall be free from Ihram where you detain me. And she (Duba`a) was the wife of Miqdad.
حَدَّثَنَا أَبُو كُرَيْبٍ، مُحَمَّدُ بْنُ الْعَلاَءِ الْهَمْدَانِيُّ حَدَّثَنَا أَبُو أُسَامَةَ، عَنْ هِشَامٍ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، - رضى الله عنها - قَالَتْ دَخَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى ضُبَاعَةَ بِنْتِ الزُّبَيْرِ فَقَالَ لَهَا ‏"‏ أَرَدْتِ الْحَجَّ ‏"‏ ‏.‏ قَالَتْ وَاللَّهِ مَا أَجِدُنِي إِلاَّ وَجِعَةً ‏.‏ فَقَالَ لَهَا ‏"‏ حُجِّي وَاشْتَرِطِي وَقُولِي اللَّهُمَّ مَحِلِّي حَيْثُ حَبَسْتَنِي ‏"‏ ‏.‏ وَكَانَتْ تَحْتَ الْمِقْدَادِ ‏.‏
Reference : Sahih Muslim 1207 a
In-book reference : Book 15, Hadith 111
USC-MSA web (English) reference : Book 7, Hadith 2756
  (deprecated numbering scheme)