That depends.
If I'm unconscious upon arrival, and my wife's not there, I guess I'll get it back from hospital security one way or the other. That's actually not an uncommon occurance here in my area.
If I'm conscious and my wife's there, I usually give it to her for safekeeping. That's among the reasons why she got her permit, too. She can take custody of my guns and take them places without breaking the law.
If I'm alone, I have a lime green organizer bag that I just put the gun, reloads, knife and light into and carry it around with me. No one really looks twice at a guy in a gown carrying around an organizer bag.
But I never got discovered in an ER. I usually had time to disrobe and gown up before my X-rays and other procedures, and I was given privacy to do that.
But I did have to get an outpatient procedure done not long ago, and I didn't really have the privacy I needed to disrobe. I was in a women's health wing, for a scan that usually women have done. They had no segregated changing area. So after 5 minutes of the technician telling me, "Sorry, we'll just have to wait a few more minutes, another woman just went in the changing room." I said, "Hell, I can just change here in the imaging room." She didn't really pay any attention to the guns I laid on the chair. She looked a bit uncomfortable as I dropped my trousers, but it was more over having a strange man disrobe right in front of her without warning or asking her to leave. "But I don't even have gowns for you in here," she says.
I lightened up the mood by saying, "It's OK honey. I'm wearing boxers. And if I thought my dignity still mattered, I would have given up treating the disease. I've had hoses stuck up my butt by pretty little GI nurses, and experienced all other sorts of indignities. You're a medical professional. I don't have anything you haven't seen before. I think you and I can handle this one."
She giggled, I smiled and gave her a wink, and life went on.