It is narrated from Urwah (may Allah have mercy on him) that the Prophet (ﷺ) instructed Duba'ah and said: "Do you not wish to perform Hajj?" She said, "I am doubtful due to illness." The Prophet (ﷺ) said: "Enter into the state of Ihram for Hajj and stipulate the condition that I will become free from Ihram wherever I am prevented (from proceeding) due to my illness."
Hadith Referenceمسند الإمام الشافعي / كتاب الحج / 815
Hadith Takhrijاسناده صحیح اخرجه البيهقى 5 / 223 ۔ وفى المعرفة السنن والآثار له (3262)۔