Hospitals prioritise patients most in need of surgery and increase capacity with AI