You know disabled students have the right to privacy too, without other students knowing their personal health information. It is not the professor's business either, unless the student wants to disclose the actual disability's name(s) or the specifics around it. Only disability status is required to be disclosed in the US.
I personally have 2 neurostimulators inside of me, a power injectable port in my chest (an indwelling central line), a semi-permanent continuous glucose monitor on my arm (external), and a semi-permanent insulin pump connected to my abdomen--and clipped to my waistband (external). All of these alarm to a metal detector.
Also, the neurostimulators and insulin pump are sensitive to metal detectors and millimeter wave technology, as in body scanners. The insulin pump is also sensitive to X-Ray radiation.
In the case of the insulin pump, it can interfere with the photosensor on the cartridge/reservoir that detects the level of insulin remaining in the cartridge/reservoir. This can literally cause the insulin pump to overdose the person with diabetes.
As for neurostimulators, one of the neurostimulators I have has formal reports in the FDA MAUDE database, where people had their lifesaving neurostimulator deactivated by metal detectors.
Oh yeah, I also forgot, I have 2 places in my body that have plates/pins: my left shoulder and left ankle. That would set off a metal detector too.
As for handing over mobile phones: that is a prudent step. One of my professors took them up before the exam without advance warning for the final exam, where restroom breaks were definitely going to be utilized due to the length of the exam.
Obviously it does not solve the problem. But, according to far more than a few studies, having the phone out of sight raises exam scores. Having the phone in a completely different room raises the exam scores even higher. Basically, your brain treats the phone as an extension to your brain, and in its presence, your brain effectively goes on holiday.