Israel has accused Iran of “war crimes” after it attacked one of its hospitals.