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)); }
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)); }
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)); }
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)); }
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)); }
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)); } }
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)); }