'Smart clothes' let patients leave the hospital sooner