public ActionResult <ItemResponse <Paged <ProviderReport> > > SearchProviderReportList(int pageIndex, int pageSize, string query, ProviderDetailCategories categories)

        {
            int          code = 200;
            BaseResponse response;

            try
            {
                IUserAuthData          user       = _auth.GetCurrentUser();
                Paged <ProviderReport> pagedItems = null;
                if (user.Roles.Contains("SysAdmin") || user.Roles.Contains("Office Manager"))
                {
                    if (user.Roles.Contains("SysAdmin"))
                    {
                        pagedItems = _service.SearchReportSelectAllPaged(pageIndex, pageSize, categories, query);
                    }
                    else
                    {
                        pagedItems = _service.SearchReportSelectPaged(pageIndex, pageSize, categories, query, user.Id);
                    }
                }
                if (pagedItems == null)
                {
                    code     = 404;
                    response = new ErrorResponse("App resource not found.");
                }
                else
                {
                    response = new ItemResponse <Paged <ProviderReport> >()
                    {
                        Item = pagedItems
                    };
                }
            }
            catch (Exception ex)
            {
                code     = 500;
                response = new ErrorResponse(ex.Message);
            }

            return(StatusCode(code, response));
        }