Appropriate social housing and support packages must be developed to help discharge people with mental health conditions from hospital, campaigners said.
A total of 350 inpatients in Northern Ireland have been inside for more than two years, it was revealed.
Almost nine out of 10 were admitted with mental health or learning disability problems, the Department of Health said.
Minister Edwin Poots wants to encourage more care in the community, which can reduce the cost of treatment and encourage people to be more independent.
A total of 139 of 350 patients in long-term hospital care had a mental health condition and 171 had learning difficulties. A further 18 were elderly and 22 had an acute condition such as brain injury, Mr Poots said.
A charity for people with mental health problems said: “Home-based treatment and care should be the norm, enabling people to remain in their homes, jobs and communities.”
Peter McBride, chief executive of the Northern Ireland Association for Mental Health, said the organisation agreed with moves away from hospital to community services.
“With appropriate development of the full range of community-based services it is anticipated that the need for admission to hospital will be much reduced and the duration of admissions much shorter,” he added.
“Hospital places should be provided in fit for purpose modern facilities. However in order to achieve this there must be investment in community services and housing. The responsible departments have not approached this in a joint way.”
He said the focus should be on supporting people with mental health problems to achieve and maintain their maximum level of functioning, as far as possible using community and primary care services.
“Appropriate social housing with support must be developed. Wider issues that affect the lives of people with a mental health problem, such as employment, housing, stigma, health and social security benefits will also need to be addressed,” he added.
In 1995, the department said all long-stay hospital patients should be moved into the community. But targets have been missed, according to recent research by the Patient Client Council.
The latest official target date for resettlement in appropriate places in the community is March 2015. Primary targets are those patients who were resident in a mental health or learning disability hospital for a year or more in March 2007.