I think that the zombie apocalypse came towards the very end of his hospital stay, so he was probably without medical attention for just a few days. Perhaps 3 days? Even if he had an IV, he would start getting dehydrated. That’s just a guess - I don’t think they got that specific on the timing.
In one of the flashbacks, it shows Shane visiting Rick and bringing him flowers. Then Rick wakes up from his coma, thinks Shane is in the bathroom and the flowers are all dried out with petals and leaves dropped on the nightstand. By this time, however, Shane has already been back to the small group of survivors, including Lori and Carl, and he and Lori are "carrying on" secretly in the woods. They are trying to make their way to the CDC in Atlanta, right? How long was Rick recuperating with Morgan and his son? I get that it was probably only a few days or a week, because when Rick sets out for downtown Atlanta, the Shane group is still at the campsite waiting for T-Dog, Glenn, Andrea and Merle to bring back supplies when they run into Rick riding into town on horseback and getting stuck in the tank.
Whatever started the outbreak, it was global, fast spreading and deadly. The entire government shut down and there was no electrical grid operating or phone service. There are many areas where "normal" has to be suspended for the show to work and many question don't get answered.