Dementia patients being 'dumped in hospital'