Beispiel #1
0
        private void BindingModel()
        {
            this.hpyBaseInfo = new ChronicHypertensionBaseInfoBLL().GetModel(this.Model.IDCardNo);

            if (this.hpyBaseInfo == null)
            {
                ChronicHypertensionBaseInfoModel cd_Hypertension_baseinfo = new ChronicHypertensionBaseInfoModel {
                    IDCardNo   = this.Model.IDCardNo,
                    RecordID   = this.Model.RecordID,
                    Hypotensor = "1"
                };
                this.hpyBaseInfo = cd_Hypertension_baseinfo;
                this.hpyBaseInfo.ManagementGroup = "1";
                this.hpyBaseInfo.CaseOurce       = "1";
                this.hpyBaseInfo.CreateUnit      = new decimal?(ConfigHelper.GetNodeDec("orgCode"));
                this.hpyBaseInfo.CreateoBy       = new decimal?(ConfigHelper.GetNodeDec("doctor"));
                this.hpyBaseInfo.CreatedDate     = new DateTime?(DateTime.Today);
            }
            else
            {
                this.hpyBaseInfo.LastUpdateBy   = new decimal?(ConfigHelper.GetNodeDec("doctor"));
                this.hpyBaseInfo.LastUpdateDate = new DateTime?(DateTime.Today);
            }
            this.hpyBaseInfo.CurrentUnit = new decimal?(ConfigHelper.GetNodeDec("orgCode"));
            this.SimpleBinding(this.cbxManagerGroup, this.hpyBaseInfo, "ManagementGroup");
            this.SimpleBinding(this.cbxFromWhere, this.hpyBaseInfo, "CaseOurce");
            this.SimpleBinding(this.cbxStopResult, this.hpyBaseInfo, "TerminateExcuse");
            this.famHistory = new ManyCheckboxs <ChronicHypertensionBaseInfoModel>(this.hpyBaseInfo);
            this.famHistory.AddCk(new LoneCheckbox[] { new LoneCheckbox(this.ck1), new LoneCheckbox(this.ck2), new LoneCheckbox(this.ck3), new LoneCheckbox(this.ck4), new LoneCheckbox(this.ck5, true), new LoneCheckbox(this.ck6, true), new LoneCheckbox(this.ck7, true) });
            this.famHistory.BindingProperty("FatherHistory", "");
            CMoreChange change = new CMoreChange {
                Name       = "目前症状",
                MoreChange = this.cklSymptom,
                Unusual    = "无症状"
            };

            this.symptom = change;
            this.symptom.TransInfo(this.hpyBaseInfo.Symptom, "");
            CMoreChange change2 = new CMoreChange {
                Name       = "并发症",
                MoreChange = this.cklTogetherSymptom,
                Unusual    = "无任何并发症"
            };

            this.together = change2;
            this.together.TransInfo(this.hpyBaseInfo.HypertensionComplication, "");
            if (this.hpyBaseInfo.TerminateManagemen == "1")
            {
                this.ckxStopManager.Checked = true;
                this.cbxStopResult.Enabled  = true;
            }
            else if (this.hpyBaseInfo.TerminateManagemen == "2")
            {
                this.cbxStopResult.Enabled = false;
                this.dtpStopDate.Enabled   = false;
            }
            if (this.hpyBaseInfo.TerminateTime.HasValue)
            {
                this.dtpStopDate.Value = this.hpyBaseInfo.TerminateTime.Value;
            }
            if (this.hpyBaseInfo.Hypotensor == "1")
            {
                this.rdYes.Checked = true;
            }
            else
            {
                this.rdNo.Checked = true;
            }
        }
        public void InitEveryThing()
        {
            this.AExamModel = new HealthAssessExamBLL().GetModel(HealthAssessFactory.ID);
            if (this.AExamModel == null)
            {
                this.AExamModel = new HealthAssessExamModel {
                    IDCardNo = this.Model.IDCardNo
                };
            }

            // 获取病人是否有健康指导
            HealthHouseModel     houseModel = new HealthHouseBLL().GetMaxData(this.Model.IDCardNo);
            RecordsBaseInfoModel baseInfo   = new RecordsBaseInfoBLL().GetModel(this.Model.IDCardNo); // 体检人基本信息

            this.lbName.Text = baseInfo.CustomerName;
            this.lbData.Text = houseModel.CheckDate.Value.ToString("yyyy-MM-dd");
            this.lblAge.Text = timeParser.GetAge(baseInfo.Birthday);
            this.lblSex.Text = StringPlus.GetSex(baseInfo.Sex);

            CMoreChange change = new CMoreChange
            {
                MoreChange    = this.cbFamilySick,
                Name          = "家庭疾病史",
                Unusual       = "无",
                Other         = this.tbFamilySick,
                MaxBytesCount = 200
            };

            this.jzjbs = change;
            this.jzjbs.TransInfo(this.AExamModel.FamilyHistory, this.AExamModel.FamilyOther);
            CMoreChange change1 = new CMoreChange
            {
                MoreChange    = this.cbSick,
                Name          = "疾病史",
                Unusual       = "无",
                Other         = this.tbcbSick,
                MaxBytesCount = 200
            };

            this.jbs = change1;
            this.jbs.TransInfo(this.AExamModel.MedicalHistory, this.AExamModel.MedicalOther);
            CMoreChange change3 = new CMoreChange
            {
                MoreChange    = this.cbdlfs,
                Name          = "锻炼方式",
                Other         = this.tbdlfs,
                MaxBytesCount = 200
            };

            this.dlfs = change3;
            this.dlfs.TransInfo(this.AExamModel.ExerciseExistense, this.AExamModel.ExerciseExistenseOther);

            this.bindingManager = new SimpleBindingManager <HealthAssessExamModel>(this.inputRanges, this.inputrange_str,
                                                                                   this.AExamModel);
            this.bindingManager.SimpleBinding(this.txtMint, "ExerciseTimes", true);
            this.bindingManager.SimpleBinding(this.tbScore, "GloomyScore", true);
            this.bindingManager.SimpleBinding(this.tbDietOther, "DietaryOther", false);

            SetCom(this.cbDietCout, this.AExamModel.DietaryNum);
            SetCom(this.cbDietRe, this.AExamModel.DietaryLaw);
            SetCom(this.cmbduanlianpinlv, this.AExamModel.ExerciseRate);
            SetCom(this.cbzys, this.AExamModel.HospitalHistory);
            SetCom(this.cbfy, this.AExamModel.TakingMedicine);
            SetCom(this.cmbzilinengli, this.AExamModel.OldSelfCareability);

            this.TransHabit();//饮食习惯

            if (this.Model.PopulationType.Contains("4"))
            {
                this.gpOld.Enabled = true;
            }
            else
            {
                this.gpOld.Enabled = false;
            }

            //老年人自理能力
            this.HSelfModel     = new HealthSelfCareabilityBLL().GetModel(this.AExamModel.PID);
            this.EveryThingIsOk = true;
        }