> Attacking a hospital is a war crime,
Strictly speaking, if people we don't like attack a hospital it's a war crime; if we do it, it's an accident.
> so how is it not terrorism?
Murdering civilians during a war is a war crime; that doesn't mean murder automatically equals terrorism outside of war.