Пример #1
0
        public ActionResult PatientAssessment4(PatientAssessmentViewModel model, FormCollection fc)
        {
            try
            {
                PatientAssessmentService PAS = new PatientAssessmentService();
                Data.PatientAssessment S1 = PAS.GetByID(model.ID);

                S1.Question12 = model.Question12;

                S1.Question13 = fc["Ques13Radio"];
                if (S1.Question13 == "Switch to:")
                {
                    OEMedicationMatrix OEM2 = new OEMedicationMatrix();
                    OEM2.Acetaminophen = fc["Question13_Acetaminophen"];
                    OEM2.Aspirin = fc["Question13_Aspirin"];
                    OEM2.Diclofenac = fc["Question13_Diclofenac"];
                    OEM2.DiclofenacMisoprostol = fc["Question13_DiclofenacMisoprostol"];
                    OEM2.Ibuprofen = fc["Question13_Ibuprofen"];
                    OEM2.Indomethacin = fc["Question13_Indomethacin"];
                    OEM2.Meloxicam = fc["Question13_Meloxicam"];
                    OEM2.Naproxen = fc["Question13_Naproxen"];
                    OEM2.NaproxenEsomeprazole = fc["Question13_Naproxen—esomeprazole"];
                    OEM2.Celecoxib = fc["Question13_Celecoxib"];
                    OEM2.AcetaminophenTramadol = fc["Question13_Acetaminophen/tramadol"];
                    OEM2.Codeine = fc["Question13_Codeine"];
                    OEM2.Tramadol = fc["Question13_Tramadol"];
                    OEM2.Other = fc["Question13_Other"];

                    S1.Question13 = "Switch to: " + JsonConvert.SerializeObject(OEM2);
                }

                PAS.Save(S1);

                return RedirectToAction("Index");
            }
            catch
            {
                return View(model);
            }
        }
Пример #2
0
 public ActionResult PatientAssessment()
 {
     PatientAssessmentViewModel model = new PatientAssessmentViewModel();
     return View(model);
 }
Пример #3
0
 public ActionResult PatientAssessment4(PatientAssessmentViewModel model)
 {
     model.Question9 = model.Question9.Replace("\"", "\'");
     return View(model);
 }
Пример #4
0
        public ActionResult PatientAssessment3(PatientAssessmentViewModel model, FormCollection fc)
        {
            try
            {
                PatientAssessmentService PAS = new PatientAssessmentService();
                Data.PatientAssessment S1 = PAS.GetByID(model.ID);

                int i = 1;
                foreach (AnswerModel item in model.Question10)
                {
                    if (fc.Get("Question10.AnswerCheck" + i) != "false")
                    {
                        S1.Question10 += item.Value + "; ";
                    }
                    i++;
                }

                S1.Question11 = fc["Question11"];

                PAS.Save(S1);

                return RedirectToAction("PatientAssessment4", S1);
            }
            catch
            {
                return View(model);
            }
        }
Пример #5
0
 public ActionResult PatientAssessment3(PatientAssessmentViewModel model)
 {
     return View(model);
 }
Пример #6
0
        public ActionResult PatientAssessment2(PatientAssessmentViewModel model, FormCollection fc)
        {
            try
            {
                PatientAssessmentService PAS = new PatientAssessmentService();
                Data.PatientAssessment S1 = PAS.GetByID(model.ID);

                S1.Question6 = model.Question6.ToString();
                S1.Question7 = fc["Question7"];

                int i = 1;
                foreach (AnswerModel item in model.Question8)
                {
                    if (fc.Get("Question8.AnswerCheck" + i) != "false")
                    {
                        S1.Question8 += item.Value + "; ";
                    }
                    i++;
                }

                //9 add to an object, then serialize to JSON, store the string.
                OEMedicationMatrix OEM = new OEMedicationMatrix();
                OEM.Acetaminophen = fc["Question9_Acetaminophen"];
                OEM.Aspirin = fc["Question9_Aspirin"];
                OEM.Diclofenac = fc["Question9_Diclofenac"];
                OEM.DiclofenacMisoprostol = fc["Question9_DiclofenacMisoprostol"];
                OEM.Ibuprofen = fc["Question9_Ibuprofen"];
                OEM.Indomethacin = fc["Question9_Indomethacin"];
                OEM.Meloxicam = fc["Question9_Meloxicam"];
                OEM.Naproxen = fc["Question9_Naproxen"];
                OEM.NaproxenEsomeprazole = fc["Question9_Naproxen—PPI"];
                OEM.Celecoxib = fc["Question9_Celecoxib"];
                OEM.AcetaminophenTramadol = fc["Question9_Acetaminophen/tramadol"];
                OEM.Codeine = fc["Question9_Codeine"];
                OEM.Tramadol = fc["Question9_Tramadol"];
                OEM.Other = fc["Question9_Other"];

                S1.Question9 = JsonConvert.SerializeObject(OEM);

                PAS.Save(S1);

                return RedirectToAction("PatientAssessment3", S1);
            }
            catch
            {
                return View(model);
            }
        }
Пример #7
0
        public ActionResult PatientAssessment(PatientAssessmentViewModel model, FormCollection fc)
        {
            try
            {
                PatientAssessmentService PAS = new PatientAssessmentService();
                Data.PatientAssessment S1 = new Data.PatientAssessment();

                S1.UserID = CurrentUserID;
                S1.DateTimeTakenUTC = DateTime.UtcNow;

                S1.Question1 = fc["Question1"];
                S1.Question2 = fc["Question2"];
                int i=1;
                foreach (AnswerModel item in model.Question3)
                {
                    if (fc.Get("Question3.AnswerCheck" + i) != "false")
                    {
                        S1.Question3 += item.Value + "; ";
                    }
                    i++;
                }

                S1.Question4 = fc["Question4"];
                S1.Question5 = fc["Question5"];

                PAS.Save(S1);

                return RedirectToAction("PatientAssessment2", S1);
            }
            catch
            {
                return View(model);
            }
        }