Q: If I am sick or worried that I may get sick, do I still need to attend prayer in the masjid.
A: The following cases excuse those obligated from attending Friday and congregational prayers: 1. when sick or [legitimately] fearful of sickness (while not in the masjid), 2. when holding back either urine or stool, 3. when food is presented while hungry (it is allowed to eat until satiated), 4. when looking for someone lost, 5. whoever fears the loss or destruction of their property or earnings, 6. fears the death of a relative or close friend, 7. fears harm from the authorities, rain, etc. 8. (fears harm) from the persistence of a debtor while insolvent, 9. or (fears the) loss of a travel group, etc. Source: Bidayat al-Abid