Determinants of care outcomes for patients who die in hospital in Ireland: a retrospective study