Shanghai discharges thousands of COVID patients