Maybe if you have to go to jury duty, you could use some noise blocking headphones or earplugs to help the worst of the noise. Earplugs would be less noticable. Tell the bailiff or whoever calls the prospective jurors that you have a hearing problem with difficulty hearing in the presence of background noise and give him a large card with your name written on it so you can see, rather than hear, when it is your turn.
Do you set off metal detectors because of a medical reason? If so, bring evidence of the artificial shoulder or hip or pacemaker or whatever you have with you to the courthouse. You should have gotten a card the size of a credit card when one of these was installed. If it is because you forget to empty all your pockets or take off your shoes, then don't forget to do this and then be careful to walk through the middle of the magnetometer without bumping into it because that can set it off too. Some people leave their shoes on, but many shoes use hidden metal in their construction, so it is better to remove them in the beginning.