Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
        public ActionResult PreAssessment3(PreAssessmentViewModel model, FormCollection fc)
        {
            try
            {
                PreAssessmentService PAS = new PreAssessmentService();
                Data.PreAssessment S1 = PAS.GetByID(model.ID);

                S1.Question9 = "Uncomplicated peptic ulcer: " + model.Question9UncomplicatedPepticUlcer +
                                "%, GERD: " + model.Question9GERD +
                                "%, Dyspepsia: " + model.Question9Dyspepsia +
                                "%, Bleeding peptic ulcer: " + model.Question9BleedingPepticUlcer +
                                "%, H pylori infection: " + model.Question9HpyloriInfection + "%";

                S1.Question10 = "Cervical: " + model.Question10Cervical +
                                "%, Dorsal: " + model.Question10Dorsal +
                                "%, Lumbar: " + model.Question10Lumbar +
                                "%, Hand: " + model.Question10Hand +
                                "%, Hip: " + model.Question10Hip +
                                "%, Knee: " + model.Question10Knee + "%";

                S1.Question11 = "Low Risk: " + model.Question11Low + "%, Moderate Risk: " + model.Question11Moderate + "%, High Risk: " + model.Question11High + "%";

                //12 add to an object, then serialize to JSON, store the string.
                OEMedicationMatrix OEM = new OEMedicationMatrix();
                OEM.Acetaminophen = fc["Question12_Acetaminophen"];
                OEM.Aspirin = fc["Question12_Aspirin"];
                OEM.Diclofenac = fc["Question12_Diclofenac"];
                OEM.DiclofenacMisoprostol = fc["Question12_DiclofenacMisoprostol"];
                OEM.Ibuprofen = fc["Question12_Ibuprofen"];
                OEM.Indomethacin = fc["Question12_Indomethacin"];
                OEM.Meloxicam = fc["Question12_Meloxicam"];
                OEM.Naproxen = fc["Question12_Naproxen"];
                OEM.NaproxenEsomeprazole = fc["Question12_NaproxenEsomeprazole"];
                OEM.Celecoxib = fc["Question12_Celecoxib"];
                OEM.AcetaminophenTramadol = fc["Question12_AcetaminophenTramadol"];
                OEM.Codeine = fc["Question12_Codeine"];
                OEM.Tramadol = fc["Question12_Tramadol"];
                OEM.Other = fc["Question12_Other"];

                S1.Question12 = JsonConvert.SerializeObject(OEM);

                PAS.Save(S1);

                return RedirectToAction("Index");
            }
            catch
            {
                return View(model);
            }
        }
Ejemplo n.º 3
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);
            }
        }