Learning and visualizing chronic latent representations using electronic health records