public IActionResult Dashboard(string id) { ViewBag.HeaderName = "Progress"; HttpContext.RemoveCookie("ReviewID"); JsonSerializerSettings lsetting1 = new JsonSerializerSettings(); lsetting1.ContractResolver = new CamelCasePropertyNamesContractResolver(); lsetting1.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; try { if (!string.IsNullOrEmpty(id) || !string.IsNullOrEmpty(HttpContext.Session.GetString("UserId"))) { string patientLoginId = !string.IsNullOrEmpty(id) ? id : HttpContext.Session.GetString("UserId"); DashboardView lview = lIPatientRxRepository.getPatientRxByPatientLoginId(patientLoginId); if (lview != null) { //Insert to User Activity Log -Patient JsonSerializerSettings lsetting = new JsonSerializerSettings(); lsetting.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; List <EquipmentExercise> lExerciseString = lIEquipmentExerciseRepository.GetEquipmentExerciseString(); if (!string.IsNullOrEmpty(lview.PatientRx.DeviceConfiguration)) { string _uType = HttpContext.Session.GetString("UserType"); if (_uType == "5") { ROMChartViewModel ROM = lIPatientRxRepository.getPatientRxROMChart(lview.PatientRx.PatientId, lview.PatientRx.EquipmentType, lview.PatientRx.DeviceConfiguration); if (ROM != null) { ViewBag.ROM = ROM; } ViewBag.EquipmentType = lview.PatientRx.EquipmentType; //Treatment Calendar List <TreatmentCalendarViewModel> TreatmentCalendarList = lIPatientRxRepository.getTreatmentCalendar(lview.PatientRx.PatientId, lview.PatientRx.EquipmentType, lview.PatientRx.DeviceConfiguration); if (TreatmentCalendarList != null && TreatmentCalendarList.Count > 0) { ViewBag.TreatmentCalendar = TreatmentCalendarList; } } } } return(View(lview)); } } catch (Exception ex) { logger.LogDebug("Error: " + ex); } return(View(null)); }