A Semiparametric Joint Model for Longitudinal and Survival Data in End-of-Life Studies