Hundreds of displaced Palestinians fled one of the Gaza Strip’s last functioning hospitals on Wednesday, after the Israeli military ordered them to leave and threatened further action to stop what it said was Hamas activity there.