private void SaveData()
        {
            string visit1Date    = this.txtVisit1Date.Text;
            int    genderAnsID   = Int32.Parse(chkGender.SelectedItem.Value);
            int    ethinicityID  = Int32.Parse(this.ddEthinicity.SelectedItem.Value);
            int    medCoverageID = Int32.Parse(ddMedCoverage.SelectedItem.Value);

            string bpSystolic = this.txtSystolic.Text;
            string bpDystolic = this.txtDiastolic.Text;

            string weight = this.txtWeight.Text;
            string height = this.txtHeight.Text;

            // bool weightInPounds = this.chkLbs.Checked;
            bool weightInPounds = !(this.rdoWeightType.SelectedIndex == 0);

            bool heightInCms = rdoHeightType.SelectedIndex == 0;

            //bool heightCM = this.chkCM.Checked;
            //bool heightInch = this.chkInch.Checked;

            bool neverSmoked = chkNeverSmoked.Checked;
            bool pastSmoker  = chkPastSmoker.Checked;
            bool currSmoker  = chkCurrentSmoker.Checked;


            bool diabCompl_Depression       = chkDepressionYes.Checked;
            bool diabCompl_Erectile         = chkErectleYes.Checked;
            bool diabCompl_Hypoglycemia     = chkHypoglycemiaYes.Checked;
            bool diabCompl_Macroalbuminuria = chkMacroalbuminuriaYes.Checked;
            bool diabCompl_Microalbuminuria = chkMicroalbuminuriaYes.Checked;
            bool diabCompl_Retinopathy      = chkRetinopathyYes.Checked;
            bool diabCompl_None             = chkDiabetesComplicationsNone.Checked;

            bool currMedication_ASA = chkASAYes.Checked;
            bool currMedication_OtherAntiplateletAgent = chkOtherAntiplateletAgentYes.Checked;
            bool currMedication_ACEInhibitor           = chkACEInhibitorYes.Checked;
            bool currMedication_ARB                   = chkARBYes.Checked;
            bool currMedication_BetaBlocker           = chkBetaBlockerYes.Checked;
            bool currMedication_CalciumChannelBlocker = chkCalciumChannelBlockerYes.Checked;
            bool currMedication_Diuretic              = chkDiureticYes.Checked;
            bool currMedication_None                  = chkCurrentMedicationNone.Checked;

            int adherentCurrMed = Int32.Parse(this.ddPatientAdherence.SelectedItem.Value);

            bool estimate_PatientCaregiver = chkPatientCaregiver.Checked;
            bool estimate_PhramacyRenewal  = chkPhramacyRenewal.Checked;
            bool estimate_MedicationCount  = chkMedicationCount.Checked;
            bool estimate_GuessedEstimated = chkGuessedEstimated.Checked;
            bool estimate_DidNotEvaluate   = chkDidNotEvaluate.Checked;
            //bool estimate_None = chkEstimateMedicationNo.Checked;
            bool estimate_None = false;

            List <PatientQuestion> lstAnswers = new List <PatientQuestion>();

            PatientQuestion q1 = new PatientQuestion();

            q1.ID = 9;
            q1.Answer.Add(new PatientAnswer()
            {
                ID = 15, Value = visit1Date
            });

            PatientQuestion q2 = new PatientQuestion();

            q2.ID = 10;
            q2.Answer.Add(new PatientAnswer()
            {
                ID = genderAnsID, Value = chkGender.SelectedItem.Text
            });

            PatientQuestion q3 = new PatientQuestion();

            q3.ID = 11;
            q3.Answer.Add(new PatientAnswer()
            {
                ID = ethinicityID, Value = ddEthinicity.SelectedItem.Text
            });

            PatientQuestion q4 = new PatientQuestion();

            q4.ID = 12;
            q4.Answer.Add(new PatientAnswer()
            {
                ID = medCoverageID, Value = this.ddMedCoverage.SelectedItem.Text
            });

            //blood pressure
            PatientQuestion q5 = new PatientQuestion();

            q5.ID = 13;
            q5.Answer.Add(new PatientAnswer()
            {
                ID = 31, Value = bpSystolic
            });

            PatientQuestion q6 = new PatientQuestion();

            q6.ID = 13;
            q6.Answer.Add(new PatientAnswer()
            {
                ID = 32, Value = bpDystolic
            });

            //weight
            PatientQuestion q7 = new PatientQuestion();

            q7.ID = 14;
            q7.Answer.Add(new PatientAnswer()
            {
                ID = weightInPounds ? 34 : 33, Value = weight
            });

            //height
            PatientQuestion q8 = new PatientQuestion();

            q8.ID = 15;
            q8.Answer.Add(new PatientAnswer()
            {
                ID = heightInCms ? 35 : 36, Value = height
            });

            //smoking history
            PatientQuestion q9 = new PatientQuestion();

            q9.ID = 16;
            q9.Answer.Add(new PatientAnswer()
            {
                ID = 37, Value = neverSmoked ? "1" : "0"
            });

            PatientQuestion q10 = new PatientQuestion();

            q10.ID = 16;
            q10.Answer.Add(new PatientAnswer()
            {
                ID = 38, Value = pastSmoker ? "1" : "0"
            });

            PatientQuestion q11 = new PatientQuestion();

            q11.ID = 16;
            q11.Answer.Add(new PatientAnswer()
            {
                ID = 39, Value = currSmoker ? "1" : "0"
            });


            //diabetes complications
            PatientQuestion q12 = new PatientQuestion();

            q12.ID = 17;
            q12.Answer.Add(new PatientAnswer()
            {
                ID = 40, Value = diabCompl_Depression ? "1" : "0"
            });

            PatientQuestion q13 = new PatientQuestion();

            q13.ID = 17;
            q13.Answer.Add(new PatientAnswer()
            {
                ID = 41, Value = diabCompl_Erectile ? "1" : "0"
            });

            PatientQuestion q14 = new PatientQuestion();

            q14.ID = 17;
            q14.Answer.Add(new PatientAnswer()
            {
                ID = 42, Value = diabCompl_Hypoglycemia ? "1" : "0"
            });

            PatientQuestion q15 = new PatientQuestion();

            q15.ID = 17;
            q15.Answer.Add(new PatientAnswer()
            {
                ID = 43, Value = diabCompl_Macroalbuminuria ? "1" : "0"
            });

            PatientQuestion q16 = new PatientQuestion();

            q16.ID = 17;
            q16.Answer.Add(new PatientAnswer()
            {
                ID = 44, Value = diabCompl_Microalbuminuria ? "1" : "0"
            });

            PatientQuestion q17 = new PatientQuestion();

            q17.ID = 17;
            q17.Answer.Add(new PatientAnswer()
            {
                ID = 45, Value = diabCompl_Retinopathy ? "1" : "0"
            });

            //current medication
            PatientQuestion q18 = new PatientQuestion();

            q18.ID = 18;
            q18.Answer.Add(new PatientAnswer()
            {
                ID = 46, Value = currMedication_ASA ? "1" : "0"
            });

            PatientQuestion q19 = new PatientQuestion();

            q19.ID = 18;
            q19.Answer.Add(new PatientAnswer()
            {
                ID = 47, Value = currMedication_OtherAntiplateletAgent ? "1" : "0"
            });

            PatientQuestion q20 = new PatientQuestion();

            q20.ID = 18;
            q20.Answer.Add(new PatientAnswer()
            {
                ID = 48, Value = currMedication_ACEInhibitor ? "1" : "0"
            });

            PatientQuestion q21 = new PatientQuestion();

            q21.ID = 18;
            q21.Answer.Add(new PatientAnswer()
            {
                ID = 49, Value = currMedication_ARB ? "1" : "0"
            });

            PatientQuestion q22 = new PatientQuestion();

            q22.ID = 18;
            q22.Answer.Add(new PatientAnswer()
            {
                ID = 50, Value = currMedication_BetaBlocker ? "1" : "0"
            });

            PatientQuestion q23 = new PatientQuestion();

            q23.ID = 18;
            q23.Answer.Add(new PatientAnswer()
            {
                ID = 51, Value = currMedication_CalciumChannelBlocker ? "1" : "0"
            });

            PatientQuestion q24 = new PatientQuestion();

            q24.ID = 18;
            q24.Answer.Add(new PatientAnswer()
            {
                ID = 52, Value = currMedication_Diuretic ? "1" : "0"
            });

            //curr medication
            PatientQuestion q25 = new PatientQuestion();

            q25.ID = 19;
            q25.Answer.Add(new PatientAnswer()
            {
                ID = adherentCurrMed, Value = ddPatientAdherence.SelectedItem.Text
            });


            //how did you estimate
            PatientQuestion q26 = new PatientQuestion();

            q26.ID = 20;
            q26.Answer.Add(new PatientAnswer()
            {
                ID = 56, Value = estimate_PatientCaregiver ? "1" : "0"
            });

            PatientQuestion q27 = new PatientQuestion();

            q27.ID = 20;
            q27.Answer.Add(new PatientAnswer()
            {
                ID = 57, Value = estimate_PhramacyRenewal ? "1" : "0"
            });

            PatientQuestion q28 = new PatientQuestion();

            q28.ID = 20;
            q28.Answer.Add(new PatientAnswer()
            {
                ID = 58, Value = estimate_MedicationCount ? "1" : "0"
            });

            PatientQuestion q29 = new PatientQuestion();

            q29.ID = 20;
            q29.Answer.Add(new PatientAnswer()
            {
                ID = 59, Value = estimate_GuessedEstimated ? "1" : "0"
            });

            PatientQuestion q30 = new PatientQuestion();

            q30.ID = 20;
            q30.Answer.Add(new PatientAnswer()
            {
                ID = 60, Value = estimate_DidNotEvaluate ? "1" : "0"
            });


            PatientQuestion q31 = new PatientQuestion();

            q31.ID = 17;
            q31.Answer.Add(new PatientAnswer()
            {
                ID = 210, Value = diabCompl_None ? "1" : "0"
            });

            PatientQuestion q32 = new PatientQuestion();

            q32.ID = 18;
            q32.Answer.Add(new PatientAnswer()
            {
                ID = 211, Value = currMedication_None ? "1" : "0"
            });


            PatientQuestion q33 = new PatientQuestion();

            q33.ID = 20;
            q33.Answer.Add(new PatientAnswer()
            {
                ID = 212, Value = estimate_None ? "1" : "0"
            });


            lstAnswers.Add(q1);
            lstAnswers.Add(q2);
            lstAnswers.Add(q3);
            lstAnswers.Add(q4);
            lstAnswers.Add(q5);
            lstAnswers.Add(q6);
            lstAnswers.Add(q7);
            lstAnswers.Add(q8);
            lstAnswers.Add(q9);
            lstAnswers.Add(q10);
            lstAnswers.Add(q11);
            lstAnswers.Add(q12);
            lstAnswers.Add(q13);
            lstAnswers.Add(q14);
            lstAnswers.Add(q15);
            lstAnswers.Add(q16);
            lstAnswers.Add(q17);
            lstAnswers.Add(q18);
            lstAnswers.Add(q19);
            lstAnswers.Add(q20);
            lstAnswers.Add(q21);
            lstAnswers.Add(q22);
            lstAnswers.Add(q23);
            lstAnswers.Add(q24);
            lstAnswers.Add(q25);
            lstAnswers.Add(q26);
            lstAnswers.Add(q27);
            lstAnswers.Add(q28);
            lstAnswers.Add(q29);
            lstAnswers.Add(q30);
            lstAnswers.Add(q31);
            lstAnswers.Add(q32);
            lstAnswers.Add(q33);

            visRepos.SaveVisit1Screen2(patientID, lstAnswers);
        }
Beispiel #2
0
        private void SaveData()
        {
            List <PatientQuestion> lstAnswers = new List <PatientQuestion>();

            //string choles = txtTotalCholesterol.Text + "." + (string.IsNullOrEmpty(txtTotalCholesterol2.Text) ? "0" : txtTotalCholesterol2.Text);
            //string LDL_C = txtLDL_C1.Text + "." + (string.IsNullOrEmpty(txtLDL_C2.Text) ? "0" : txtLDL_C2.Text);
            //string HDL_C = txtHDLC1.Text + "." + (string.IsNullOrEmpty(txtHDLC2.Text) ? "0" : txtHDLC2.Text);
            //string nonHDLC = txtNonHDLC1.Text + "." + (string.IsNullOrEmpty(txtNonHDLC2.Text) ? "0" : txtNonHDLC2.Text);
            //string Triglycerides = txtTriglycerides1.Text + "." + (string.IsNullOrEmpty(txtTriglycerides2.Text) ? "0" : txtTriglycerides2.Text);
            //string A1C = this.txtAIC1.Text + "." + (string.IsNullOrEmpty(txtAIC2.Text) ? "0" : txtAIC2.Text);
            //string glucose = txtFastingPlasmaGlucose1.Text + "." + (string.IsNullOrEmpty(txtFastingPlasmaGlucose2.Text) ? "0" : txtFastingPlasmaGlucose2.Text);

            string choles        = txtTotalCholesterol.Text;
            string LDL_C         = txtLDL_C1.Text;
            string HDL_C         = txtHDLC1.Text;
            string nonHDLC       = txtNonHDLC1.Text;
            string Triglycerides = txtTriglycerides1.Text;
            string A1C           = this.txtAIC1.Text;
            string glucose       = txtFastingPlasmaGlucose1.Text;

            PatientQuestion q1 = new PatientQuestion();

            q1.ID = 27;
            q1.Answer.Add(new PatientAnswer()
            {
                ID = Int32.Parse(this.ddLDLC.SelectedValue.ToString()), Value = (this.ddLDLC.SelectedItem.Text.ToString())
            });

            PatientQuestion q2 = new PatientQuestion();

            q2.ID = 28;
            q2.Answer.Add(new PatientAnswer()
            {
                ID = 74, Value = txtMostRecentLipidLabDate.Text
            });

            PatientQuestion q3 = new PatientQuestion();

            q3.ID = 29;
            q3.Answer.Add(new PatientAnswer()
            {
                ID = 75, Value = choles
            });

            PatientQuestion q4 = new PatientQuestion();

            q4.ID = 30;
            q4.Answer.Add(new PatientAnswer()
            {
                ID = 76, Value = LDL_C
            });


            PatientQuestion q5 = new PatientQuestion();

            q5.ID = 31;
            q5.Answer.Add(new PatientAnswer()
            {
                ID = 77, Value = HDL_C
            });

            PatientQuestion q6 = new PatientQuestion();

            q6.ID = 32;
            q6.Answer.Add(new PatientAnswer()
            {
                ID = 78, Value = nonHDLC
            });

            PatientQuestion q7 = new PatientQuestion();

            q7.ID = 33;
            q7.Answer.Add(new PatientAnswer()
            {
                ID = 79, Value = Triglycerides
            });


            PatientQuestion q8 = new PatientQuestion();

            q8.ID = 34;
            q8.Answer.Add(new PatientAnswer()
            {
                ID = GetSelectedStatinTherapyVal(), Value = GetSelectedStatinTherapyText().ToString()
            });

            //Additional Lipid Lowering Therapy
            PatientQuestion q9 = new PatientQuestion();

            q9.ID = 35;
            q9.Answer.Add(new PatientAnswer()
            {
                ID = 86, Value = chkLipidBileAcidSequestrant.Checked ? "1" : "0"
            });

            PatientQuestion q10 = new PatientQuestion();

            q10.ID = 35;
            q10.Answer.Add(new PatientAnswer()
            {
                ID = 87, Value = chkLipidEzetimibe.Checked ? "1" : "0"
            });

            PatientQuestion q11 = new PatientQuestion();

            q11.ID = 35;
            q11.Answer.Add(new PatientAnswer()
            {
                ID = 88, Value = chkLipidFibrate.Checked ? "1" : "0"
            });

            PatientQuestion q12 = new PatientQuestion();

            q12.ID = 35;
            q12.Answer.Add(new PatientAnswer()
            {
                ID = 89, Value = chkLipidNiacin.Checked ? "1" : "0"
            });

            PatientQuestion q13 = new PatientQuestion();

            q13.ID = 35;
            q13.Answer.Add(new PatientAnswer()
            {
                ID = 90, Value = chkLipidOmega.Checked ? "1" : "0"
            });


            //PatientQuestion q14 = new PatientQuestion();
            //q14.ID = 36;
            //q14.Answer.Add(new PatientAnswer() { ID = Int32.Parse(this.ddDiabetesDuration.SelectedValue.ToString()) });

            PatientQuestion q14 = new PatientQuestion();

            q14.ID = 36;
            q14.Answer.Add(new PatientAnswer()
            {
                ID = 93, Value = this.ddDiabetesDuration.SelectedValue.ToString()
            });


            PatientQuestion q15 = new PatientQuestion();

            q15.ID = 37;
            q15.Answer.Add(new PatientAnswer()
            {
                ID = Int32.Parse(this.ddACITarget.SelectedValue.ToString()), Value = this.ddACITarget.SelectedItem.Text
            });

            PatientQuestion q16 = new PatientQuestion();

            q16.ID = 38;
            q16.Answer.Add(new PatientAnswer()
            {
                ID = 102, Value = this.txtRecentA1CLabDate.Text
            });

            PatientQuestion q17 = new PatientQuestion();

            q17.ID = 39;
            q17.Answer.Add(new PatientAnswer()
            {
                ID = 103, Value = A1C
            });

            PatientQuestion q18 = new PatientQuestion();

            q18.ID = 40;
            q18.Answer.Add(new PatientAnswer()
            {
                ID = 104, Value = glucose
            });


            PatientQuestion q19 = new PatientQuestion();

            q19.ID = 41;
            q19.Answer.Add(new PatientAnswer()
            {
                ID = GetMetforminTherapyValue(), Value = this.GetMetforminTherapyText()
            });


            //What is your A1C target for this patient?
            PatientQuestion q20 = new PatientQuestion();

            q20.ID = 42;
            q20.Answer.Add(new PatientAnswer()
            {
                ID = 111, Value = chk_Antihyperglycemic_Glucosidase.Checked ? "1" : "0"
            });

            PatientQuestion q21 = new PatientQuestion();

            q21.ID = 42;
            q21.Answer.Add(new PatientAnswer()
            {
                ID = 112, Value = chk_Antihyperglycemic_DPP4.Checked ? "1" : "0"
            });

            PatientQuestion q22 = new PatientQuestion();

            q22.ID = 42;
            q22.Answer.Add(new PatientAnswer()
            {
                ID = 113, Value = chk_Antihyperglycemic_GLP1.Checked ? "1" : "0"
            });

            PatientQuestion q23 = new PatientQuestion();

            q23.ID = 42;
            q23.Answer.Add(new PatientAnswer()
            {
                ID = 114, Value = chk_Antihyperglycemic_Insulin.Checked ? "1" : "0"
            });

            PatientQuestion q24 = new PatientQuestion();

            q24.ID = 42;
            q24.Answer.Add(new PatientAnswer()
            {
                ID = 115, Value = chk_Antihyperglycemic_Meglitinide.Checked ? "1" : "0"
            });

            PatientQuestion q25 = new PatientQuestion();

            q25.ID = 42;
            q25.Answer.Add(new PatientAnswer()
            {
                ID = 116, Value = chk_Antihyperglycemic_SGLT2.Checked ? "1" : "0"
            });

            PatientQuestion q26 = new PatientQuestion();

            q26.ID = 42;
            q26.Answer.Add(new PatientAnswer()
            {
                ID = 117, Value = chk_Antihyperglycemic_Sulfonylurea.Checked ? "1" : "0"
            });

            PatientQuestion q27 = new PatientQuestion();

            q27.ID = 42;
            q27.Answer.Add(new PatientAnswer()
            {
                ID = 118, Value = chk_Antihyperglycemic_Thiazolidinedione.Checked ? "1" : "0"
            });

            //additional questions
            PatientQuestion q28 = new PatientQuestion();

            q28.ID = 43;
            q28.Answer.Add(new PatientAnswer()
            {
                ID = 119, Value = ddBileAcidSequestrant.SelectedValue
            });

            PatientQuestion q29 = new PatientQuestion();

            q29.ID = 44;
            q29.Answer.Add(new PatientAnswer()
            {
                ID = 120, Value = ddDailyDoseMetformin.SelectedValue
            });

            PatientQuestion q30 = new PatientQuestion();

            q30.ID = 45;
            q30.Answer.Add(new PatientAnswer()
            {
                ID = 121, Value = ddDailyFreqMetformin.SelectedValue
            });

            PatientQuestion q31 = new PatientQuestion();

            q31.ID = 46;
            q31.Answer.Add(new PatientAnswer()
            {
                ID = 122, Value = ddDailyDoseGlumetza.SelectedValue
            });

            PatientQuestion q32 = new PatientQuestion();

            q32.ID = 47;
            q32.Answer.Add(new PatientAnswer()
            {
                ID = 123, Value = ddDailyDoseLinagliptin.SelectedValue
            });

            PatientQuestion q33 = new PatientQuestion();

            q33.ID = 48;
            q33.Answer.Add(new PatientAnswer()
            {
                ID = 124, Value = ddDailyDoseSaxagliptin.SelectedValue
            });

            PatientQuestion q34 = new PatientQuestion();

            q34.ID = 49;
            q34.Answer.Add(new PatientAnswer()
            {
                ID = 125, Value = ddDailyDoseSitagliptin.SelectedValue
            });

            PatientQuestion q35 = new PatientQuestion();

            q35.ID = 50;
            q35.Answer.Add(new PatientAnswer()
            {
                ID = 126, Value = ddDailyDoseSitagliptinExt.SelectedValue
            });

            PatientQuestion q36 = new PatientQuestion();

            q36.ID = 51;
            q36.Answer.Add(new PatientAnswer()
            {
                ID = 127, Value = ddNumInjections.SelectedValue
            });

            PatientQuestion q37 = new PatientQuestion();

            q37.ID = 52;
            q37.Answer.Add(new PatientAnswer()
            {
                ID = 130, Value = this.txtLDLCareGap.Text
            });



            PatientQuestion q38 = new PatientQuestion();

            q38.ID = 53;
            q38.Answer.Add(new PatientAnswer()
            {
                ID = 131, Value = this.chkLimitLife.Checked ? "1" : "0"
            });

            PatientQuestion q39 = new PatientQuestion();

            q39.ID = 53;
            q39.Answer.Add(new PatientAnswer()
            {
                ID = 132, Value = this.chkHighFunc.Checked ? "1" : "0"
            });

            PatientQuestion q40 = new PatientQuestion();

            q40.ID = 53;
            q40.Answer.Add(new PatientAnswer()
            {
                ID = 133, Value = this.chkIschemic.Checked ? "1" : "0"
            });

            PatientQuestion q41 = new PatientQuestion();

            q41.ID = 53;
            q41.Answer.Add(new PatientAnswer()
            {
                ID = 134, Value = this.chkMultiMorbid.Checked ? "1" : "0"
            });

            PatientQuestion q42 = new PatientQuestion();

            q42.ID = 53;
            q42.Answer.Add(new PatientAnswer()
            {
                ID = 135, Value = this.chkRecuGlycemia.Checked ? "1" : "0"
            });

            PatientQuestion q43 = new PatientQuestion();

            q43.ID = 53;
            q43.Answer.Add(new PatientAnswer()
            {
                ID = 136, Value = this.chkHypoglycemiaAwareness.Checked ? "1" : "0"
            });

            PatientQuestion q44 = new PatientQuestion();

            q44.ID = 53;
            q44.Answer.Add(new PatientAnswer()
            {
                ID = 137, Value = this.chkLongDia.Checked ? "1" : "0"
            });

            PatientQuestion q45 = new PatientQuestion();

            q45.ID = 53;
            q45.Answer.Add(new PatientAnswer()
            {
                ID = 138, Value = this.chkClinicalJudge.Checked ? "1" : "0"
            });

            PatientQuestion q46 = new PatientQuestion();

            q46.ID = 53;
            q46.Answer.Add(new PatientAnswer()
            {
                ID = 139, Value = this.chkNone.Checked ? "1" : "0"
            });


            PatientQuestion q47 = new PatientQuestion();

            q47.ID = 35;
            q47.Answer.Add(new PatientAnswer()
            {
                ID = 213, Value = this.chkLipidNone.Checked ? "1" : "0"
            });


            PatientQuestion q48 = new PatientQuestion();

            q48.ID = 42;
            q48.Answer.Add(new PatientAnswer()
            {
                ID = 214, Value = this.chk_Antihyperglycemic_None.Checked ? "1" : "0"
            });


            lstAnswers.Add(q1);
            lstAnswers.Add(q2);
            lstAnswers.Add(q3);
            lstAnswers.Add(q4);
            lstAnswers.Add(q5);
            lstAnswers.Add(q6);
            lstAnswers.Add(q7);
            lstAnswers.Add(q8);
            lstAnswers.Add(q9);
            lstAnswers.Add(q10);
            lstAnswers.Add(q11);
            lstAnswers.Add(q12);
            lstAnswers.Add(q13);
            lstAnswers.Add(q14);
            lstAnswers.Add(q15);
            lstAnswers.Add(q16);
            lstAnswers.Add(q17);
            lstAnswers.Add(q18);
            lstAnswers.Add(q19);
            lstAnswers.Add(q20);
            lstAnswers.Add(q21);
            lstAnswers.Add(q22);
            lstAnswers.Add(q23);
            lstAnswers.Add(q24);
            lstAnswers.Add(q25);
            lstAnswers.Add(q26);
            lstAnswers.Add(q27);
            lstAnswers.Add(q28);
            lstAnswers.Add(q29);
            lstAnswers.Add(q30);
            lstAnswers.Add(q31);
            lstAnswers.Add(q32);
            lstAnswers.Add(q33);
            lstAnswers.Add(q34);
            lstAnswers.Add(q35);
            lstAnswers.Add(q36);
            lstAnswers.Add(q37);

            lstAnswers.Add(q38);
            lstAnswers.Add(q39);
            lstAnswers.Add(q40);
            lstAnswers.Add(q41);
            lstAnswers.Add(q42);
            lstAnswers.Add(q43);
            lstAnswers.Add(q44);
            lstAnswers.Add(q45);
            lstAnswers.Add(q46);
            lstAnswers.Add(q47);
            lstAnswers.Add(q48);

            visRepos.SaveVisit1Screen4(patientID, lstAnswers);
        }
Beispiel #3
0
        private void SaveData()
        {
            string dateOFConsent = this.txtDateConsent.Text;
            string lastName      = this.txtLastName.Text;
            string firstName     = this.txtFirstName.Text;
            string dob           = Domain.Helper.GetCanadianDateStr(this.ddMonth.SelectedItem.Text + "/" + this.ddDay.SelectedItem.Text + "/" + this.ddYear.SelectedItem.Text);
            string phone         = this.txtPhone.Text;

            bool inclCriteria = this.chkIncl.Checked;
            bool excCriteria  = this.chkExclusion.Checked;

            List <PatientQuestion> lstAnswers = new List <PatientQuestion>();

            PatientQuestion q1 = new PatientQuestion();

            q1.ID = 1;
            q1.Answer.Add(new PatientAnswer()
            {
                ID = 1, Value = chkQ1A1.Checked ? "1" : "0"
            });

            PatientQuestion q2 = new PatientQuestion();

            q2.ID = 1;
            q2.Answer.Add(new PatientAnswer()
            {
                ID = 4, Value = chkQ1A2.Checked ? "1" : "0"
            });

            PatientQuestion q3 = new PatientQuestion();

            q3.ID = 1;
            q3.Answer.Add(new PatientAnswer()
            {
                ID = 5, Value = chkQ1A3.Checked ? "1" : "0"
            });

            PatientQuestion q4 = new PatientQuestion();

            q4.ID = 1;
            q4.Answer.Add(new PatientAnswer()
            {
                ID = 6, Value = chkQ1A4.Checked ? "1" : "0"
            });

            PatientQuestion q5 = new PatientQuestion();

            q5.ID = 1;
            q5.Answer.Add(new PatientAnswer()
            {
                ID = 7, Value = chkQ1A5.Checked ? "1" : "0"
            });

            /////////////////////////////

            PatientQuestion q6 = new PatientQuestion();

            q6.ID = 2;
            q6.Answer.Add(new PatientAnswer()
            {
                ID = 8, Value = dateOFConsent
            });

            PatientQuestion q7 = new PatientQuestion();

            q7.ID = 3;
            q7.Answer.Add(new PatientAnswer()
            {
                ID = 9, Value = lastName
            });

            PatientQuestion q8 = new PatientQuestion();

            q8.ID = 4;
            q8.Answer.Add(new PatientAnswer()
            {
                ID = 10, Value = firstName
            });

            PatientQuestion q9 = new PatientQuestion();

            q9.ID = 5;
            q9.Answer.Add(new PatientAnswer()
            {
                ID = 11, Value = dob
            });

            PatientQuestion q10 = new PatientQuestion();

            q10.ID = 6;
            q10.Answer.Add(new PatientAnswer()
            {
                ID = 12, Value = phone
            });

            PatientQuestion q11 = new PatientQuestion();

            q11.ID = 7;
            q11.Answer.Add(new PatientAnswer()
            {
                ID = 13, Value = inclCriteria ? "1" : "0"
            });

            PatientQuestion q12 = new PatientQuestion();

            q12.ID = 8;
            q12.Answer.Add(new PatientAnswer()
            {
                ID = 14, Value = excCriteria ? "1" : "0"
            });


            lstAnswers.Add(q1);
            lstAnswers.Add(q2);
            lstAnswers.Add(q3);
            lstAnswers.Add(q4);
            lstAnswers.Add(q5);
            lstAnswers.Add(q6);
            lstAnswers.Add(q7);
            lstAnswers.Add(q8);
            lstAnswers.Add(q9);
            lstAnswers.Add(q10);
            lstAnswers.Add(q11);
            lstAnswers.Add(q12);

            visRepos.SaveVisit1Screen1(patientID, lstAnswers);
        }
Beispiel #4
0
        public ActionResult V1P1
        (
            V1P1 data,
            bool chkHighRisk1 = false,
            bool chkHighRisk2 = false,
            bool chkHighRisk3 = false,
            bool chkHighRisk4 = false,
            bool chkHighRisk5 = false
        )
        {
            data.HighRisk_1 = chkHighRisk1;
            data.HighRisk_2 = chkHighRisk2;
            data.HighRisk_3 = chkHighRisk3;
            data.HighRisk_4 = chkHighRisk4;
            data.HighRisk_5 = chkHighRisk5;


            if (
                !chkHighRisk1 &&
                !chkHighRisk2 &&
                !chkHighRisk3 &&
                !chkHighRisk4 &&
                !chkHighRisk5
                )
            {
                ModelState.AddModelError(string.Empty, "Please select at least one Highrisk option");
            }

            if (ModelState.IsValid)
            {
                string dateOFConsent = data.DateOfConsent.Value.ToShortDateString();
                string lastName      = data.LastName;
                string firstName     = data.FirstName;
                string dob           = data.DOB.Value.ToShortDateString();
                string phone         = data.Phone;

                bool inclCriteria = true;
                bool excCriteria  = true;

                List <PatientQuestion> lstAnswers = new List <PatientQuestion>();

                PatientQuestion q1 = new PatientQuestion();
                q1.ID = 1;
                q1.Answer.Add(new PatientAnswer()
                {
                    ID = 1, Value = chkHighRisk1 ? "1" : "0"
                });

                PatientQuestion q2 = new PatientQuestion();
                q2.ID = 1;
                q2.Answer.Add(new PatientAnswer()
                {
                    ID = 4, Value = chkHighRisk2 ? "1" : "0"
                });

                PatientQuestion q3 = new PatientQuestion();
                q3.ID = 1;
                q3.Answer.Add(new PatientAnswer()
                {
                    ID = 5, Value = chkHighRisk3 ? "1" : "0"
                });

                PatientQuestion q4 = new PatientQuestion();
                q4.ID = 1;
                q4.Answer.Add(new PatientAnswer()
                {
                    ID = 6, Value = chkHighRisk4 ? "1" : "0"
                });

                PatientQuestion q5 = new PatientQuestion();
                q5.ID = 1;
                q5.Answer.Add(new PatientAnswer()
                {
                    ID = 7, Value = chkHighRisk5 ? "1" : "0"
                });

                /////////////////////////////

                PatientQuestion q6 = new PatientQuestion();
                q6.ID = 2;
                q6.Answer.Add(new PatientAnswer()
                {
                    ID = 8, Value = dateOFConsent
                });

                PatientQuestion q7 = new PatientQuestion();
                q7.ID = 3;
                q7.Answer.Add(new PatientAnswer()
                {
                    ID = 9, Value = lastName
                });

                PatientQuestion q8 = new PatientQuestion();
                q8.ID = 4;
                q8.Answer.Add(new PatientAnswer()
                {
                    ID = 10, Value = firstName
                });

                PatientQuestion q9 = new PatientQuestion();
                q9.ID = 5;
                q9.Answer.Add(new PatientAnswer()
                {
                    ID = 11, Value = dob
                });

                PatientQuestion q10 = new PatientQuestion();
                q10.ID = 6;
                q10.Answer.Add(new PatientAnswer()
                {
                    ID = 12, Value = phone
                });

                PatientQuestion q11 = new PatientQuestion();
                q11.ID = 7;
                q11.Answer.Add(new PatientAnswer()
                {
                    ID = 13, Value = inclCriteria ? "1" : "0"
                });

                PatientQuestion q12 = new PatientQuestion();
                q12.ID = 8;
                q12.Answer.Add(new PatientAnswer()
                {
                    ID = 14, Value = excCriteria ? "1" : "0"
                });


                lstAnswers.Add(q1);
                lstAnswers.Add(q2);
                lstAnswers.Add(q3);
                lstAnswers.Add(q4);
                lstAnswers.Add(q5);
                lstAnswers.Add(q6);
                lstAnswers.Add(q7);
                lstAnswers.Add(q8);
                lstAnswers.Add(q9);
                lstAnswers.Add(q10);
                lstAnswers.Add(q11);
                lstAnswers.Add(q12);

                visRepos.SaveVisit1Screen1(patientID, lstAnswers);
            }

            return(View(data));
        }
Beispiel #5
0
        private void SaveData()
        {
            List <PatientQuestion> lstAnswers = new List <PatientQuestion>();

            string recentDate = this.txtMostRecentLabDate.Text;
            string ast        = this.txtAST.Text;
            string alkPhos    = this.txtALKPhotos.Text;
            string Creatinine = this.txtCreatinine.Text;
            string eGFR       = this.txteGFR.Text;
            string acr        = this.txtACR.Text;
            //string eGFR = this.txteGFR.Text + "." + this.txteGFR2.Text;
            //string acr = this.txtACR.Text + "." + this.txtACR2.Text;


            PatientQuestion q1 = new PatientQuestion();

            q1.ID = 21;
            q1.Answer.Add(new PatientAnswer()
            {
                ID = 61, Value = recentDate
            });

            PatientQuestion q2 = new PatientQuestion();

            q2.ID = 22;
            q2.Answer.Add(new PatientAnswer()
            {
                ID = 62, Value = ast
            });

            PatientQuestion q3 = new PatientQuestion();

            q3.ID = 23;
            q3.Answer.Add(new PatientAnswer()
            {
                ID = 63, Value = alkPhos
            });

            PatientQuestion q4 = new PatientQuestion();

            q4.ID = 24;
            q4.Answer.Add(new PatientAnswer()
            {
                ID = 64, Value = Creatinine
            });

            PatientQuestion q5 = new PatientQuestion();

            q5.ID = 25;
            q5.Answer.Add(new PatientAnswer()
            {
                ID = 65, Value = eGFR
            });

            PatientQuestion q6 = new PatientQuestion();

            q6.ID = 26;
            q6.Answer.Add(new PatientAnswer()
            {
                ID = 66, Value = acr
            });

            lstAnswers.Add(q1);
            lstAnswers.Add(q2);
            lstAnswers.Add(q3);
            lstAnswers.Add(q4);
            lstAnswers.Add(q5);
            lstAnswers.Add(q6);

            visRepos.SaveVisit1Screen3(patientID, lstAnswers);
        }