I didn't, originally, the doctor determined it after the lab tests came back, which included heavy metal tests. He said I'm in a gray area and he could justify starting chelation, but he thought that explained only some of my issues and I should have something else. He never found anything else and chelation had FAR more success than anticipated by either him or me.
I did have a hint before that: after a health escalation I suffered - visibly even (mouth) - from Candida. I even was prescribed, as I wrote, a systemic drug, which no doctor would ever subscribe for the "psyche" because that is serious stuff impacting the liver (and as I wrote, I got quite yellow after those two, or was it three?, weeks - but a lot of bowel issues and the feeling in my mouth were just gone). The problem: Candida has a deeper cause. It's immune compromised people. But there was nothing for me, and the only thing I found was heavy metals. So I went to a university clinic and got tested. Fortunately it showed up in the blood and urine tests, which is not a given if you have low-level long-term exposure and have most of the burden intracellular and/or stored away instead of moving around.