For what it’s worth (to you and anyone else reading) I was able to obtain that note because I have an ADHD diagnosis and my doctor understood (upon explanation) that I have pretty severe cognitive difficulties under sensory stress-particularly auditory overstimulation.
This wasn’t meant as a comment saying I got a doctor’s note casually (not that I think you’re suggesting that interpretation, I’m just realizing it’s important to clarify). I got it because I was sincerely concerned about the cognitive impact going into the office as demanded would have on me and my work.
If you have a similar response to sensory stimulation, I highly recommend looking into it! I’m coming from the perspective of it being common with ADHD and ASD, which aren’t the only bases for it; if you mean headaches literally, do yourself a favor and talk to your doc about why sound or any other sensory issue might be affecting you that way.