Example #1
0
        //get the dashboard for the patient administrator using userId
        public IActionResult Dashboard()
        {
            ViewBag.shoulderflexionString  = "Forward Flexion";
            ViewBag.shoulderflexionString1 = "External Rotation";
            ViewBag.ankleflexionString     = "Flexion";
            ViewBag.ankleextensionString   = "Extension";
            ViewBag.kneeflexionString      = "Flexion";
            ViewBag.kneeextensionString    = "Extension";
            List <EquipmentExercise> lExerciseString = lIEquipmentExerciseRepository.GetEquipmentExerciseString();

            if (lExerciseString != null && lExerciseString.Count > 0)
            {
                var lexString = lExerciseString.Where(x => x.Limb == "Shoulder" && x.ExerciseEnum == "Forward Flexion").FirstOrDefault();
                if (lexString != null)
                {
                    ViewBag.shoulderflexionString = lexString.FlexionString;
                }
                var lexString1 = lExerciseString.Where(x => x.Limb == "Shoulder" && x.ExerciseEnum == "External Rotation").FirstOrDefault();
                if (lexString1 != null)
                {
                    ViewBag.shoulderflexionString1 = lexString1.FlexionString;
                }

                var lexString2 = lExerciseString.Where(x => x.Limb == "Ankle").FirstOrDefault();
                if (lexString2 != null)
                {
                    ViewBag.ankleflexionString   = lexString2.FlexionString;
                    ViewBag.ankleextensionString = lexString2.ExtensionString;
                }
                var lexString3 = lExerciseString.Where(x => x.Limb == "Knee").FirstOrDefault();
                if (lexString3 != null)
                {
                    ViewBag.kneeflexionString   = lexString3.FlexionString;
                    ViewBag.kneeextensionString = lexString3.ExtensionString;
                }
            }
            List <DashboardView> lDashboardView = null;
            string _uType = HttpContext.Session.GetString("UserType");

            if (HttpContext.Session.GetString("UserId") != null && HttpContext.Session.GetString("UserType") != null && HttpContext.Session.GetString("UserType").ToString() == ConstantsVar.PatientAdministrator.ToString())
            {
                try
                {
                    lDashboardView = lIPatientRxRepository.getDashboardForPatientAdmin(HttpContext.Session.GetString("UserId"));
                }
                catch (Exception ex)
                {
                    logger.LogDebug("Error: " + ex);
                }
                return(View(lDashboardView));
            }
            else
            {
            }
            return(View(null));
        }
Example #2
0
        //get the dashboard for the patient administrator using userId
        public IActionResult Dashboard()
        {
            List <DashboardView> lDashboardView = null;
            string _uType = HttpContext.Session.GetString("UserType");

            if (HttpContext.Session.GetString("UserId") != null && HttpContext.Session.GetString("UserType") != null && HttpContext.Session.GetString("UserType").ToString() == ConstantsVar.PatientAdministrator.ToString())
            {
                try
                {
                    lDashboardView = lIPatientRxRepository.getDashboardForPatientAdmin(HttpContext.Session.GetString("UserId"));
                }
                catch (Exception ex)
                {
                    logger.LogDebug("Error: " + ex);
                }
                return(View(lDashboardView));
            }
            else
            {
            }
            return(View(null));
        }