He strapped on two sidearms and more than a hundred rounds. A 2nd Lieutenant with the ink still wet on his commission would be able to demonstrate premeditation. I'm sure Hasan will assert an affirmative defense and hope for lifetime institutionalization. Insanity is tough to prove in the civilian world, and even harder in the military world.
As a practical matter, Hasan has no chance of beating the wrap, he's just got to hope that the Army will compromise their investigation in some way, or that the prosecution will make a mistake at trial that can spare him the needle.