Commercial insurance of all types is haraam, whether it is life insurance, health insurance or insurance of one’s property. But it is permissible to deal with it in two cases:
1. When a person is forced to do so, such as if he is forced to take out insurance on his car or a company forces its employees to take out health insurance. In that case the sin is on the one who forces people to do that.
2. When a person is compelled to take out health insurance or he is in great need of it because he is not able to cover the cost of treatment from his pocket without having insurance. This is a need which makes it permissible to deal with health insurance according to a number of scholars, because the reason for the prohibition on this insurance is the ambiguity and the element of gambling, not riba. When it is like that, it is permissible in the case of need.
The nature of the ambiguity is that the individual pays money but does not know whether his benefiting from medical services will be equal to that or more or less.
Some types of insurance are based on both ambiguity and riba, such as life insurance, where the individual pays instalments and does not know how many they will be, in return for a known sum of money that is more than he paid.
Among those who are of the view that health insurance is permissible in the case of need are: Dr. ‘Ali Muhiy al-Deen al-Qurrah Daaghi, Dr. ‘Abd al-Rahmaan ibn Saalih al-Atran, Dr. Yoosuf al-Shubayli and Dr. Khaalid al-Du‘ayji.
Among the statements of the scholars that what is forbidden because of ambiguity is permissible in cases of need are the words of Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him):
The same applies to ambiguous transactions, which are a kind of gambling, but some types may be permissible in the case of need and where it serves a clear interest.
End quote from Majmoo‘ al-Fataawa, 14/471
And he (may Allah have mercy on him) said:
Ambiguous transactions are forbidden because they are a kind of gambling which may lead to consuming people’s wealth unlawfully. But if that is countered by a greater harm, that makes it permissible so as to ward off the greater of two evils by putting up with the lesser. And Allah knows best.
End quote from Majmoo‘ al-Fataawa, 29/483
He also said: The evils caused by ambiguous transactions are less than those caused by riba, therefore a concession is granted when there is a need, if the prohibition on ambiguous transactions may cause greater harm than the transaction itself. Examples include sales of property, even if you do not know what is inside the walls or foundations, and sales of pregnant or suckling animals, even if you do not know the size of the embryo or the amount of milk, and even though it is forbidden to sell what is in the uterus on its own or the milk on its own (separate from the animal), according to most scholars. Another example is selling crops after it is clear that they are going to be good (although there cannot be absolute certainty), which is permissible according to the Sunnah. The Prophet (blessings and peace of Allah be upon him) allowed the buyer of date palms that had been pollinated to stipulate that they should bear fruit, so he bought crops before there was any sign that they would be good, but that was on the basis of buying the origin (i.e., the trees). Thus it becomes clear that in cases of mild ambiguity (when the ambiguity pertains to that which is secondary to the original item) it is permitted to do what is not permitted in other cases.
End quote from al-Fataawa al-Kubra, 4/21
What seems to be the case is that it is permissible to work as a doctor in the insurance department of the hospital and that is not regarded as helping in something haraam, because among the patients there are those who need this insurance or are compelled to take it out, or the company for which they work was forced to take out insurance on them and their families. In these cases it is permissible for people to benefit from health insurance as stated above. There will still be some who do not need it, but it is difficult to tell them apart and we ask Allah to forgive them.
And Allah knows best.