Discharging patients from hospital: internal procedures