The legacy of the Troubles continues to impact on the mental health and wellbeing of people in Northern Ireland , a new study has concluded.