예제 #1
0
        public JsonResult SearchDoctor(SearchDoctorModel model)
        {
            SeeDoctorRepository objSeeDoctorRepo = new SeeDoctorRepository();

            //IEnumerable<SeeDoctorDTO> docList= objDoctorRepo.SeeDoctor(model.Doctor.firstName, model.Gender, model.Language, model.Speciallity, model.AppDate.DayOfWeek.ToString(), model.Timing.seacrhTime);
            try
            {
                if (model.gender == "ALL")
                {
                    model.gender = null;
                }
                if (model.name == "")
                {
                    model.name = null;
                }
                if (model.language == "ALL")
                {
                    model.language = null;
                }
                if (model.speciality == "ALL")
                {
                    model.speciality = null;
                }
                if (model.appTime.ToString() == "")
                {
                    model.appTime = null;
                }
                List <DoctorDataset> doctorList = objSeeDoctorRepo.SeeDoctor(model);
                return(Json(new { Success = true, DoctorModel = doctorList }));
            }
            catch (Exception ex)
            {
                return(Json(new { Message = ex.Message }));
            }
        }
예제 #2
0
 public JsonResult GetROVList()
 {
     try
     {
         SeeDoctorRepository objDoctorRepo = new SeeDoctorRepository();
         List <ROV_Custom>   rov           = objDoctorRepo.LoadROVList();
         return(Json(new { Success = true, Object = rov }));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = ex.Message }));
     }
 }
예제 #3
0
 public JsonResult GetFavDoctors(long patientID)
 {
     try
     {
         SeeDoctorRepository objDoctorRepo = new SeeDoctorRepository();
         var favdoc = objDoctorRepo.LoadFavDoctors(patientID);
         return(Json(new { Success = true, Object = favdoc }));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = ex.Message }));
     }
 }
예제 #4
0
 public JsonResult GetPatientChiefComplaints(long patientid)
 {
     try
     {
         SeeDoctorRepository objDoctorRepo   = new SeeDoctorRepository();
         PatientROV          chiefComplaints = objDoctorRepo.GetPatientChiefComplaints(patientid);
         return(Json(new { Success = true, Object = chiefComplaints }));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = ex.Message }));
     }
 }
예제 #5
0
 public JsonResult GetPatientROV(long patientid)
 {
     try
     {
         SeeDoctorRepository objDoctorRepo = new SeeDoctorRepository();
         PatientROV          rov           = objDoctorRepo.LoadROV(patientid);
         return(Json(new { Success = true, Object = rov }));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = ex.Message }));
     }
 }
예제 #6
0
        public JsonResult FetchDoctoInfo(long doctorID)
        {
            try
            {
                SeeDoctorRepository objRepo = new SeeDoctorRepository();
                GetDoctorINFOVM     model   = objRepo.GetDoctorInfo(doctorID);

                return(Json(new { Success = true, Object = model }));
            }
            catch (Exception ex)
            {
                return(Json(new { Message = ex.Message }));
            }
        }
예제 #7
0
 public JsonResult SaveAppointment(AppointmentModel _objAppointment)
 {
     try
     {
         ApiResultModel      apiresult        = new ApiResultModel();
         SeeDoctorRepository objSeeDoctorRepo = new SeeDoctorRepository();
         apiresult = objSeeDoctorRepo.AddAppointment(_objAppointment);
         return(Json(new { Success = true, ApiResultModel = apiresult }));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = ex.Message }));
     }
 }
예제 #8
0
        public JsonResult UpdateFavourite(FavouriteDoctorModel model)
        {
            try
            {
                SeeDoctorRepository objRepo = new SeeDoctorRepository();

                ApiResultModel apiresult = new ApiResultModel();
                apiresult = objRepo.UpdateFavourite(model);
                return(Json(new { Success = true, ApiResultModel = apiresult }));
            }
            catch (Exception ex)
            {
                return(Json(new { Message = ex.Message }));
            }
        }
예제 #9
0
        public PartialViewResult MyCareTeam()
        {
            try
            {
                SeeDoctorRepository objDoctorRepo = new SeeDoctorRepository();
                var favdoc = objDoctorRepo.MyCareTeam(SessionHandler.UserInfo.Id);

                return(PartialView("MyCareTeamView", favdoc));
            }

            catch (System.Web.Http.HttpResponseException ex)
            {
                ViewBag.Error   = ex.Response.ReasonPhrase.ToString();
                ViewBag.Success = "";
            }
            return(PartialView("MyCareTeamView"));
        }
예제 #10
0
        public JsonResult FetchDoctorTimingsNew(FetchTimingsModel model)
        {
            try
            {
                SeeDoctorRepository      objSeeDoctorRepo = new SeeDoctorRepository();
                DocTimingsAndAppointment appList          = new DocTimingsAndAppointment();
                appList = objSeeDoctorRepo.FetchDoctorTimesNew(model);
                List <string> timings = new List <string>();
                if (appList != null)
                {
                    //calculate time slots
                    timings = createTimeSlots(appList);
                }

                return(Json(new { Success = true, Object = timings }));
            }
            catch (System.Web.Http.HttpResponseException ex)
            {
                return(Json(new { Message = ex.Response }));
            }
        }
예제 #11
0
 public DoctorAppointmentController()
 {
     oAppointmentRepository        = new DoctorAppointmentRepositroy();
     oSeeDoctorRepository          = new SeeDoctorRepository();
     oDoctorConsultationRepositroy = new DoctorConsultationRepository();
 }