Since the insurance is compulsory, then what the insurance company pays in return for medical treatment is similar to donation, and I pray to Allah The Almighty that this is lawful even if this service is deducted from your salary in return of it, so in this manner you take back some of the amount you paid in form of above treatment. And Allah Knows Best.