//Get Doctor List By Schedule Date From Calender //public async Task<ActionResult> _doctor3listbyScheduleDate(DateTime? datetime = null, int pagesize = 5, int page = 1) //{ // PagedListClient<ScheduleDoctorViewModel> result = await Doctor3ApiRequestHelper.GetDoctorWithPaging(datetime, pagesize, page); // return PartialView("_doctor3listbyScheduleDate", result); //} public async Task <ActionResult> _list(int docid = 0, int specialityid = 0, string docname = null, DateTime?datetime = null, DateTime?fromtime = null, DateTime?totime = null, int pagesize = 5, int page = 1) { int hospitalid = Helper.CookieHelper.getstaffHospitalID(); PagedListClient <ScheduleBookingViewModel> result = await BookingApiRequestHelper.list(docid, specialityid, docname, datetime, fromtime, totime, pagesize, page, hospitalid); return(PartialView("_list", result)); }
public async Task <ActionResult> UpsertPatient(tbPatient patient, int doctorid = 0, string doctorname = null, DateTime?appdate = null, DateTime?fromtime = null, DateTime?totime = null, int scheduleid = 0) { PatientAppointmentViewModel shvm = new PatientAppointmentViewModel(); shvm.appointment = new tbAppointment(); shvm.appointment.DoctorId = doctorid; shvm.appointment.DoctorName = doctorname; string date = appdate.Value.ToShortDateString(); string fromtimedate = fromtime.Value.ToShortTimeString(); string appointmentdate = date + " " + fromtimedate; shvm.appointment.ScheduleDataID = scheduleid; shvm.appointment.AppointmentDateTime = DateTime.Parse(appointmentdate); shvm.appointment.HospitalId = CareMeClient.Helper.CookieHelper.getstaffHospitalID(); // shvm.appointment.HospitalName = CareMeClient.Helper.CookieHelper.getstaffHospitalName(); shvm.patient = patient; PatientAppointmentViewModel result = await BookingApiRequestHelper.UpsertPatient(shvm); if (result != null) { if (result.patient != null) { return(Json("Success", JsonRequestBehavior.AllowGet)); } } return(Json("Fail", JsonRequestBehavior.AllowGet)); }
//Get Doctor List By Schedule FromTime public async Task <ActionResult> DoctorListByTime(DateTime?fromtime = null, DateTime?totime = null, int pagesize = 0, int page = 0, int appointmentid = 0, DateTime?date = null) { int hospitalid = Helper.CookieHelper.getstaffHospitalID(); PagedListClient <tbDoctor> result = await BookingApiRequestHelper.DoctorListByTime(fromtime, totime, pagesize, page, hospitalid, appointmentid, date); return(PartialView("_doctorListByScheduleTime", result)); }
//Get Appointment Schcedule Time by Schedule Date(Previous and Next) public async Task <ActionResult> AppointmentSchedule(DateTime?datetime = null, string type = null) { int hospitalid = Helper.CookieHelper.getstaffHospitalID(); // List<tbScheduleData> result = await DoctorApiRequestHelper.AppointmentSchedule(datetime, type); AppointScheduleViewModel result = await BookingApiRequestHelper.AppointmentSchedule(datetime, type, hospitalid); return(PartialView("_scheduleTimeByDate", result)); }
public async Task <ActionResult> _scheduleListbyDoctorID(int doctorid = 0, string docname = null, DateTime?date = null) { int hospitalid = Helper.CookieHelper.getstaffHospitalID(); List <tbScheduleData> result = await BookingApiRequestHelper.scheduleListbyDoctorID(doctorid, docname, hospitalid, date); ViewBag.docid = doctorid; ViewBag.docname = docname; if (date != null) { ViewBag.Date = date.Value.Date; } else { ViewBag.Date = MyExtension.getLocalTime(DateTime.UtcNow); } return(PartialView("_scheduleListbyDoctorID", result)); }
public async Task <ActionResult> UpsertPatient(tbPatient patient, int doctorid = 0, string doctorname = null, DateTime?appdate = null, DateTime?fromtime = null, DateTime?totime = null, int scheduleid = 0, int hospitalID = 0) { PatientAppointmentViewModel shvm = new PatientAppointmentViewModel(); shvm.appointment = new tbAppointment(); shvm.appointment.DoctorId = doctorid; shvm.appointment.DoctorName = doctorname; string date = appdate.Value.ToShortDateString(); string fromtimedate = fromtime.Value.ToShortTimeString(); string appointmentdate = date + " " + fromtimedate; shvm.appointment.ScheduleDataID = scheduleid; shvm.appointment.AppointmentDateTime = DateTime.Parse(appointmentdate); shvm.appointment.HospitalId = hospitalID; //CareMeClient.Helper.CookieHelper.getstaffHospitalID(); // shvm.appointment.HospitalName = CareMeClient.Helper.CookieHelper.getstaffHospitalName(); shvm.patient = patient; PatientAppointmentViewModel result = await BookingApiRequestHelper.UpsertPatient(shvm); if (result != null) { BookingSuccessModel bsm = new BookingSuccessModel(); bsm.doctor = await DoctorApiRequestHelper.GetDoctorById(result.appointment.DoctorId ?? 0); bsm.hospital = await HospitalApiRequestHelper.GetHospitalById(result.appointment.HospitalId ?? 0); bsm.scheduleData = await ScheduleApiRequestHelper.getScheduleDetail(result.appointment.ScheduleDataID ?? 0); bsm.pavm = result; return(PartialView("_bookingSuccess", bsm)); } else { return(Json("Fail", JsonRequestBehavior.AllowGet)); } }
public async Task <ActionResult> _bookedlist(string userid = null) { List <tbAppointment> appList = await BookingApiRequestHelper.getAppointments(userid); return(PartialView("_bookedlist", appList)); }