I've been in the middle of these situations. Working nights is such fun.
Would the police just come right into ER? They would first have to ask the ER clerk where he is, and get escorted to that spot. They don't get to go around peeking in the treatment cubicles until the find him.
One danger of having shooting victims in your ER is that someone might come to the hospital to finish the job. Targets of violence are usually whisked out of the ER as fast as possible, and may be booked under a false name to keep anything from happening in the wards.
I had to hit the floor in Las Vegas when someone followed an ambulance to the hospital and barged in looking for his target. I was fixing some equipment, heard a nurse shriek "He's got a gun". So I dove for the floor and slithered out the rear exit. The equipment took a slug to the power supply ... try explaining that to the warranty people.
Would the police just come right into surgery? Absolutely NO! They aren't scrubbed! And the wounded guy isn't going very far bare-butted and zonked on pre-op drugs, even if he could find his way out.
Lets say the gunshot victim is already in surgery when the cops match up the calls and realize that he's probably the suspect for the breaking and entering.
They go to the hospital with the warrant, show it to the ER admissions clerk (who otherwise won't give them the time of day), and clerk tells them he's in surgery.
They can go show the warrant to the surgery clerk, and wait in the waiting room of surgery if they want to, or ask to be notified when the suspect gets out of surgery. It would depend on what surgery is happening.
If there was a shooting, they will give the ER/OR staff evidence collection envelopes to put the bullets in, sealed and signed by a witness to the extraction to maintain chain of evidence. We did one bullet or fragment per envelope, identified by the body part it was extracted from, and videotaped the procedure. (keeps hospital staff out of the witness box, because it's all on tape)
If you find a bullet on the ambulance gurney as you are washing it down, you have to stop and call the cops to get it.
I can remember only one case where the cops insisted on having a cop collect the bullets, and he was a PITA.
How long would he be allowed to recover at the hospital before action is taken?
As long as it takes until he can be safely discharged or transferred to a secure medical facility.
Would they try and get him before a judge for bail hearing faster or slower than usual?
There is a time limit on arraignment hearings if the person is in jail (at that hearing, bail can be discussed), but if the dude's in the hospital they can wait as long as it takes.
And security while he's in the hospital?
Depends on his condition ... anything from just a cuff and longish chain attached to the bed to an armed cop outside the room checking IDs of anyone who wants in.
***********
Also consider that some hospitals - Maricopa County for one - have a high security ward. Almost any hospital can come up with a lockable private room in the isolation ward. And some jails have a medical section.
So he could be transferred to a more secure place before he's healed completely.