This is a common worry of people in Malta who use abortion pills, because abortion is illegal.
In most cases, a doctor will not know you used abortion pills unless you tell them yourself. This is because an abortion with pills and a natural miscarriage are very similar. There is no test they can do to check whether you took abortion pills, unless they find the pills themselves. Women on Web advise that Misoprostol is put under the tongue instead of inside the vagina, so that no residue of the pills can be found. If you have put Misoprostol in the vagina, you could try to remove any residue with your finger before seeing a doctor.
If you have taken abortion pills and you think you need medical help, for example you feel very weak, have bled too much, or have a fever, you should seek help immediately. All doctors are duty bound to help patients in emergencies, even if they do not agree with their choices.