Beispiel #1
0
 public bool hasData()
 {
     if (!string.IsNullOrEmpty(this.CardID))
     {
         DataSet list = new ChronicHypertensionVisitBLL().GetList(" IDCardNo='" + this.CardID + "'");
         if (list != null && list.Tables.Count > 0 && list.Tables[0].Rows.Count > 0)
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
        private void HypPictureBox_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("6"))
                {
                    DataSet HypData = new ChronicHypertensionVisitBLL().GetList(string.Format(" IDCardNo='{0}' and FollowUpDate between '{1}' and '{2}' order by FollowUpDate Desc ", this.IDCardNo, DateTime.Today.ToString("yyyy-01-01"), DateTime.Today.Date.ToString("yyyy-12-31")));
                    if (HypData.Tables[0].Rows.Count > 0)
                    {
                        DataRow row         = HypData.Tables[0].Rows[0];
                        string  strchekdate = DateTime.Parse(row["FollowUpDate"].ToString()).ToString("yyyy-MM-dd");
                        if (MessageBox.Show("此人于'" + strchekdate + "'已随访,是否继续随访", "继续随访", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
                        {
                            return;
                        }
                    }
                    //新增标志
                    HypFactory.ID = 0;
                    using (Controler controler = new Controler(new HyperParentForm(this.IDCardNo), new HypFactory()))
                    {
                        controler.IParentFrm.IShowDialog();
                        return;
                    }
                }

                MessageBox.Show("非高血压人群,不能进入!", "随访人群", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                using (Controler controler2 = new Controler(new HyperParentForm(this.IDCardNo), new HypFactory()))
                {
                    controler2.IParentFrm.IShowDialog();
                }
            }
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        public FixedDocumentSequence getReport()
        {
            List <ListValue> list = new List <ListValue>();

            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 FollowUpDate desc limit 0,4 ", this.CardID);
                List <ChronicHypertensionVisitModel> model1 = new ChronicHypertensionVisitBLL().GetModelList(strWhere);
                int count = model1.Count;
                foreach (ChronicHypertensionVisitModel model2 in model1)
                {
                    list.Add(new ListValue
                    {
                        strMark = "$sfrq" + count.ToString(),
                        strVal  = DrawItems.strToDate(model2.FollowUpDate)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sfys" + count.ToString(),
                        strVal  = model2.FollowUpDoctor
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xcsfsj" + count.ToString(),
                        strVal  = DrawItems.strToDate(model2.NextFollowUpDate)
                    });
                    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, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xdy" + count.ToString(),
                        strVal  = DrawItems.objToNumStr(model2.Hypotension, 0)
                    });
                    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 = "$xl" + count.ToString(),
                        strVal  = DrawItems.objToNumStr(model2.HeartRate, 2)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzqt" + count.ToString(),
                        strVal  = model2.PhysicalSympToMother
                    });
                    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 = "#xltz" + count.ToString(),
                        strVal  = model2.PsyChoadJustMent
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zyxw" + count.ToString(),
                        strVal  = model2.ObeyDoctorBehavior
                    });
                    list.Add(new ListValue
                    {
                        strMark = "%fzjc" + 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 = "$blfyqt" + count.ToString(),
                        strVal  = model2.AdrEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#sffl" + count.ToString(),
                        strVal  = model2.FollowUpType
                    });
                    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 = "#sffs" + count.ToString(),
                        strVal  = model2.FollowUpWay
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzx" + count.ToString(),
                        strVal  = DrawItems.objToNumStr(model2.WeightTarGet)
                    });
                    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.SportTimeSperWeekTarget, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ydcx" + count.ToString(),
                        strVal  = DrawItems.objToNumStr(model2.SportPerMinutesTimeTarget, 0)
                    });
                    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 = "$qm" + count.ToString(),
                        strVal  = model.CustomerName
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ysqm" + count.ToString(),
                        strVal  = model2.FollowUpDoctor
                    });

                    string qm   = string.Format("{0}{1}_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model2.FollowUpDate).ToString("yyyyMMdd"));
                    string ysqm = string.Format("{0}{1}_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model2.FollowUpDate).ToString("yyyyMMdd"));

                    list.Add(new ListValue
                    {
                        strMark = "&qm" + count.ToString(),
                        strVal  = qm
                    });
                    list.Add(new ListValue
                    {
                        strMark = "&ysqm" + count.ToString(),
                        strVal  = ysqm
                    });

                    list.AddRange(DrawItems.lsCheck(model2.EatSaltType, "by" + count.ToString(), 3));
                    list.AddRange(DrawItems.lsCheck(model2.EatSaltTarGet, "xy" + count.ToString(), 3));
                    List <ChronicDrugConditionModel> modelList = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and TYPE = '{1}' and OUTKey ='" + model2.ID + "' ", this.CardID, "1"));
                    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, "7"));//用药调整类型为7
                    if (modelListTZ != null && modelListTZ.Count > 0)
                    {
                        list.AddRange(this.getDrug(modelListTZ, count, 3).ToArray());
                    }

                    count--;
                }
            }
            return(DrawItems.setPage("printXps\\" + this.PrintName, list));
        }