كتاب الحج
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)
باب جَوَازِ اشْتِرَاطِ الْمُحْرِمِ التَّحَلُّلَ بِعُذْرِ الْمَرَضِ وَنَحْوِهِ ‏
Sahih Muslim 1207 b

A'isha (Allah be pleased with her) reported that Allah's Apostle (ﷺ) went (to the house of) Duba'a bint al-Zubair b. Abd al-Muttalib. She said:

Messenger of Allah, I intend to perform Hajj, but I am ill. Thereupon Allah's Apostle (ﷺ) said: Enter Into the state of Ihram on condition that you would abandon it when Allah would detain you.
وَحَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ، - رضى الله عنها - قَالَتْ دَخَلَ النَّبِيُّ صلى الله عليه وسلم عَلَى ضُبَاعَةَ بِنْتِ الزُّبَيْرِ بْنِ عَبْدِ الْمُطَّلِبِ فَقَالَتْ يَا رَسُولَ اللَّهِ إِنِّي أُرِيدُ الْحَجَّ وَأَنَا شَاكِيَةٌ ‏.‏ فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏ "‏ حُجِّي وَاشْتَرِطِي أَنَّ مَحِلِّي حَيْثُ حَبَسْتَنِي ‏"‏ ‏.‏
Reference : Sahih Muslim 1207b
In-book reference : Book 15, Hadith 112
USC-MSA web (English) reference : Book 7, Hadith 2757
  (deprecated numbering scheme)