Analyzing Patient Trajectories With Artificial Intelligence