Fighting between Israeli forces and Palestinian militants outside Gaza's largest hospital has prompted thousands of people to flee from the sprawling medical facility, but hundreds of patients and others displaced by the war remained inside, health officials said Monday.