A semiparametric joint model for terminal trend of quality of life and survival in palliative care research