AI tool that speeds up patient discharges trialled by NHS