Exemple #1
0
        private IList <SelectListItem> PrepareProcedureDropdown(string SelectedText = "Select Procedure", int Id = 0)
        {
            var PatientList             = _companyProfileService.GetAllCompanyProfile().PoliciesAndProcedures.Where(a => a.IsPolicy == false);
            List <SelectListItem> items = new List <SelectListItem>();

            foreach (var MRData in PatientList)
            {
                items.Add(new SelectListItem
                {
                    Text  = MRData.Text,
                    Value = MRData.Id.ToString()
                });
            }



            return(items);
        }
        // GET: CompanyProfile/Create
        public ActionResult Create()
        {
            //10/10/2019 aakansha
            ViewBag.FormName = "CompanyProfile";
            var companyProfile = new CompanyProfileModel();

            try
            {
                var companyProfileFrom = _companyProfileService.GetAllCompanyProfile();
                if (companyProfileFrom != null)
                {
                    companyProfile = companyProfileFrom.ToModel();

                    //16/09/19 aakansha
                    var DownloadHistoryListData = _companyProfileService.GetAllDownloadHistory();
                    var downloadhistory         = DownloadHistoryListData.Select(a =>
                                                                                 new DownloadHistoryModel
                    {
                        DocFormat        = a.DocumentFormat,
                        DocType          = a.DocumentType,
                        DocName          = a.DocumentName,
                        DownloadDateTime = a.DownloadDateTime,
                        UserId           = a.UserId,
                        ProcessTypeId    = a.ProcessTypeId,
                        ProcessType      = (ProcessType)a.ProcessTypeId
                    }).ToList();
                    if (downloadhistory.Count() != 0)
                    {
                        companyProfile.DownloadHistoryList = downloadhistory;
                    }
                    return(View(companyProfile));
                }
            }
            catch (Exception ex)
            {
                AddNotification(NotificationMessage.TitleError, NotificationMessage.ErrorMsg, NotificationMessage.TypeError);
            }

            return(View(companyProfile));
        }
Exemple #3
0
        protected virtual void PrepareTreatmentReportModel(TreatmentsReportListModel model)
        {
            //Daignosis Dropdown
            model.AvailableDaignosis.Add(new SelectListItem {
                Text = "Select Daignosis", Value = "0"
            });

            foreach (var c in _treatmentServices.GetAllDiagnosis().Where(a => a.Deleted != true))
            {
                model.AvailableDaignosis.Add(new SelectListItem
                {
                    Text  = c.DiagnosisName,
                    Value = c.Id.ToString()
                });
            }

            //Patient  Dropdown
            model.AvailablePatient.Add(new SelectListItem {
                Text = "Select Patient", Value = "0"
            });

            foreach (var c in _treatmentRecordServices.GetAllPatientMaster().Where(a => a.Deleted != true))
            {
                model.AvailablePatient.Add(new SelectListItem
                {
                    Text  = _encryptionService.DecryptText(c.PatientName),
                    Value = c.Id.ToString()
                });
            }

            //Hospital  Dropdown
            model.AvailableHospital.Add(new SelectListItem {
                Text = "Select Hospital", Value = "0"
            });

            foreach (var c in _hospitalServices.GetAllHospital().Where(a => a.Deleted != true))
            {
                model.AvailableHospital.Add(new SelectListItem
                {
                    Text  = _encryptionService.DecryptText(c.HospitalName),
                    Value = c.Id.ToString()
                });
            }

            //Nurse  Dropdown
            model.AvailableNurse.Add(new SelectListItem {
                Text = "Select Nurse", Value = "0"
            });

            foreach (var c in _nurseServices.GetAllNurse().Where(a => a.Deleted != true))
            {
                model.AvailableNurse.Add(new SelectListItem
                {
                    Text  = _encryptionService.DecryptText(c.FirstName) + " " + _encryptionService.DecryptText(c.LastName),
                    Value = c.Id.ToString()
                });
            }


            model.AvailableProcedure.Add(new SelectListItem {
                Text = "Select Procedure", Value = "0"
            });

            foreach (var c in _companyProfileService.GetAllCompanyProfile().PoliciesAndProcedures.Where(a => a.IsPolicy == false))
            {
                model.AvailableProcedure.Add(new SelectListItem
                {
                    Text  = c.Text,
                    Value = c.Id.ToString()
                });
            }
        }