Hi,
I just spoke to service ontario customer care center to find out (for you) and here is what they said:
Once you land in ON, canada to finish off the landing procedure, you are eligible to apply for OHIP and you should not be out of ON for more than 30 days. If you plan to stay out for more than 30 days, then dont apply before leaving to your country. Your application will be invalid in that case. Come back to canada and then apply. In reply to your question, Going to your country for more than 30 days wont affect your eligibility for OHIP.
I hope this helps.
Thanks,
satya.