Discrimination 'denying care home residents hospital access', study suggests