https://medium.com/@kathoffman317/patient-treatment-timelines-for-longitudinal-survival-data-81c65f5f3fba