Exemplo n.º 1
0
        public JsonResult InstitutionSave(FormCollection frm, bool MarkAsComplete, string Hfddlclinic)
        {
            HRA4.ViewModels.Appointment app = new ViewModels.Appointment();
            app.Id                   = Convert.ToInt32(frm["Id"]);
            app.MRN                  = Convert.ToString(frm["MRN"]);
            app.DateOfBirth          = Convert.ToDateTime(frm["dob-date"]);
            app.PatientName          = Convert.ToString(frm["PatientName"]);
            app.Survey               = Convert.ToString(frm["Survey"]);
            app.appttime             = Convert.ToString(frm["ddlappttimes"]);
            app.Address1             = Convert.ToString(frm["Address1"]);
            app.Address2             = Convert.ToString(frm["Address2"]);
            app.AppointmentDate      = Convert.ToDateTime(frm["edit-app-date"]);
            app.AppointmentPhysician = Convert.ToString(frm["ddlAppointmentPhysicians"]);
            app.AssessmentName       = Convert.ToString(frm["Assessment"]);
            app.Cellphone            = Convert.ToString(frm["Cellphone"]);
            app.City                 = Convert.ToString(frm["City"]);
            app.Country              = Convert.ToString(frm["ddlCountries"]);
            //app.DateCompleted = Convert.ToDateTime(frm["dob-date"]);
            app.DiseaseHx     = Convert.ToString(frm["DiseaseHx"]);
            app.Education     = Convert.ToString(frm["Education"]);
            app.EmailAddress  = Convert.ToString(frm["EmailAddress"]);
            app.Gender        = Convert.ToString(frm["ddlGenders"]);
            app.Homephone     = Convert.ToString(frm["Homephone"]);
            app.Language      = Convert.ToString(frm["ddlLanguages"]);
            app.Maritalstatus = Convert.ToString(frm["Maritalstatus"]);
            app.Nationality   = Convert.ToString(frm["ddlNationalities"]);
            app.Occupation    = Convert.ToString(frm["Occupation"]);
            app.PCP           = Convert.ToInt32(frm["ddlPCP"]);
            app.RefPhysician  = Convert.ToInt32(frm["ddlRefPhysician"]);
            app.clinicID      = Convert.ToInt32(frm["ddlclinics"]);
            app.Race          = Convert.ToString(frm["ddlRaces"]);
            app.State         = Convert.ToString(frm["ddlStates"]);
            app.Workphone     = Convert.ToString(frm["Workphone"]);
            app.Zip           = Convert.ToString(frm["Zip"]);

            //if (Hfddlclinic != null && Hfddlclinic != "")
            //    app.clinicID = Convert.ToInt32(Hfddlclinic);// verfiy
            //else app.clinicID = -1;
            app.SetMarkAsComplete = MarkAsComplete;
            _applicationContext.ServiceContext.AppointmentService.SaveAppointments(app, Convert.ToInt32(Session["InstitutionId"]));
            // return RedirectToAction("InstitutionDashboard", new { InstitutionId = Session["InstitutionId"] });

            string view = string.Empty;
            NameValueCollection searchfilter = new NameValueCollection();

            searchfilter = GetSearchFilter(null, null, app.clinicID.ToString());
            int instId = 0;

            if (Session != null && Session["InstitutionId"] != null)
            {
                instId = (int)Session["InstitutionId"];
            }
            var apps = _applicationContext.ServiceContext.AppointmentService.GetAppointments(instId, searchfilter).ToList();

            view = RenderPartialView("_InstitutionGrid", apps);
            var result = new { view = view };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public JsonResult InstitutionSave(FormCollection frm, bool MarkAsComplete, string Hfddlclinic)
        {
            HRA4.ViewModels.Appointment app = new ViewModels.Appointment();
            app.Id = Convert.ToInt32(frm["Id"]);
            app.MRN = Convert.ToString(frm["MRN"]);
            app.DateOfBirth = Convert.ToDateTime(frm["dob-date"]);
            app.PatientName = Convert.ToString(frm["PatientName"]);
            app.Survey = Convert.ToString(frm["Survey"]);
            app.appttime = Convert.ToString(frm["ddlappttimes"]);
            app.Address1 = Convert.ToString(frm["Address1"]);
            app.Address2 = Convert.ToString(frm["Address2"]);
            app.AppointmentDate = Convert.ToDateTime(frm["edit-app-date"]);
            app.AppointmentPhysician = Convert.ToString(frm["ddlAppointmentPhysicians"]);
            app.AssessmentName = Convert.ToString(frm["Assessment"]);
            app.Cellphone = Convert.ToString(frm["Cellphone"]);
            app.City = Convert.ToString(frm["City"]);
            app.Country = Convert.ToString(frm["ddlCountries"]);
            //app.DateCompleted = Convert.ToDateTime(frm["dob-date"]);
            app.DiseaseHx = Convert.ToString(frm["DiseaseHx"]);
            app.Education = Convert.ToString(frm["Education"]);
            app.EmailAddress = Convert.ToString(frm["EmailAddress"]);
            app.Gender = Convert.ToString(frm["ddlGenders"]);
            app.Homephone = Convert.ToString(frm["Homephone"]);
            app.Language = Convert.ToString(frm["ddlLanguages"]);
            app.Maritalstatus = Convert.ToString(frm["Maritalstatus"]);
            app.Nationality = Convert.ToString(frm["ddlNationalities"]);
            app.Occupation = Convert.ToString(frm["Occupation"]);
            app.PCP = Convert.ToInt32(frm["ddlPCP"]);
            app.RefPhysician = Convert.ToInt32(frm["ddlRefPhysician"]);
            app.clinicID = Convert.ToInt32(frm["ddlclinics"]);
            app.Race = Convert.ToString(frm["ddlRaces"]);
            app.State = Convert.ToString(frm["ddlStates"]);
            app.Workphone = Convert.ToString(frm["Workphone"]);
            app.Zip = Convert.ToString(frm["Zip"]);

            //if (Hfddlclinic != null && Hfddlclinic != "")
            //    app.clinicID = Convert.ToInt32(Hfddlclinic);// verfiy
            //else app.clinicID = -1;
            app.SetMarkAsComplete = MarkAsComplete;
            _applicationContext.ServiceContext.AppointmentService.SaveAppointments(app, Convert.ToInt32(Session["InstitutionId"]));
            // return RedirectToAction("InstitutionDashboard", new { InstitutionId = Session["InstitutionId"] });

            string view = string.Empty;
            NameValueCollection searchfilter = new NameValueCollection();
            searchfilter = GetSearchFilter(null, null, app.clinicID.ToString());
            int instId = 0;
            if (Session != null && Session["InstitutionId"] != null)
            {
                instId = (int)Session["InstitutionId"];
            }
            var apps = _applicationContext.ServiceContext.AppointmentService.GetAppointments(instId, searchfilter).ToList();
            view = RenderPartialView("_InstitutionGrid", apps);
            var result = new { view = view };
            return Json(result, JsonRequestBehavior.AllowGet);
        }