There is no comprehensive list that includes everyone
Ethnicity is not always defined formally, and attempts to define formal ethnicities are often lacking. For example, the Lao government has categorized the entire population into 49 official major ethnicities in 160 ethnic groups, and yet there are many who feel that their identity has been neglected.
UPDATE:
Perhaps it is possible to extract the ethnicities that are of interest for a medical diagnosis and only list those. Listing all 160 Lao ethnic groups will most likely be very irrelevant in this context.
Ethnicity can be a very sensitive issue
Asking for ethnicity in Sweden, for example, might trigger a warning signal about racist intents.
UPDATE:
Explain clearly why you're asking.
Ethnicity has no strict borders (necessarily)
Unlike countries, the outer borders of an ethnicity can often be fuzzy. Which group/groups an individual belongs to is not always clear from the individuals and/or the groups perspective. The mere question can feel excluding if you don't have a group that you strongly identify with, even if it was possible to create a complete list.
UPDATE:
You are most likely interested only in the biological heritage, not a feeling of social belonging. Make sure to explain this to the user.
Where (and if) you ask depends on why you ask
You need to clearly define your purpose for asking for ethnicity and design from there. If you are designing a BMI calculator for example, find out which ethnic groups of people might be relevant to your calculations and ask specifically for those (and make it clear why you are asking). If, on the other hand, you need to know people's customs, holidays, cuisine, etc., you're probably better off asking specifically for those.