Yes, doctors are not required to treat people who cannot or will not pay them. The law does not make doctor's provide their valuable time for free. Your recourse if you need medical care but your doctor will not see you is to go the emergency room; an emergency room can recommend you see a different physician, but cannot turn you away.