If the marriage is only for immigration purposes you are commiting fraud. Last thing a Dr. needs is to have that issue with them. If you marry before you are a resident you will lose your place in the categories.
If your friend plans to study in the U.S. and has no U.S. Citizen Relatives then he should seek an F-1 Student Visa.
First, make sure you do not get married until after you have been issued your immigrant visa and have come to the United States. If you go to the US Consulaet in India and they approve you all they are approving is the issuance of your immigrant visa. You will not actually becomne a green card holder until you arrive in the U.S. with the visa. We have had Indian clients who went to the immigrant visa interview and then married before coming to the U.S. and, by doing so, made themselves ineligible for the green card.
Second, once you have your green card you are free to marry at any time (as long as it is a real marriage and not a marriage to get a green card). Once you marry him you can petition for him and he can join you in the U.S. in a couple of years.
Third, if he wants to come to the U.S. sooner, you may want to hold off on marrying him until he is in the U.S. because if he marries you it will be more difficult for him to get a visa. His options for coming to the U.S. would be a job offer that requires his degree or coming to continue to study.
Fourth, if he looks into coming to the U.S. to study, make sure he stays away from the J-1 Visa. The reason is that with the J-1, especially for medical students, he will be required to spend two years back in India after he completes his studies before he can return to the U.S.