Taking pills to prevent menses in order to observe i’tikaaf
Question

                I want to sit in Aitikaaf. This would be my third time I will be in Aitikaaf. My menses date will be somewhere in the last 10days of Ramadaan. There are pills available nowadays to stop the periods. I have used them while I sat in Aitikaa for the first time as my menses date was there. But this time I am afraid to use them as I had cancer and I have been operated and went through Chemotherapy. When I was diagnosed to cancer I did neeeyat that may ALLAH grant me health and I will sit in Aitikaaf. Now it the matter of my promise with ALL MIGHTY ALLAH. What should I do? Should I consult a doctor to know if the pills would be no harm or shall I not sit in Aitikaaf? Please tell me as I am very worried.
Praise be to Allah.Firstly: 
We ask Allaah to heal you 
    and grant you good health, and to keep your spiritual and worldly affairs 
    safe and sound.  
Secondly: 
It is permissible to take 
    pills to prevent menses in order to be able to do acts of worship such as 
    i’tikaaf, ‘umrah and Hajj, but that is subject to the condition that they 
    should not be harmful to the body. As you are suffering from the disease 
    that you mentioned, you have to consult the doctor before taking these 
    pills, and make sure that they will not conflict with your treatment or 
    cause any harm to you. The Muslim is enjoined to take care of his body and 
    not harm it, because Allaah says (interpretation of the meaning): 
“And do not kill 
    yourselves (nor kill one another). Surely, Allaah is Most Merciful to you”
[al-Nisa’ 4:29] 
“and do not throw 
    yourselves into destruction”
[al-Baqarah 2:195]
and the Prophet  (peace 
    and blessings of Allaah be upon him) said: “There should be neither causing 
    harm nor reciprocating harm.” Narrated by Ahmad and Ibn Maajah (2341), 
    classed as saheeh by al-Albaani in Saheeh Ibn Maajah. 
It says in al-Adaab 
    al-Shar’iyyah (2/463): It is haraam to use as a remedy anything that 
    causes harm. End quote. 
Based on this, if these 
    pills are harmful then it is not permissible for you to take them, and you 
    can start i’tikaaf, then if your menses comes then you should leave the 
    mosque and stop i’tikaaf; this is an excuse for you to stop it, and in fact 
    it will be obligatory for you to do so because it is not permissible for a 
    menstruating woman to remain in the mosque. 
But if they are not harmful 
    then there is nothing wrong with your taking them. 
And Allaah knows best.