Exemplo n.º 1
0
 public BarthelIndexForm(int _recordID, PatientRecordDetail _barthelRecord)
 {
     InitializeComponent();
     recordID      = _recordID;
     barthelRecord = _barthelRecord;
     getData();
 }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            FormPatientRecord.BarthelIndexValue  = Convert.ToInt16(lblTotal.Text);
            FormPatientRecord.BarthelIndexDetail = lblTotalDetail.Text;

            PatientRecordDetail PRD = new PatientRecordDetail();

            PRD.Feeding  = Convert.ToInt16(label1.Text);
            PRD.Transfer = Convert.ToInt16(label2.Text);
            PRD.Grooming = Convert.ToInt16(label3.Text);
            PRD.Toilet__ = Convert.ToInt16(label4.Text);
            PRD.Bathing  = Convert.ToInt16(label5.Text);
            PRD.Mobility = Convert.ToInt16(label6.Text);
            PRD.Stair    = Convert.ToInt16(label7.Text);
            PRD.Dressing = Convert.ToInt16(label8.Text);
            PRD.Bowels   = Convert.ToInt16(label9.Text);
            PRD.Bladder  = Convert.ToInt16(label10.Text);
            FormPatientRecord.barthelRecord = PRD;
            this.Close();
        }
Exemplo n.º 3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (valid())
            {
                return;
            }
            PatientRecord patientRecord = (from tb in db.PatientRecords
                                           where tb.recordID == recordID
                                           select tb).SingleOrDefault();

            if (patientRecord == null)
            {
                patientRecord = new PatientRecord();
                db.PatientRecords.InsertOnSubmit(patientRecord);

                patientRecord.CreateDate = DateTime.Now;
            }

            patientRecord.HN         = HN;
            patientRecord.recordDate = recordDate.Value;
            if (txteGFR.Text.Trim() != string.Empty)
            {
                patientRecord.eGFR = Convert.ToDecimal(txteGFR.Text);
            }
            if (txtCreatinine.Text.Trim() != string.Empty)
            {
                patientRecord.Creatinine = Convert.ToDecimal(txtCreatinine.Text);
            }
            if (txtWeight.Text.Trim() != string.Empty)
            {
                patientRecord.weight = Convert.ToDecimal(txtWeight.Text);
            }
            if (txtHeight.Text.Trim() != string.Empty)
            {
                patientRecord.height = Convert.ToDecimal(txtHeight.Text);
            }
            //การได้รับการรักษา
            patientRecord.treatNone  = cbTreatNone.Checked;
            patientRecord.treatBelly = cbTreatBelly.Checked;
            patientRecord.treatNeck  = cbTreatNeck.Checked;
            patientRecord.treatArm   = cbTreatArm.Checked;
            //การออกกำลังกายที่บ้าน
            patientRecord.exWalk    = cbExwalk.Checked;
            patientRecord.exRun     = cbExRun.Checked;
            patientRecord.exBite    = cbExBite.Checked;
            patientRecord.exProgram = cbExProgram.Checked;
            patientRecord.exReject  = cbExReject.Checked;
            //สุขศึกษา
            patientRecord.healtEducation = cbHealtEducation.Checked;
            patientRecord.healtBenefit   = cbHealBenefit.Checked;
            //โปรแกรมการออกกำลังกาย
            patientRecord.programEx1 = cbProgrameEx1.Checked;
            patientRecord.programEx2 = cbProgrameEx2.Checked;
            //การประเมิน
            if (txtEst1.Text.Trim() != string.Empty)
            {
                patientRecord.estimate1 = Convert.ToDecimal(txtEst1.Text);
            }
            if (txtEst2.Text.Trim() != string.Empty)
            {
                patientRecord.estimate2 = Convert.ToDecimal(txtEst2.Text);
            }
            if (txtEst3.Text.Trim() != string.Empty)
            {
                patientRecord.estimate3 = Convert.ToDecimal(txtEst3.Text);
            }
            if (txtEst4.Text.Trim() != string.Empty)
            {
                patientRecord.estimate4 = Convert.ToDecimal(txtEst4.Text);
            }
            if (txtEst5.Text.Trim() != string.Empty)
            {
                patientRecord.estimate5 = Convert.ToDecimal(txtEst5.Text);
            }
            if (txtEst6.Text.Trim() != string.Empty)
            {
                patientRecord.estimate6 = Convert.ToDecimal(txtEst6.Text);
            }
            //Barthel Index
            patientRecord.BarthelIndex = BarthelIndexValue;
            //Transfer
            patientRecord.Transfer = Convert.ToInt16(cbbTransfer.SelectedValue);
            //Bed Mobility
            patientRecord.BedMobility = Convert.ToInt16(cbbBedMobility.SelectedValue);
            //Balance
            patientRecord.Balance = Convert.ToInt16(cbbBalance.SelectedValue);
            //Ambulate
            patientRecord.Ambulate = Convert.ToInt16(cbbAmbulateWith.SelectedValue);
            //MMT
            patientRecord.MMTRightUE = Convert.ToInt16(cbbMMTRUE.SelectedValue);
            patientRecord.MMTRightLE = Convert.ToInt16(cbbMMTRLE.SelectedValue);
            patientRecord.MMTLeftUE  = Convert.ToInt16(cbbMMTLUE.SelectedValue);
            patientRecord.MMTLeftLE  = Convert.ToInt16(cbbMMTLLE.SelectedValue);

            patientRecord.Tired = cbtired.Checked;
            patientRecord.Pain  = txtPain.Text.Trim();
            patientRecord.Edema = txtEdema.Text.Trim();
            patientRecord.Other = txtOther.Text.Trim();

            if (txtKnowlege.Text.Trim() != string.Empty)
            {
                patientRecord.Knowlege = Convert.ToInt16(txtKnowlege.Text);
            }
            if (txtExcercise.Text.Trim() != string.Empty)
            {
                patientRecord.excercise = Convert.ToInt16(txtExcercise.Text);
            }

            patientRecord.ModifiedDate = DateTime.Now;

            db.SubmitChanges();

            if (barthelRecord != null)
            {
                PatientRecordDetail barThel = (from tb in db.PatientRecordDetails
                                               where tb.recordID == patientRecord.recordID
                                               select tb).SingleOrDefault();
                if (barThel == null)
                {
                    barThel = new PatientRecordDetail();
                    db.PatientRecordDetails.InsertOnSubmit(barThel);
                    barThel.CreateDate = DateTime.Now;
                }
                barThel.recordID     = patientRecord.recordID;
                barThel.Feeding      = barthelRecord.Feeding;
                barThel.Transfer     = barthelRecord.Transfer;
                barThel.Grooming     = barthelRecord.Grooming;
                barThel.Toilet__     = barthelRecord.Toilet__;
                barThel.Bathing      = barthelRecord.Bathing;
                barThel.Mobility     = barthelRecord.Mobility;
                barThel.Stair        = barthelRecord.Stair;
                barThel.Dressing     = barthelRecord.Dressing;
                barThel.Bowels       = barthelRecord.Bowels;
                barThel.Bladder      = barthelRecord.Bladder;
                barThel.ModifiedDate = DateTime.Now;

                db.SubmitChanges();
            }
            MessageBox.Show("บันทึกเสร็จสิ้น");
            this.Close();
        }
Exemplo n.º 4
0
        private void getData()
        {
            PatientRecordDetail PRD = new PatientRecordDetail();

            if (barthelRecord != null)
            {
                PRD = barthelRecord;
            }
            else
            {
                PRD = (from tb in db.PatientRecordDetails
                       where tb.recordID == recordID
                       select tb).SingleOrDefault();
            }
            if (PRD != null)
            {
                //1.Feeding
                if (PRD.Feeding == 1)
                {
                    rdb11.Checked = true;
                }
                else if (PRD.Feeding == 2)
                {
                    rdb12.Checked = true;
                }
                else
                {
                    rdb10.Checked = true;
                }
                //2.Transfer
                if (PRD.Transfer == 1)
                {
                    rdb21.Checked = true;
                }
                else if (PRD.Transfer == 2)
                {
                    rdb22.Checked = true;
                }
                else if (PRD.Transfer == 3)
                {
                    rdb23.Checked = true;
                }
                else
                {
                    rdb30.Checked = true;
                }
                //3.Grooming
                if (PRD.Grooming == 1)
                {
                    rdb31.Checked = true;
                }
                else
                {
                    rdb30.Checked = true;
                }
                //4.Toilet
                if (PRD.Toilet__ == 1)
                {
                    rdb41.Checked = true;
                }
                else if (PRD.Toilet__ == 2)
                {
                    rdb42.Checked = true;
                }
                else
                {
                    rdb40.Checked = true;
                }
                //5.Bathing
                if (PRD.Bathing == 1)
                {
                    rdb51.Checked = true;
                }
                else
                {
                    rdb50.Checked = true;
                }
                //6.Mobility
                if (PRD.Mobility == 1)
                {
                    rdb61.Checked = true;
                }
                else if (PRD.Mobility == 2)
                {
                    rdb62.Checked = true;
                }
                else if (PRD.Mobility == 3)
                {
                    rdb63.Checked = true;
                }
                else
                {
                    rdb60.Checked = true;
                }
                //7.Stair
                if (PRD.Stair == 1)
                {
                    rdb71.Checked = true;
                }
                else if (PRD.Stair == 2)
                {
                    rdb72.Checked = true;
                }
                else
                {
                    rdb70.Checked = true;
                }
                //8.Dressing
                if (PRD.Dressing == 1)
                {
                    rdb81.Checked = true;
                }
                else if (PRD.Dressing == 2)
                {
                    rdb82.Checked = true;
                }
                else
                {
                    rdb80.Checked = true;
                }
                //9.Bowels
                if (PRD.Bowels == 1)
                {
                    rdb91.Checked = true;
                }
                else if (PRD.Bowels == 2)
                {
                    rdb92.Checked = true;
                }
                else
                {
                    rdb90.Checked = true;
                }
                //10.Bladder
                if (PRD.Bladder == 1)
                {
                    rdb101.Checked = true;
                }
                else if (PRD.Bladder == 2)
                {
                    rdb102.Checked = true;
                }
                else
                {
                    rdb100.Checked = true;
                }
            }
        }