Did anyone struggle to get an accurate ADHD diagnosis because of the pain medications they were taking?

Has anyone had difficulty getting an accurate ADHD diagnosis because of the pain medications they were taking? I’ve read that certain medications can affect focus and attention did this impact your evaluation or test results?