If your health issue is not a medical emergency and you're just going to the doctor for a regular checkup and the doctor decides they do not wish to treat you anymore then they can legally tell you to go see another doctor and not come back to them.
But if the issue is an urgent issue that really does need treated then the doctor must see you in most cases.
But if the health issue is really urgent the doctor will then urge you to go to the emergency room anyway and then the hospital and nurses in the hospital cannot refuse to treat the patient.
But individual doctors usually just perform regular medical checkups and do not treat really serious health issues anyway.
However the doctor by federal regulations cannot refuse to accept a person for ethnic, racial, or religious reasons.