The first part depends on the state. The second part is simply not true. They can't refuse you medical treatment based on that. In many cases they'd lose their license/certification if they did. It's called duty to act.
.
The situation governs it more than anything else. Few states have restrictions on who can possess a gun (assuming they're legal), and there are no federal laws on the subject. There are lots of varying hospital policies governing guns, but as you say, odds are it wouldn't get that far in most cases. It would likely be given to an LEO at the scene. If the gun made it to the hospital, any number of things could happen, depending on those various policies or circumstances. Your condition may play into it as well. There is one thing you have wrong though. You don't need to be seriously injured or incapacitated for any of this to apply. It's common practice to transport even mildly injured patients to the emergency room in a medic after a traffic accident. We do it all the time. I've never had a patient with a gun but I'd have no problem taking custody of it if I ever did have such a patient. I'd have to give it to an LEO though, not because it's required but because we have no place to store them.
.
Doesn't apply in an emergency where you're being transported via medic (ambulance), unless you deliberately and purposely conceal the fact that you have it.