The Israeli military says the hospital was being used as a Hamas command centre and more than 240 terrorists were held.