Exemplo n.º 1
0
        public ActionResult Kidplazas_Patient_QA(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Kidplaza kidplaza = db.Kidplaza.Find(id);

            TempData["Kidplazas_QA_Patient_ID"] = kidplaza.ID;

            Patient patient = db.Patient.Find(id);

            TempData["patient_kidplaza_Detail_Name"]   = patient.Name;
            TempData["patient_kidplaza_Detail_Date"]   = patient.Date.ToShortDateString();
            TempData["patient_kidplaza_Detail_Age"]    = patient.Age;
            TempData["patient_kidplaza_Detail_Gender"] = patient.Gender;
            TempData["patient_kidplaza_Detail_Form"]   = patient.Form;
            TempData["patient_kidplaza_Detail_DrName"] = patient.DrName;
            if (kidplaza == null)
            {
                return(HttpNotFound());
            }
            return(View(kidplaza));
        }
Exemplo n.º 2
0
        public ActionResult KidplazasFormResult(int?id)
        {
            //用tempData 傳一次性ID
            //string use_0 = TempData["TempKidplazasID"].ToString();
            //int IntID = int.Parse(use_0);
            //aircutList.PatientID = TempData["TempAircutPatientID"].ToString();
            Kidplaza kidplazaresult = db.Kidplaza.Find(id);

            kidplazaresult.checkAnsTure  = 0;
            kidplazaresult.checkAnsWrong = 0;

            if (kidplazaresult.Cognition1 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right1"]    = "答案正確!";
                TempData["question1"] = "1.接受手術治療,傷口會疼痛,復原需要時間。";
            }
            if (kidplazaresult.Cognition1 == "不對" || kidplazaresult.Cognition1 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong1"]    = "答案錯誤!";
                TempData["question1"] = "1.接受手術治療,傷口會疼痛,復原需要時間。正確答案:對";
            }
            if (kidplazaresult.Cognition2 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right2"]    = "答案正確!";
                TempData["question2"] = "2.接受放射治療的效果等同手術治療,雖然沒有割除腫瘤,但陰道會乾澀且影響性生活。";
            }
            if (kidplazaresult.Cognition2 == "不對" || kidplazaresult.Cognition2 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong2"]    = "答案錯誤!";
                TempData["question2"] = "2.接受放射治療的效果等同手術治療,雖然沒有割除腫瘤,但陰道會乾澀且影響性生活。正確答案:對";
            }
            if (kidplazaresult.Cognition3 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right3"]    = "答案正確!";
                TempData["question3"] = "3.接受放射治療,卵巢亦有可能遭受輻射傷害。";
            }
            if (kidplazaresult.Cognition3 == "不對" || kidplazaresult.Cognition3 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong3"]    = "答案錯誤!";
                TempData["question3"] = "3.接受放射治療,卵巢亦有可能遭受輻射傷害。正確答案:對";
            }
            if (kidplazaresult.Cognition4 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right4"]    = "答案正確!";
                TempData["question4"] = "4.進行手術治療之後,有可能產生暫時性或慢性膀胱與腸道功能障礙。";
            }
            if (kidplazaresult.Cognition4 == "不對" || kidplazaresult.Cognition4 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong4"]    = "答案錯誤!";
                TempData["question4"] = "4.進行手術治療之後,有可能產生暫時性或慢性膀胱與腸道功能障礙。正確答案:對";
            }
            if (kidplazaresult.Cognition5 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right5"]    = "答案正確!";
                TempData["question5"] = "5.進行骨盆腔淋巴廓清手術之後,有可能發生淋巴水腫的副作用。";
            }
            if (kidplazaresult.Cognition5 == "不對" || kidplazaresult.Cognition5 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong5"]    = "答案錯誤!";
                TempData["question5"] = "5.進行骨盆腔淋巴廓清手術之後,有可能發生淋巴水腫的副作用。正確答案:對";
            }
            if (kidplazaresult.Cognition6 == "對")
            {
                kidplazaresult.checkAnsTure++;
                TempData["right6"]    = "答案正確!";
                TempData["question6"] = "6.接受放射治療,我必須分階段,經過至少 5 次的治療。";
            }
            if (kidplazaresult.Cognition6 == "不對" || kidplazaresult.Cognition6 == "不確定")
            {
                kidplazaresult.checkAnsWrong++;
                TempData["wrong6"]    = "答案錯誤!";
                TempData["question6"] = "6.接受放射治療,我必須分階段,經過至少 5 次的治療。正確答案:對";
            }
            db.SaveChanges();
            return(View(kidplazaresult));
        }
Exemplo n.º 3
0
        public ActionResult KidplazasForm([Bind(Include = "ID,PatientID")] Kidplaza kidplaza, FormCollection obj)
        {
            //TempData["TempKidplazasID"] = kidplaza.ID;
            string title1 = obj["Treatment"];

            if (title1 != "")
            {
                kidplaza.Pattern = title1;
            }
            int    tmp;
            string title2 = (obj["Step1"]);

            if (title2 != "")
            {
                tmp = int.Parse(title2);
                kidplaza.Degree1 = tmp;
            }
            string title3 = (obj["Step2"]);

            if (title3 != "")
            {
                tmp = int.Parse(title3);
                kidplaza.Degree2 = tmp;
            }
            string title4 = (obj["Step3"]);

            if (title4 != "")
            {
                tmp = int.Parse(title4);
                kidplaza.Degree3 = tmp;
            }
            string title5 = (obj["Step4"]);

            if (title4 != "")
            {
                tmp = int.Parse(title5);
                kidplaza.Degree4 = tmp;
            }
            string title6 = (obj["Step5"]);

            if (title5 != "")
            {
                tmp = int.Parse(title6);
                kidplaza.Degree5 = tmp;
            }
            string title7 = (obj["Step6"]);

            if (title6 != "")
            {
                tmp = int.Parse(title7);
                kidplaza.Degree6 = tmp;
            }
            string title8 = (obj["Step7"]);

            if (title7 != "")
            {
                tmp = int.Parse(title8);
                kidplaza.Degree7 = tmp;
            }
            string title9 = (obj["Step8"]);

            if (title8 != "")
            {
                tmp = int.Parse(title9);
                kidplaza.Degree8 = tmp;
            }
            string title10 = (obj["Step9"]);

            if (title9 != "")
            {
                tmp = int.Parse(title10);
                kidplaza.Degree9 = tmp;
            }
            string title11 = obj["Cognition1"];

            if (title11 != "")
            {
                kidplaza.Cognition1 = title11;
            }
            string title12 = obj["Cognition2"];

            if (title12 != "")
            {
                kidplaza.Cognition2 = title12;
            }
            string title13 = obj["Cognition3"];

            if (title13 != "")
            {
                kidplaza.Cognition3 = title13;
            }
            string title14 = obj["Cognition4"];

            if (title14 != "")
            {
                kidplaza.Cognition4 = title14;
            }
            string title15 = obj["Cognition5"];

            if (title15 != "")
            {
                kidplaza.Cognition5 = title15;
            }
            string title16 = obj["Cognition6"];

            if (title16 != "")
            {
                kidplaza.Cognition6 = title16;
            }
            string title17 = obj["Decision"];

            if (title17 != "")
            {
                kidplaza.Decision = title17;
            }
            string title18 = obj["Determine"];

            if (title18 != "")
            {
                kidplaza.Determine = title18;
            }
            string title19 = obj["Content01"];

            if (title19 != "")
            {
                kidplaza.Text = title19;
            }
            string title20 = obj["Content02"];

            if (title20 != "")
            {
                kidplaza.Text2 = title20;
            }
            string title21 = obj["Text2Content"];

            if (title21 != "")
            {
                kidplaza.Text2Content = title21;
            }
            kidplaza.Token++;
            Patient patient = db.Patient.Find(kidplaza.ID);

            patient.CheckFinish = 1;
            DateTime date = DateTime.Now;

            if (kidplaza.Text != null)
            {
                patient.CheckMsg       = 1;
                kidplaza.Ques1         = kidplaza.Text;
                kidplaza.Ques6         = date.ToShortDateString();
                kidplaza.Patient_token = 2;
            }
            if (kidplaza.Text2 != null)
            {
                patient.CheckMsg       = 1;
                kidplaza.Ques1         = kidplaza.Text2;
                kidplaza.Patient_token = 2;
            }
            if (kidplaza.Text2 == null && kidplaza.Text == null)
            {
                kidplaza.Patient_token = 1;
            }
            db.Entry(kidplaza).State = EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("KidplazasFormResult", new { id = kidplaza.ID }));
        }
Exemplo n.º 4
0
        public ActionResult Kidplazas_Dr_QA(FormCollection obj)
        {
            string   strid    = TempData["Kidplazas_QA_Dr_ID"].ToString();
            int      id       = int.Parse(strid);
            Kidplaza kidplaza = db.Kidplaza.Find(id);
            Patient  patient  = db.Patient.Find(id);
            DateTime date     = DateTime.Now;

            kidplaza.Result = obj["Dr_QA_result"];

            if (kidplaza.Dr_token == 0)
            {
                kidplaza.Dr_token = 1;
            }
            if (kidplaza.Dr_token == 1)
            {
                kidplaza.Ans1 = obj["Dr_QA"].ToString();
                kidplaza.Dr_token++;
                patient.CheckMsg = 0;
                kidplaza.Ans6    = date.ToShortDateString();
                db.SaveChanges();
                return(RedirectToAction("Index", "Patients"));
            }
            if (kidplaza.Dr_token == 2)
            {
                kidplaza.Ans2 = obj["Dr_QA"].ToString();
                kidplaza.Dr_token++;
                patient.CheckMsg = 0;
                kidplaza.Ans7    = date.ToShortDateString();
                db.SaveChanges();
                return(RedirectToAction("Index", "Patients"));
            }
            if (kidplaza.Dr_token == 3)
            {
                kidplaza.Ans3 = obj["Dr_QA"].ToString();
                kidplaza.Dr_token++;
                patient.CheckMsg = 0;
                kidplaza.Ans8    = date.ToShortDateString();
                db.SaveChanges();
                return(RedirectToAction("Index", "Patients"));
            }
            if (kidplaza.Dr_token == 4)
            {
                kidplaza.Ans4 = obj["Dr_QA"].ToString();
                kidplaza.Dr_token++;
                patient.CheckMsg = 0;
                kidplaza.Ans9    = date.ToShortDateString();
                db.SaveChanges();
                return(RedirectToAction("Index", "Patients"));
            }
            if (kidplaza.Dr_token == 5)
            {
                kidplaza.Ans5     = obj["Dr_QA"].ToString();
                kidplaza.Dr_token = 1;
                patient.CheckMsg  = 0;
                kidplaza.Ans10    = date.ToShortDateString();
                db.SaveChanges();
                return(RedirectToAction("Index", "Patients"));
            }
            ////db.Entry(aircut).State = EntityState.Modified;
            //db.SaveChanges();
            return(View(kidplaza));
        }