Q: I am going to the doctor and they going to put a camera down my throat. So i may fast or i may not fast. also i work till 2am and sometimes fall asleep. can i make my intention after i get up if i am in doubt if i am going to fast due to sickness? (text)
A: A person not having eaten anything from the time in which the fast has begun can do the following: Make intention upon getting up so long as it is done before zawal. Additionally, add to the intention that you are fasting from the break of dawn (subhu sadiq.)
If you feel going to the doctor would invalidate your fast and rescheduling would be difficult for a time in which you are not fasting, then merely not fast but attempt to resemble a fasting person and do a makeup after Ramadaan.
Allah Certainly Knows Best.