One of the situations that require one to recite Birkat Ha'gomel (the Beracha recited after escaping a situation of danger) is the recovery from an illness. The authorities debate the question of how long a period of incapacity renders one obligated to recite this Beracha. According to the Shulchan Aruch, O’H siman 219:8, even if a person is bedridden as a result of his illness, this illness is deemed a situation of potential danger, and the patient must recite Birkat Ha'gomel upon recovering from his illness. The Rama (Rabbi Moshe Isserles, Poland, 1525-1572), however, held that a patient recites this Beracha only if his illness is deemed life threatening. The Taz (siman 219, S”K 5) says that one must be bedridden for at least 3 days to recite HaGomel.
The practice among Sephardim follows the ruling of the Shulchan Aruch, requiring the recitation of Birkat Ha'gomel even upon recovering from a non life threatening illness that causes the person to be bedridden for any amount of time. This practice is in accordance with the principle that where there is an established Minhag (custom) concerning the recitation of a Beracha, we follow the accepted custom even if it is subject to some controversy. This is, indeed, the position of many leading authorities, including Rabbi David Abudarham (Spain, 14th century), the Chid"a (Rabbi Chayim Yosef David Azulai, Israel, 1724-1806) in L’David Emet, siman 23 Ot 7, Chacham Bentzion Abba Shaul (Jerusalem, 1924-1998) in Or L’Tzion helek 2:44 page 141, and Chacham Ovadia Yosef in Halichot Olam, Helek 2 Parashat Ekeb.
Therefore, a person who, Heaven forbid, suffered a bad flu, fever, or even a debilitating cold, which kept him bedridden for even a single day, should recite Birkat Ha'gomel upon recovering from his illness.
How soon after escaping the dangerous situation must one recite Birkat Ha'gomel?
The Shulchan Aruch writes (219:6) that Halacha imposes no time limit on the recitation of Birkat Ha'gomel; in principle, even several weeks or months later, a person can and should still recite this Beracha. Nevertheless, he advises that one preferably recite the Beracha within three days of the given event, as some authorities held that one cannot recite Birkat Ha'gomel after three days have passed since escaping the dangerous situation.
This ruling of the Shulchan Aruch yields an interesting application in a case where a person returns from a trip or recovers from an illness on Monday, but is not able to be present in the synagogue for that day's Torah reading. Customarily, one who must recite Birkat Ha'gomel does so in the framework of Torah reading, when the requisite presence of a Minyan is assured. If, however, one returns from a dangerous condition on Monday, then he will have to wait three days – until Thursday – before reciting Birkat Ha'gomel. The work "Kenesset Ha'gedola" in siman 219, ruled that in such a case, the person should not wait until Thursday, and should instead assemble a Minyan on Monday, Tuesday or Wednesday for the recitation of the Beracha. Since the Shulchan Aruch urges reciting the Beracha within three days of the given event, it is preferable not to wait until the next available Torah reading if this would require reciting the Beracha three days after returning from the trip of recovering from illness. (See Magen Avraham, ibid s”k 6.)
Summary: A person who took ill and was bedridden for even a single day – such as a flu, fever or bad cold – must recite Birkat Ha'gomel upon recovering from his illness. When one is required to recite Birkat Ha'gomel, he should endeavor to do so within three days of his escaping the given situation, even if he cannot be present at a Torah reading until three days later. Nevertheless, if a person did not recite the Beracha within three days, he may recite it later, and there is no time limit on this obligation.