There are several doctors who can provide nail fungus treatment. Your primary care provider, a dermatologist, or a podiatrist can treat nail fungus. Any one of these doctors can provide proper diagnosis and prescribe medications specific to fungal infection. A podiatrist or dermatologist may shave the top layer of the nail off or even remove part of the nail.
In some cases of suspected nail fungus there is actually no fungal infection, but only nail deformity. A 2003 source gives a figure of 50% whereas a more recent source claims that fungus is present in 65 to 95 percent of cases. Avoiding use of oral antifungal therapy (e.g. terbinafine) in persons without a confirmed infection is a particular concern because of the possible side effects of that treatment. However, according to a 2015 study, the cost in the United States of testing with the periodic acid–Schiff stain (PAS) was about $148. Even if the cheaper KOH test is used first and the PAS test is used only if the KOH test is negative, there is a good chance that the PAS will be done (because of either a true or a false negative with the KOH test). But the terbinafine treatment only cost $10 (plus an additional $43 for liver function tests). In conclusion the authors say that terbinafine has a relatively benign adverse effect profile, with liver damage very rare, so it makes more sense cost-wise for the dermatologist to prescribe the treatment without doing the PAS test. (Another option would be to prescribe the treatment only if the potassium hydroxide test is positive, but it gives a false negative in about 20% of cases of fungal infection.) On the other hand, as of 2015 the price of topical (non-oral) treatment with efinaconazole was $2307 per nail, so testing is recommended before prescribing it.