It depends on functional status of patient. If patient can keep himself clean then he can definitely offer prayers. Patient can also fast if patient can tolerate fasting easily. Patients with diabetes should discuss with their doctor regarding fasting.