public bool hasData() { if (!string.IsNullOrEmpty(this.CardID)) { DataSet list = new ChronicDiadetesVisitBLL().GetList(" IDCardNo='" + this.CardID + "'"); if (list != null && list.Tables.Count > 0 && list.Tables[0].Rows.Count > 0) { return(true); } } return(false); }
private void DiaPictureBox_Click(object sender, EventArgs e) //糖尿病随访 { if (string.IsNullOrEmpty(this.IDCardNo)) { new MessageForm("请先刷身份证或输入身份证登录系统!") { StartPosition = FormStartPosition.CenterParent }.ShowDialog(); return; } if (this.Restriction == "on") { if (new RecordsBaseInfoBLL().GetModel(this.IDCardNo).PopulationType.Contains("7")) { DataSet DiaData = new ChronicDiadetesVisitBLL().GetList(string.Format(" IDCardNo='{0}' and VisitDate between '{1}' and '{2}' order by VisitDate Desc ", this.IDCardNo, DateTime.Today.ToString("yyyy-01-01"), DateTime.Today.Date.ToString("yyyy-12-31"))); if (DiaData.Tables[0].Rows.Count > 0) { DataRow row = DiaData.Tables[0].Rows[0]; string strchekdate = DateTime.Parse(row["VisitDate"].ToString()).ToString("yyyy-MM-dd"); if (MessageBox.Show("此人于'" + strchekdate + "'已随访,是否继续随访", "继续随访", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No) { return; } } //新增标志 DiaFactory.ID = 0; using (Controler controler = new Controler(new DiaParentForm(this.IDCardNo), new DiaFactory())) { controler.IParentFrm.IShowDialog(); return; } } MessageBox.Show("非糖尿病人群,不能进入!", "随访人群", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { using (Controler controler2 = new Controler(new MDIParentForm(this.IDCardNo), new DiaFactory())) { controler2.IParentFrm.IShowDialog(); } } }
public FixedDocumentSequence getReport() { List <ListValue> list = null; if (!string.IsNullOrEmpty(this.CardID)) { RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.CardID); list = new List <ListValue> { new ListValue { strMark = "$archiveid", strVal = model.RecordID }, new ListValue { strMark = "$name", strVal = model.CustomerName } }; int Year = DateTime.Now.Year; string strWhere = string.Format("IDCardNo='{0}'order by VisitDate desc limit 0,4 ", this.CardID); List <ChronicDiadetesVisitModel> model1 = new ChronicDiadetesVisitBLL().GetModelList(strWhere); int count = model1.Count; foreach (ChronicDiadetesVisitModel model2 in model1) { list.Add(new ListValue { strMark = "$zsx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.StapleFooddailygTarget) }); list.Add(new ListValue { strMark = "$sfrq" + count.ToString(), strVal = DrawItems.strToDate(model2.VisitDate) }); list.Add(new ListValue { strMark = "$xcsfsj" + count.ToString(), strVal = DrawItems.strToDate(model2.NextVisitDate) }); list.Add(new ListValue { strMark = "#zz" + count.ToString(), strVal = model2.Symptom }); list.Add(new ListValue { strMark = "%zzqt" + count.ToString(), strVal = model2.SymptomOther }); list.Add(new ListValue { strMark = "$xgy" + count.ToString(), strVal = DrawItems.objToNumStr(model2.Hypertension) }); list.Add(new ListValue { strMark = "$xdy" + count.ToString(), strVal = DrawItems.objToNumStr(model2.Hypotension) }); list.Add(new ListValue { strMark = "$tz" + count.ToString(), strVal = DrawItems.objToNumStr(model2.Weight) }); list.Add(new ListValue { strMark = "$tzzs" + count.ToString(), strVal = DrawItems.objToNumStr(model2.BMI) }); list.Add(new ListValue { strMark = "#tzzs" + count.ToString(), strVal = Convert.ToString(Convert.ToInt32(model2.DorsalisPedispulse)) }); list.Add(new ListValue { strMark = "$tzqt" + count.ToString(), strVal = model2.PhysicalSymptomMother }); list.Add(new ListValue { strMark = "$rxy" + count.ToString(), strVal = DrawItems.objToNumStr(model2.DailySmokeNum, 0) }); list.Add(new ListValue { strMark = "$ryj" + count.ToString(), strVal = DrawItems.objToNumStr(model2.DailyDrinkNum, 0) }); list.Add(new ListValue { strMark = "$ydz" + count.ToString(), strVal = DrawItems.objToNumStr(model2.SportTimePerWeek, 0) }); list.Add(new ListValue { strMark = "$ydc" + count.ToString(), strVal = DrawItems.objToNumStr(model2.SportPerMinuteTime, 0) }); list.Add(new ListValue { strMark = "$zs" + count.ToString(), strVal = DrawItems.objToNumStr(model2.StapleFooddailyg) }); list.Add(new ListValue { strMark = "#xltz" + count.ToString(), strVal = model2.PsychoAdjustment }); list.Add(new ListValue { strMark = "#zyxw" + count.ToString(), strVal = model2.ObeyDoctorBehavior }); list.Add(new ListValue { strMark = "$kfxt" + count.ToString(), strVal = DrawItems.objToNumStr(model2.FPG) }); list.Add(new ListValue { strMark = "$xh" + count.ToString(), strVal = DrawItems.objToNumStr(model2.HbAlc) }); list.Add(new ListValue { strMark = "$fzrq" + count.ToString(), strVal = DrawItems.strToDate(model2.ExamDate) }); list.Add(new ListValue { strMark = "%fzjcqt" + count.ToString(), strVal = model2.AssistantExam }); list.Add(new ListValue { strMark = "#fyyc" + count.ToString(), strVal = model2.MedicationCompliance }); list.Add(new ListValue { strMark = "#blfy" + count.ToString(), strVal = model2.Adr }); list.Add(new ListValue { strMark = "$fyqt" + count.ToString(), strVal = model2.AdrEx }); list.Add(new ListValue { strMark = "#dxtfy" + count.ToString(), strVal = model2.HypoglyceMiarreAction }); list.Add(new ListValue { strMark = "#sffl" + count.ToString(), strVal = model2.VisitType }); list.Add(new ListValue { strMark = "$ydzl" + count.ToString(), strVal = model2.InsulinType }); list.Add(new ListValue { strMark = "$ydyf" + count.ToString(), strVal = model2.InsulinUsage }); list.Add(new ListValue { strMark = "#sffs" + count.ToString(), strVal = model2.VisitWay }); list.Add(new ListValue { strMark = "$zzyy" + count.ToString(), strVal = model2.ReferralReason }); list.Add(new ListValue { strMark = "$zzjg" + count.ToString(), strVal = model2.ReferralOrg }); list.Add(new ListValue { strMark = "$tzx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.TargetWeight) }); list.Add(new ListValue { strMark = "$tzzsx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.BMITarget) }); list.Add(new ListValue { strMark = "$rxyx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.DailySmokeNumTarget, 0) }); list.Add(new ListValue { strMark = "$ryjx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.DailyDrinkNumTarget, 0) }); list.Add(new ListValue { strMark = "$ydzx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.SportTimePerWeekTarget, 0) }); list.Add(new ListValue { strMark = "$ydcx" + count.ToString(), strVal = DrawItems.objToNumStr(model2.SportPerMinuteTimeTarget, 0) }); if ((int)model2.DorsalisPedispulse.Value == 2) { list.AddRange(DrawItems.lsCheck(DrawItems.objToStr(model2.DorsalisPedispulseType), "jr" + count.ToString(), 3)); } else if ((int)model2.DorsalisPedispulse.Value == 3) { list.AddRange(DrawItems.lsCheck(DrawItems.objToStr(model2.DorsalisPedispulseType), "xs" + count.ToString(), 3)); } list.Add(new ListValue { strMark = "#xbcs" + count.ToString(), strVal = model2.NextMeasures }); list.Add(new ListValue { strMark = "$zzlx" + count.ToString(), strVal = model2.ReferralContacts }); list.Add(new ListValue { strMark = "#zzjg" + count.ToString(), strVal = model2.ReferralResult }); list.Add(new ListValue { strMark = "$bz" + count.ToString(), strVal = model2.Remarks }); list.Add(new ListValue { strMark = "$ydtzzl" + count.ToString(), strVal = model2.InsulinAdjustType }); list.Add(new ListValue { strMark = "$ydtzyf" + count.ToString(), strVal = model2.InsulinAdjustUsage }); //滕州无签字版 list.Add(new ListValue { strMark = "$qm" + count.ToString(), strVal = model.CustomerName }); list.Add(new ListValue { strMark = "$sfys" + count.ToString(), strVal = model2.VisitDoctor }); list.Add(new ListValue { strMark = "&qm" + count.ToString(), strVal = string.Format("{0}{1}_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model2.VisitDate).ToString("yyyyMMdd")) }); list.Add(new ListValue { strMark = "&sfys" + count.ToString(), strVal = string.Format("{0}{1}_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model2.VisitDate).ToString("yyyyMMdd")) }); List <ChronicDrugConditionModel> modelList = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and TYPE = '{1}' and OUTKey = '" + model2.ID + "' ", this.CardID, "2")); if (modelList != null && modelList.Count > 0) { list.AddRange(this.getDrug(modelList, count, 0).ToArray()); } List <ChronicDrugConditionModel> modelListTZ = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and TYPE = '{1}' and OUTKey ='" + model2.ID + "' ", this.CardID, "8"));//用药调整类型为8 if (modelListTZ != null && modelListTZ.Count > 0) { list.AddRange(this.getDrug(modelListTZ, count, 3).ToArray()); } count--; } } return(DrawItems.setPage("printXps\\" + this.PrintName, list)); }
public void InitEveryThing() { dsRequire = new RequireBLL().GetList("TabName = '健康体检' AND Comment = '治疗情况' "); this.HospitalHistory = new RecordsHospitalHistoryBLL().GetModelList(string.Format("IDCardNo = '{0}' and OutKey={1}", this.Model.IDCardNo, PhysicalInfoFactory.ID)); this.FamilyBedHistoryInfo = new RecordsFamilyBedHistoryBLL().GetModelList(string.Format("IDCardNo = '{0}' and OutKey={1}", this.Model.IDCardNo, PhysicalInfoFactory.ID)); this.Medication = new RecordsMedicationBLL().GetModelList(string.Format("IDCardNo = '{0}' and OutKey={1}", this.Model.IDCardNo, PhysicalInfoFactory.ID)); this.Perzhuyuans = new List <ZhuYuanUserControl> { this.zhuYuan1, this.zhuYuan2 }; this.FamZhuyuans = new List <ZhuYuanUserControl> { this.homezhuYuan1, this.homezhuYuan2 }; //新增体检时,从设备中读取的栏位设置为空 if (PhysicalInfoFactory.falgID == 0) { if (area.Equals("威海")) { this.Medication = new List <RecordsMedicationModel>(); } this.PresetValue(); if (community.Equals("平度云山医院") || area.Equals("威海"))//平度云山医院、威海,从高血压,糖尿病随访中获取用药 { string strYear = DateTime.Now.Year.ToString(); string strHypeWhere = string.Format(" Left(FollowUpDate,4)='{0}' and IDCardNo='{1}' order by FollowUpDate desc ", strYear, this.Model.IDCardNo); List <ChronicHypertensionVisitModel> HyperModellist = new ChronicHypertensionVisitBLL().GetModelList(strHypeWhere); if (HyperModellist.Count > 0) { List <ChronicDrugConditionModel> DrugConditions = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and type = '{1}' and OUTKey = '{2}' ", HyperModellist[0].IDCardNo, "1", HyperModellist[0].ID)); foreach (ChronicDrugConditionModel drugmodel in DrugConditions) { RecordsMedicationModel newModel = new RecordsMedicationModel { MedicinalName = drugmodel.Name, UseNum = drugmodel.DosAge, IDCardNo = this.Model.IDCardNo }; this.Medication.Add(newModel); } } string strDiaWhere = string.Format(" Left(VisitDate,4)='{0}'and IDCardNo='{1}' order by VisitDate desc ", strYear, this.Model.IDCardNo); List <ChronicDiadetesVisitModel> DiamodelList = new ChronicDiadetesVisitBLL().GetModelList(strDiaWhere); if (DiamodelList.Count > 0) { List <ChronicDrugConditionModel> DiaDrugConditions = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and type = '{1}' and OUTKey = '{2}' ", DiamodelList[0].IDCardNo, "2", DiamodelList[0].ID)); foreach (ChronicDrugConditionModel drugmodel in DiaDrugConditions) { RecordsMedicationModel newModel = new RecordsMedicationModel { MedicinalName = drugmodel.Name, UseNum = drugmodel.DosAge, IDCardNo = this.Model.IDCardNo }; this.Medication.Add(newModel); } } } } for (int i = 0; i < this.HospitalHistory.Count; i++) { this.Perzhuyuans[i].PerSource = this.HospitalHistory[i]; } for (int j = 0; j < this.FamilyBedHistoryInfo.Count; j++) { this.FamZhuyuans[j].FamSource = this.FamilyBedHistoryInfo[j]; } if (this.FamilyBedHistoryInfo.Count > 0) { this.homezhuYuan1.FamSource = this.FamilyBedHistoryInfo[0]; if (this.FamilyBedHistoryInfo.Count == 2) { this.homezhuYuan2.FamSource = this.FamilyBedHistoryInfo[1]; } } //读取用药情况 if (File.Exists(Application.StartupPath + "\\dose.xml")) { DataSet ds = new DataSet(); ds.ReadXml(Application.StartupPath + "\\dose.xml"); DataTable dt_yw = ds.Tables[0]; doseUC1.setSource(dt_yw); doseUC2.setSource(DeepCopy(dt_yw)); doseUC3.setSource(DeepCopy(dt_yw)); doseUC4.setSource(DeepCopy(dt_yw)); doseUC5.setSource(DeepCopy(dt_yw)); doseUC6.setSource(DeepCopy(dt_yw)); } for (int k = 0; k < this.doses.Count; k++) { if (k < this.Medication.Count) { this.doses[k].Source = this.Medication[k]; } else { RecordsMedicationModel recordsMedicationModel = new RecordsMedicationModel { IDCardNo = this.Model.IDCardNo, ModelState = RecordsStateModel.NoValue }; this.doses[k].Source = recordsMedicationModel; } } this.EveryThingIsOk = true; MustChoose(); }