Israel has defended its recent raid on a hospital in northern Gaza, asserting that the facility was being used by militants.