public ActionResult Index(string id = "")
        {
            id = string.IsNullOrEmpty(id) ? User.Identity.GetUserId() : id;
            var physician = _physician.GetDetail(id);
            // excluding the current status from list
            var list = _physicianStatusService.GetAll().Where(m => m.phs_key != physician.status_key);

            #region Rules Added Define in Ticket TCARE-11 Physician Status Rules/Changes
            if (User.IsInRole(UserRoles.Physician.ToDescription()))
            {
                var notAvailable = PhysicianStatus.NotAvailable.ToInt();
                list = list.Where(m => m.phs_key != notAvailable);
            }

            if (physician?.physician_status?.phs_key != PhysicianStatus.Stroke.ToInt())
            {
                var tpa = PhysicianStatus.TPA.ToDescription();
                list = list.Where(m => m.phs_name.ToLower() != tpa);
            }

            #endregion

            ViewBag.physician = physician;
            ViewBag.Id        = id;
            return(GetViewResult(list.ToList()));
        }
 public JsonResult GetAllPhysicianStatuses(int keyToIgnore = 0)
 {
     try
     {
         var list = _physicianStatusService.GetAll()
                    .Where(m => m.phs_key != keyToIgnore)
                    .Select(m => new
         {
             m.phs_key,
             m.phs_name
         });
         return(Json(list, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
         return(Json(new { success = false, data = "", error = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }
        public ActionResult GetAll(DataSourceRequest request)
        {
            var res = _PhysicianStatusService.GetAll(request);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }