for the most part, my institution keeps them very inline. Lined up, badges on, glasses of water, and polite. I will always answer a question about thier medication if I know it, even if the answer is to put in a sick call to find out (lab values, when KOP will be in, changing a med or dose). Very seldom do they get argumentive, and if they do security will generally say something before I do, and they take thier pills or don't (also always an option) and move off.
There are exceptions. Some buildings will not have them fully dressed with ID's, and I don't insist if security doesn't. These are buildings where the population doesn't shift as fast, minimum security for low risk offenders and a building for well behaved lifers that I generally know well myself. If I don't know them and they don't have an ID, I make sure the officer ID's them for me. The mimimum building is also where I've had the most problems with disrespectful behavior, depending on the officer on duty. There was one timid one that used to let some stuff get by, and one that seemed to champion the guys, actually challenged me once when I told an inmate arguing with me that he needed emergency care that he didn't. I knew he didn't because I'd spent about 15 hours in the past 7 days with him at the clinic and had seen blood work, xrays, ct's of the abdomen, as well as a few years of experience with him. The officer, in front of the inmates asked, how do you KNOW that he doesn't need medical care??? I responded, because that's my JOB. The guy was wanting prilosec when it first came out instead of zantac, and my company chose to spend several thousand ruling out everything rather than give that one nonformulary prescription, but he was not in need of a 10pm emergency visit with his normal gait and dry pink complexion............I digress.
Your demeanor in a hell hole where they shout, toss urine, and masturbate will be your only weapon. If you can remain professional, firm, fair, it might take it down a notch, or may not. Places are very different. I've known nurses that worked in facilities where that happened and were able to decrease bad behavior as they passed muster with the population, but there were still times.....then you use your write up policies and have to look out for yourself. It's a balancing act sometimes, not alienating staff or inmates and keeping your own behavior above standards. Good luck!