It is mandatory for you to stay for the entire duration of the program in order to receive its full benefits. In case of emergencies, you can raise a ticket here https://ishahealthsolutions.ishafoundation.org/support/home to check for possible options, including registering for other programs or canceling your registration from the current program.