I have a character who gets shot in the side and her friends sensibly realize she will die without actual surgery. Unfortunately there are also people who still want to kill her, so staying put in a public place isn't ideal. How do I determine how long she absolutely positively must stay in the hospital? And what are the risks of leaving early?
The reason hospitals exist is because there are many situations in which a person doesn't have the skill, equipment, and/or ability to take care of themself at home.
Maybe the person can't keep anything down and needs IV fluid to stay hydrated. Maybe they have altered mental status for some reason and can't keep themself safe. Maybe they need assessments for changes to their status around the clock. Maybe they need a medication that is dosed based on an assessment that they can't do themself. Maybe they need a treatment or medication that is too dangerous or side effect prone to give outpatient.
Any of these, among many others, are reasons people might have to stay in a hospital.
For surgery/trauma specifically, a pretty standard checklist has to be met for someone to go home. They have to:
Be able to hold down fluids (with oral anti-nausea medication if necessary)
Have tolerable pain with oral pain medication
Be back to (or very close to) their baseline mental status
Be able to pass gas
Be able to urinate
Finish their course of IV antibiotics (in the case of trauma or an intestinal surgery)
Be able to understand and follow their care plan at home (when to take meds, how to change dressings, when to come back for follow ups, when/how they can bathe, etc...)
Once these are all met, the person can generally go home safely. For some people and surgeries, this takes a few hours, for others this takes weeks or even months. Some people may even need to go to a rehab center or a skilled nursing facility before they can go home safely (especially if they can do everything but the last one).
Someone who is shot in the side and needs surgery likely had the bullet penetrate their peritoneum- the sac that holds their abdominal organs. This probably injured some intestine, which means she will need IV antibiotics and runs the risk of part of the bowel dying or failing to work as it should after the surgery.
If she was really proactive and there were no complications*, she could probably meet everything but the antibiotic requirement within 24 hours.
Now, after 24 hours, even if she'd met all the requirements except the IV antibiotics, she'd still have to leave against medical advice, or "AMA". This means that the best course of treatment, the IV antibiotics, has to take place in the hospital, and she would run the risk of complications (peritonitis) by skipping out before they were done. If she could convince the doctors to give her oral antibiotics**, she might even be able to leave without the high risk of peritonitis that comes with bowel surgery.
Speaking of complications, the main complications would be dead bowel (which would cause a lack of bowel movement/passing of gas, and vomiting), and peritonitis. For either of these, she would have to come back to the hospital and spend possibly a week or more with an NG tube or more IV antibiotics.
*This is something that would require her to start working on her checklist the second she got up to the floor. Trying to pee, being really aware of when she passed gas, drinking clear liquids like it was her job the second she was allowed, refusing IV meds if there was any other option, etc... It would not be fun or comfortable, and this assumes of course there are no complications.
**This is something that is surprisingly difficult to convince doctors to do. I have had many, many times when a patient is either refusing IV access, we can't get an IV in them to literally save their life, or the patient is leaving AMA and still needs antibiotics, and even so no one will change the IV antibiotics to oral or IM. If you are a pharmacist or a hospitalist I would love to hear reasons and if there are some magic words I can say to get alternative antibiotics for my patients.

















