In the Netherlands, every doctor, and so every general practitioner (huisarts), has a ‘duty of care’. The doctor or GP cannot refuse you just because as an undocumented migrant you do not have a residence permit and so cannot take out health insurance. You do have an obligation to pay for the healthcare you receive. If you are unable to pay, the GP can get a (large) part of the costs back from the Netherlands Health Care Institute (Nederlands Zorginstituut).