The important lesson that EVERYONE needs to take from this:
This IS a good ending, since the defender survived the encounter. In fact, this is the most likely ending you can expect when defending yourself against an armed attack on the street. Pistols are comparatively underpowered firearms. One shot will rarely stop an attacker. If both the assailant and defender are armed with pistols, good chance the encounter will end just like this, with both participants hospitalized.
The defender's life will never be the same. He will likely have a long and painful physical recovery.
His emotional recovery will likely be even longer and more painful in many ways, despite intellectually knowing he was in the right. In times when he's feeling vulnerable, the moment where he shot a 15 year old kid will play over and over in his head. He will doubt himself. "Did I need to shoot him? What if I'd just given him the money? What if I hadn't gone outside for a smoke? What if it had been my friend and not me who got shot? What if he had died?" On and on.
While the defender rightly is not facing any criminal charges, he may still have to defend against a civil suit, which can be a cumbersome financial burden even if you win the case.
What makes this a GOOD ending? Only that it beats the worst alternative, which is being robbed and killed with no viable means of defending oneself.
I've said this in other posts...but all the "keyboard killers," "mall ninjas," "sheep dogs," and other "tough guy" types need to take note. This is serious business, for serious-minded people. The stakes are incredibly high. And even if you do everything right, you can still have a really crappy outcome.