Exemplo n.º 1
0
        public ActionResult AppointmentList()
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            AppointmentData    appointments    = new AppointmentData();
            List <Appointment> AppointmentList = appointments.GetDoctorAppointmentList((int)Session["userId"]);
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);

            return(View(AppointmentList));
        }
Exemplo n.º 2
0
        public ActionResult AddRemark(int id)
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            var remark = new RemarkViewModel();

            remark.AppointmentId = id;
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);

            return(View(remark));
        }
Exemplo n.º 3
0
        public ActionResult EditProfile()
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);
            var Doctor        = DoctorViewObj.GetDoctorProfile().Doctor;
            var model         = new DoctorProfileEditViewModel();

            AutoMapper.Mapper.Map(Doctor, model);

            return(View(model));
        }
Exemplo n.º 4
0
        public ActionResult DoctorProfile()
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);
            var viewModel     = new DoctorProfileViewModel
            {
                Doctor    = DoctorViewObj.GetDoctorProfile().Doctor,
                DoctorFee = DoctorViewObj.GetDoctorProfile()
            };

            return(View(viewModel));
        }
Exemplo n.º 5
0
        public ActionResult AddMedicinesAndTests(AddMedicinesAndTestViewModel model)
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            MedicineTableData            medicineData         = new MedicineTableData();
            TestsTableData               testData             = new TestsTableData();
            AddMedicinesAndTestViewModel medicineAndTestNames = new AddMedicinesAndTestViewModel();

            medicineAndTestNames.MedicinesList = medicineData.MedicinesInformation();
            medicineAndTestNames.TestsList     = testData.TestsInformation();
            medicineAndTestNames.AppointmentId = model.AppointmentId;
            medicineAndTestNames.Remark        = model.Remark;
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);

            return(View(medicineAndTestNames));
        }
Exemplo n.º 6
0
 public ActionResult DoctorUserProfile()
 {
     if (Session["userId"] == null)
     {
         return(Redirect("~"));
     }
     if (TempData["Id"] == null)
     {
         return(RedirectToAction("Doctors"));
     }
     else
     {
         var DoctorViewObj = new DoctorProfileView((int)TempData["Id"]);
         var viewModel     = new DoctorProfileViewModel
         {
             Doctor    = DoctorViewObj.GetDoctorProfile().Doctor,
             DoctorFee = DoctorViewObj.GetDoctorProfile()
         };
         return(View(viewModel));
     }
 }
Exemplo n.º 7
0
        public ActionResult PatientMedicalHistory(int UserId)
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            var History = new MedicalHistory();
            List <MedicalHistoryViewModel> model = new List <MedicalHistoryViewModel>();
            List <Diagnosis> DiagnosisHistories  = History.GetDiagnosisHistory(UserId);
            var MedicineNames = new List <List <MedicineRecord> >();

            foreach (var item in DiagnosisHistories)
            {
                var MedicalHistory = new MedicalHistoryViewModel();
                MedicalHistory.DiagnosisHistories = item;
                MedicalHistory.MedicineList       = History.GetMedicineNames(item.Id);
                MedicalHistory.TestList           = History.GetTestNames(item.Id);

                model.Add(MedicalHistory);
            }
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);

            return(View(model));
        }