Ejemplo n.º 1
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            DataSet list = new RecordsBaseInfoBLL().GetListDT(this.GetWhere(), " b.CheckDate DESC,b.IDCardNo");

            if (list.Tables.Count == 0)
            {
                MessageBox.Show("统计结果为空!!");
            }
            else if (list.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("统计结果为空!!");
            }
            else
            {
                this.TransDs(list);
                Dictionary <string, string> fgt = new Dictionary <string, string>();
                fgt.Add("CustomerName", "姓名");
                fgt.Add("IDCardNo", "身份证");
                fgt.Add("Sex", "性别");
                fgt.Add("Birthday", "生日");
                fgt.Add("Phone", "电话");
                fgt.Add("HouseHoldAddress", "住址");
                fgt.Add("CreateDate", "建档日期");
                fgt.Add("CheckDate", "体检日期");
                this.DatatableToCSVFile(fgt, list.Tables[0], @"d:\" + string.Format(@"\人员列表{0}.csv", DateTime.Now.ToString("yyyyMMddHHmmss")));
            }
        }
Ejemplo n.º 2
0
        private void ChackDate()
        {
            string where          = this.GetWhere();
            this.btnQuery.Enabled = false;
            if (string.IsNullOrEmpty(where))
            {
                MessageBox.Show("请选择查询条件!", "查询条件", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                this.btnQuery.Enabled = true;
            }
            else
            {
                RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                this.totalCount = archive_baseinfo.GetRecordCount(where);
                this.totalPages = (this.totalCount <= this.pageCount) ? 1 : ((this.totalCount / this.pageCount) +
                                                                             (((this.totalCount % this.pageCount) > 0) ? 1 : 0));
                this.lbTotalCount.Text = string.Format("共计{0}条", this.totalCount.ToString());
                if (this.currentPage > totalPages - 1)
                {
                    this.currentPage--;
                }

                DataSet ds = archive_baseinfo.GetListByPage(where, "", this.currentPage * this.pageCount, this.pageCount);
                this.lbPages.Text = string.Format("{0}/{1}页", this.currentPage + 1, this.totalPages);
                if (ds.Tables.Count > 0)
                {
                    this.TransDs(ds);
                    this.bds.DataSource     = ds.Tables[0];
                    this.dgvData.DataSource = this.bds;
                }
                this.groupBox1.Enabled = false;
                this.btnQuery.Enabled  = true;
                this.btnQuery.Text     = "重置条件";
            }
        }
Ejemplo n.º 3
0
        private void btnSave_Click(object sender, EventArgs e) //保存功能
        {
            RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.IDCardNo);

            if (this.pictureBox1.Image != null)
            {
                string path = @"D:\QCSoft\photos\" + this.IDCardNo + ".jpg";

                if (File.Exists(this.SavePath))
                {
                    if (MessageBox.Show(this.SavePath + "\r\n已经存在,是否覆盖?", "覆盖照片", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                    {
                        File.Delete(this.SavePath);
                        this.pictureBox1.Image.Save(this.SavePath);
                        MessageBox.Show("照片保存至:" + this.SavePath);
                    }
                }
                else
                {
                    this.pictureBox1.Image.Save(this.SavePath);
                    MessageBox.Show("照片保存至:" + this.SavePath);
                }

                // 更新基本信息中的照片路径
                new CommonClassBLL().Update(this.IDCardNo, SavePath);
            }
        }
Ejemplo n.º 4
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            if (this.btnQuery.Text == "重置条件")
            {
                this.groupBox1.Enabled = true;
                this.btnQuery.Text     = "查询";
                txtIdNum.Text          = "";
                tbAddr.Text            = "";
                dtpSt.Text             = "";
                dtpEd.Text             = "";
                dtpCreatedDateSt.Text  = "";
                dtpCreatedDateEd.Text  = "";
            }
            else if (this.ckBirthday.Checked && (this.dtpSt.Value.Date > this.dtpEd.Value.Date))
            {
                MessageBox.Show(" 出生日期:开始日期大于结束日期!", "日期错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else if (this.ckxCreatedDate.Checked && (this.dtpCreatedDateSt.Value.Date > this.dtpCreatedDateEd.Value.Date))
            {
                MessageBox.Show(" 建档日期:开始日期大于结束日期!", "日期错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else
            {
                string where = this.GetWhere();
                RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                DataSet            ds  = archive_baseinfo.GetListDT(where, "");
                DataTable          dtF = new DataTable();
                if (ds.Tables.Count > 0)
                {
                    this.TransDs(ds);
                    dtF   = ds.Tables[0];
                    dtTmp = SetDate(dtF);
                    //this.bds.DataSource = dtTmp;
                    //this.dgvData.DataSource = this.bds;
                }

                this.totalCount        = dtTmp.Rows.Count;
                this.totalPages        = (this.totalCount <= this.pageCount) ? 1 : ((this.totalCount / this.pageCount) + (((this.totalCount % this.pageCount) > 0) ? 1 : 0));
                this.currentPage       = 0;
                this.lbTotalCount.Text = string.Format("共计{0}条", this.totalCount.ToString());
                this.lbPages.Text      = string.Format("{0}/{1}页", this.currentPage + 1, this.totalPages);
                if (ds.Tables.Count > 0)
                {
                    DataTable dtTemp = dtTmp.Clone();
                    int       nextV  = (this.currentPage + 1) * this.pageCount;
                    if (nextV > this.totalCount)
                    {
                        nextV = this.totalCount;
                    }
                    for (int i = (this.currentPage) * this.pageCount; i < nextV; i++)
                    {
                        dtTemp.ImportRow(dtTmp.Rows[i]);
                    }
                    this.bds.DataSource     = dtTemp;
                    this.dgvData.DataSource = this.bds;
                }
                this.groupBox1.Enabled = false;
                this.btnQuery.Text     = "重置条件";
            }
        }
Ejemplo n.º 5
0
 public FixedDocumentSequence getReport()
 {
     if (!string.IsNullOrEmpty(this.CardID))
     {
         RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.CardID);
         List <ListValue>     list  = new List <ListValue>
         {
             new ListValue
             {
                 strMark = "$archiveid",
                 strVal  = model.RecordID
             },
             new ListValue
             {
                 strMark = "$name",
                 strVal  = model.CustomerName
             }
         };
         for (int i = 1; i < 5; i++)
         {
             List <ListValue> list2 = this.getList(i.ToString());
             if (list2 != null)
             {
                 list.AddRange(list2);
             }
         }
         return(DrawItems.setPage("printXps\\13一到二岁儿童健康检查记录表.xps", list));
     }
     return(null);
 }
Ejemplo n.º 6
0
        public DiaParentForm(string idcard)
            : base(idcard)
        {
            RecordBaseInfo = new RecordsBaseInfoBLL().GetModel(this.Model.IDCardNo);


            if (RecordBaseInfo == null)
            {
                RecordBaseInfo = new RecordsBaseInfoModel {
                    IDCardNo = this.Model.IDCardNo
                };
            }

            lklbRequired = new LinkLabel();

            this.lklbRequired.BackColor  = Color.Transparent;
            this.lklbRequired.ForeColor  = Color.Red;
            this.lklbRequired.Font       = new Font("宋体", 15f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
            this.lklbRequired.FlatStyle  = FlatStyle.Flat;
            this.lklbRequired.ImageAlign = ContentAlignment.MiddleRight;
            this.lklbRequired.Location   = new Point(0xd6, 3);
            this.lklbRequired.Padding    = new System.Windows.Forms.Padding(0, 20, 0, 0);
            this.lklbRequired.Name       = "lklbRequired";
            this.lklbRequired.AutoSize   = true;
            this.lklbRequired.TabIndex   = 80;
            this.lklbRequired.Text       = "必填项设置";
            this.lklbRequired.Click     += new EventHandler(this.btnBtx_Click);
            base.flowLayoutPanel1.Controls.Add(this.lklbRequired);
        }
Ejemplo n.º 7
0
        private void btnExportReport_Click(object sender, EventArgs e)
        {
            DataSet list = new RecordsBaseInfoBLL().GetListDT(this.GetWhere(), "");

            if (list.Tables.Count == 0)
            {
                MessageBox.Show("统计结果为空!!");
            }
            else if (list.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("统计结果为空!!");
            }
            else
            {
                this.TransReportDs(list);
                Dictionary <string, string> fgt = new Dictionary <string, string>();
                fgt.Add("No", "序号");
                fgt.Add("CustomerName", "姓名");
                fgt.Add("HouseHoldAddress", "住址");
                fgt.Add("isFloatPop", "是否流动人口");
                fgt.Add("isHousePop", "是否为户籍人口");
                fgt.Add("CheckDate", "签约时间");
                fgt.Add("Phone", "电话号码");
                this.DatatableToCSVFile(fgt, list.Tables[0], @"d:\" + string.Format(@"\人群周报表{0}.csv", DateTime.Now.ToString("yyyyMMddHHmmss")));
            }
        }
 private void btnQuery_Click(object sender, EventArgs e)
 {
     if (this.btnQuery.Text == "重置条件")
     {
         this.groupBox1.Enabled = true;
         this.btnQuery.Text     = "查询";
         txtIdNum.Text          = "";
         tbAddr.Text            = "";
         dtpSt.Text             = "";
         dtpEd.Text             = "";
         dtpCreatedDateSt.Text  = "";
         dtpCreatedDateEd.Text  = "";
     }
     else if (this.ckCheckDate.Checked && (this.dtpSt.Value.Date > this.dtpEd.Value.Date))
     {
         MessageBox.Show(" 体检日期:开始日期大于结束日期!", "日期错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
     else if (this.ckxCreatedDate.Checked && (this.dtpCreatedDateSt.Value.Date > this.dtpCreatedDateEd.Value.Date))
     {
         MessageBox.Show(" 建档日期:开始日期大于结束日期!", "日期错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
     else
     {
         this.btnQuery.Enabled = false;
         string where          = this.GetWhere();
         if (string.IsNullOrEmpty(where))
         {
             MessageBox.Show("请选择查询条件!", "查询条件", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             this.btnQuery.Enabled = true;
         }
         else
         {
             RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
             this.totalCount        = archive_baseinfo.GetRecordCount(where);
             this.totalPages        = (this.totalCount <= this.pageCount) ? 1 : ((this.totalCount / this.pageCount) + (((this.totalCount % this.pageCount) > 0) ? 1 : 0));
             this.currentPage       = 0;
             this.lbTotalCount.Text = string.Format("共计{0}条", this.totalCount.ToString());
             DataSet ds = archive_baseinfo.GetListByPage(where, "B.CheckDate DESC,B.ID ASC", 0, this.pageCount);
             this.lbPages.Text = string.Format("{0}/{1}页", this.currentPage + 1, this.totalPages);
             if (ds.Tables.Count > 0)
             {
                 this.TransDs(ds);
                 this.bds.DataSource     = ds.Tables[0];
                 this.dgvData.DataSource = this.bds;
             }
             else
             {
                 this.dgvData.DataSource = null;
             }
             this.groupBox1.Enabled = false;
             this.btnQuery.Enabled  = true;
             this.btnQuery.Text     = "重置条件";
         }
     }
 }
Ejemplo n.º 9
0
 private void dgvData_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if ((this.bds.Position >= 0) && (e.RowIndex >= 0))
     {
         DataRowView view = (DataRowView)this.bds.List[this.bds.Position];
         if (((this.dgvData.Columns[e.ColumnIndex].HeaderText == "修改") && (this.bds.Position >= 0)) && (e.RowIndex >= 0))
         {
             using (PBControler controler = new PBControler(new PersonForm(view.Row["IDCardNo"].ToString()), new PersonInfoFactory()))
             {
                 controler.IParentFrm.IShowDialog();
                 ChackDate();
             }
             GC.Collect();
         }
         else if (((this.dgvData.Columns[e.ColumnIndex].HeaderText == "删除") && (this.bds.Position >= 0)) && (e.RowIndex >= 0))
         {
             if (view != null)
             {
                 DataRow row = view.Row;
                 if (row["HouseRelation"].ToString() == "1")
                 {
                     string str = "?当前人员为户主且有相应的家庭档案信息,是否删除现家庭档案和所有家庭成员的关联关系?";
                     if (MessageBox.Show("确定删除:" + row["CustomerName"].ToString() + str + "删除之后的信息将无法恢复!", "删除", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                     {
                         RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                         foreach (RecordsBaseInfoModel archive_baseinfo2 in archive_baseinfo.GetModelList(string.Format(" and FamilyIDCardNo = '{0}' ", this.Model.RecordID)))
                         {
                             archive_baseinfo2.RecordID       = null;
                             archive_baseinfo2.HouseRelation  = null;
                             archive_baseinfo2.HouseRealOther = null;
                             archive_baseinfo.Update(archive_baseinfo2);
                         }
                         RecordsFamilyInfoBLL   archive_family_info = new RecordsFamilyInfoBLL();
                         RecordsFamilyInfoModel model = archive_family_info.GetModel(this.Model.IDCardNo);
                         if (model != null)
                         {
                             archive_family_info.Delete(model.ID);
                         }
                         new RecordsBaseInfoBLL().DelTheMan(row["IDCardNo"].ToString());
                         // row.Delete();
                         // row.Table.AcceptChanges();
                         ChackDate();
                     }
                 }
                 else if (MessageBox.Show("确定删除:" + row["CustomerName"].ToString() + "?删除之后的信息将无法恢复!", "删除", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                 {
                     new RecordsBaseInfoBLL().DelTheMan(row["IDCardNo"].ToString());
                     row.Delete();
                     row.Table.AcceptChanges();
                     ChackDate();
                 }
             }
         }
     }
 }
Ejemplo n.º 10
0
        /// <summary>
        /// 检核栏位输入
        /// </summary>
        private void ChackDate()
        {
            string where = this.GetWhere();

            if (string.IsNullOrEmpty(where))
            {
                MessageBox.Show("请选择查询条件!", "查询条件", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else
            {
                this.btnQuery.Enabled = false;
                RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                DataSet            ds = archive_baseinfo.GetListDT(where, "");

                if (ds.Tables.Count > 0)
                {
                    dtTmp = this.TransDs(ds);
                }

                this.totalCount = dtTmp.Rows.Count;
                this.totalPages = (this.totalCount <= this.pageCount) ? 1 : ((this.totalCount / this.pageCount) + (((this.totalCount % this.pageCount) > 0) ? 1 : 0));

                if (this.currentPage > totalPages - 1)
                {
                    this.currentPage--;
                }

                this.lbTotalCount.Text = string.Format("共计{0}条", this.totalCount.ToString());
                this.lbPages.Text      = string.Format("{0}/{1}页", this.currentPage + 1, this.totalPages);

                if (ds.Tables.Count > 0)
                {
                    DataTable dtTemp = dtTmp.Clone();
                    int       nextV  = (this.currentPage + 1) * this.pageCount;

                    if (nextV > this.totalCount)
                    {
                        nextV = this.totalCount;
                    }

                    for (int i = (this.currentPage) * this.pageCount; i < nextV; i++)
                    {
                        dtTemp.ImportRow(dtTmp.Rows[i]);
                    }

                    this.bds.DataSource     = dtTemp;
                    this.dgvData.DataSource = this.bds;
                }

                this.groupBox1.Enabled = false;
                this.btnQuery.Enabled  = true;
                this.btnQuery.Text     = "重置条件";
            }
        }
Ejemplo n.º 11
0
 public bool hasData()
 {
     if (!string.IsNullOrEmpty(this.CardID))
     {
         DataSet list = new RecordsBaseInfoBLL().GetList(" and IDCardNo='" + this.CardID + "'");
         if (list != null && list.Tables.Count > 0 && list.Tables[0].Rows.Count > 0)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 12
0
 private void btnFront_Click(object sender, EventArgs e)
 {
     if (this.currentPage > 0)
     {
         this.lbPages.Text = string.Format("{0}/{1}页", --this.currentPage + 1, this.totalPages);
         DataSet ds = new RecordsBaseInfoBLL().GetListByPage(this.GetWhere(), "", this.currentPage * this.pageCount, this.pageCount);
         if (ds.Tables.Count > 0)
         {
             this.bds.DataSource     = ds.Tables[0];
             this.dgvData.DataSource = this.bds;
         }
     }
 }
Ejemplo n.º 13
0
        private void listView1_ItemActivate(object sender, EventArgs e)
        {
            Predicate <RecordsFamilyInfoModel> match = null;

            this.FamilyArcID = this.listView1.FocusedItem.SubItems[0].Text;
            if (this.FamilyArcID != "无")
            {
                if (match == null)
                {
                    match = c => c.RecordID.ToString() == this.FamilyArcID;
                }
                RecordsFamilyInfoModel recordsFamilyInfoModel = this.familys.Find(match);
                if (recordsFamilyInfoModel != null)
                {
                    this.Model.FamilyIDCardNo = recordsFamilyInfoModel.IDCardNo;
                    this.Model.HouseID        = recordsFamilyInfoModel.IDCardNo;
                    this.Model.HouseName      = recordsFamilyInfoModel.CustomerName;
                }
                base.DialogResult = DialogResult.OK;
            }
            else if (this.Model.HouseRelation == "1")
            {
                if (MessageBox.Show("当前人员为户主且有相应的家庭档案信息,此操作将会将人员的家庭关系删除,是否继续?\r\n(注意:这样将会删除现家庭档案的所有信息和家庭中所有对应的人员关系!)", "家庭档案", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.OK)
                {
                    RecordsBaseInfoBLL recordsBaseInfoBLL = new RecordsBaseInfoBLL();
                    foreach (RecordsBaseInfoModel recordsBaseInfoModel in recordsBaseInfoBLL.GetModelList(string.Format(" and FY_ARCHIVEID = '{0}' ", this.Model.FamilyIDCardNo)))
                    {
                        recordsBaseInfoModel.FamilyIDCardNo = null;
                        recordsBaseInfoModel.HouseRelation  = null;
                        recordsBaseInfoModel.HouseRealOther = null;
                        recordsBaseInfoBLL.Update(recordsBaseInfoModel);
                    }
                    new RecordsFamilyInfoBLL();
                    this.Model.FamilyIDCardNo = null;
                    this.Model.HouseID        = null;
                    this.Model.HouseName      = null;
                    this.Model.HouseRelation  = null;
                    this.Model.HouseRealOther = null;
                    base.DialogResult         = DialogResult.OK;
                }
            }
            else if (MessageBox.Show("此操作将会将人员的家庭关系删除,是否继续?", "家庭档案", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.OK)
            {
                this.Model.FamilyIDCardNo = null;
                this.Model.HouseID        = null;
                this.Model.HouseName      = null;
                this.Model.HouseRelation  = null;
                this.Model.HouseRealOther = null;
                base.DialogResult         = DialogResult.OK;
            }
        }
Ejemplo n.º 14
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     if (this.currentPage < (this.totalPages - 1))
     {
         this.lbPages.Text = string.Format("{0}/{1}页", ++this.currentPage + 1, this.totalPages);
         DataSet ds = new RecordsBaseInfoBLL().GetListByPage(this.GetWhere(), "B.CheckDate DESC,B.ID ASC", this.currentPage * this.pageCount, this.pageCount);
         if (ds.Tables.Count > 0)
         {
             this.TransDs(ds);
             this.bds.DataSource     = ds.Tables[0];
             this.dgvData.DataSource = this.bds;
         }
     }
 }
Ejemplo n.º 15
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (this.bds.Position >= 0)
            {
                DataRowView view = this.bds.List[this.bds.Position] as DataRowView;
                if (view != null)
                {
                    DataRow row = view.Row;
                    if (row["HouseRelation"].ToString() == "1")
                    {
                        string str = "?当前人员为户主且有相应的家庭档案信息,是否删除现家庭档案和所有家庭成员的关联关系?";
                        if (MessageBox.Show("确定删除:" + row["CustomerName"].ToString() + str + "删除之后的信息将无法恢复!", "删除", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                        {
                            RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                            foreach (RecordsBaseInfoModel archive_baseinfo2 in archive_baseinfo.GetModelList(string.Format(" and FamilyIDCardNo = '{0}' ", row["IDCardNo"].ToString())))
                            {
                                archive_baseinfo2.RecordID       = null;
                                archive_baseinfo2.HouseRelation  = null;
                                archive_baseinfo2.HouseRealOther = null;
                                archive_baseinfo.Update(archive_baseinfo2);
                            }
                            RecordsFamilyInfoBLL   archive_family_info = new RecordsFamilyInfoBLL();
                            RecordsFamilyInfoModel model = archive_family_info.GetModel(row["IDCardNo"].ToString());

                            if (model != null)
                            {
                                archive_family_info.Delete(model.ID);
                            }

                            //删除签名
                            DeteSign(SignPath, row["IDCardNo"].ToString());

                            new RecordsBaseInfoBLL().DelTheMan(row["IDCardNo"].ToString());
                            row.Delete();
                            row.Table.AcceptChanges();
                        }
                    }
                    else if (MessageBox.Show("确定删除:" + row["CustomerName"].ToString() + "?删除之后的信息将无法恢复!", "删除", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        //删除签名
                        DeteSign(SignPath, row["IDCardNo"].ToString());

                        new RecordsBaseInfoBLL().DelTheMan(row["IDCardNo"].ToString());
                        row.Delete();
                        row.Table.AcceptChanges();
                    }
                }
            }
        }
Ejemplo n.º 16
0
        private void listView1_ItemActivate(object sender, EventArgs e)
        {
            Predicate <RecordsBaseInfoModel> match = null;

            this.FamilyArcID = this.listView1.FocusedItem.SubItems[2].Text;
            if (this.FamilyArcID != "")
            {
                if (match == null)
                {
                    match = c => c.IDCardNo.ToString() == this.FamilyArcID;
                }
                RecordsBaseInfoModel HouseModel = new RecordsBaseInfoModel();
                HouseModel = this.ModelList.Find(match);
                RecordsFamilyInfoModel FamilyModel = new RecordsFamilyInfoBLL().GetModel(HouseModel.IDCardNo);
                if (FamilyModel == null)
                {
                    RecordsFamilyInfoModel archive_family_info = new RecordsFamilyInfoModel
                    {
                        RecordID    = HouseModel.RecordID,
                        IDCardNo    = HouseModel.IDCardNo,
                        ToiletType  = "1",
                        HouseType   = "1",
                        LiveStatus  = "1",
                        CreatedDate = new DateTime?(DateTime.Today)
                    };
                    FamilyModel = archive_family_info;
                    FamilyModel.FamilyRecordID = HouseModel.IDCardNo;
                    FamilyModel.CreatedDate    = new DateTime?(DateTime.Today);
                    FamilyModel.CreateBy       = ConfigHelper.GetNode("doctor");
                    FamilyModel.CreateUnit     = ConfigHelper.GetNode("orgCode");
                    FamilyModel.CustomerName   = HouseModel.CustomerName;
                    //增加户主信息
                    new RecordsFamilyInfoBLL().Add(archive_family_info);

                    RecordsBaseInfoBLL recordsBaseInfoBLL = new RecordsBaseInfoBLL();
                    HouseModel.FamilyIDCardNo = FamilyModel.IDCardNo;
                    HouseModel.HouseID        = FamilyModel.IDCardNo;
                    HouseModel.HouseName      = FamilyModel.CustomerName;
                    HouseModel.HouseRelation  = "1";
                    HouseModel.HouseRealOther = "本人";
                    recordsBaseInfoBLL.Update(HouseModel);
                }
                this.Model.FamilyIDCardNo = FamilyModel.IDCardNo;
                this.Model.HouseID        = FamilyModel.IDCardNo;
                this.Model.HouseName      = FamilyModel.CustomerName;
                base.DialogResult         = DialogResult.OK;
            }
        }
Ejemplo n.º 17
0
 private void btnQuery_Click(object sender, EventArgs e)
 {
     if (this.btnQuery.Text == "重置条件")
     {
         this.groupBox1.Enabled = true;
         this.btnQuery.Text     = "查询";
     }
     else
     {
         string where          = this.GetWhere();
         this.btnQuery.Enabled = false;
         DataSet ds = new RecordsBaseInfoBLL().GetVisitPercentDt(where);
         this.dgvData.DataSource = ds.Tables[0];
         this.btnQuery.Enabled   = true;
     }
 }
Ejemplo n.º 18
0
        private void mtbIdCard_Leave(object sender, EventArgs e)
        {
            //if (!CheckIDCard(mtbIdCard.Text.Trim()))
            //{
            //    MessageBox.Show("身份证格式不正确,请重新输入!");
            //    mtbIdCard.Focus();
            //    return;
            //}

            if (this.mtbIdCard.MaskCompleted)
            {
                DateTime time;
                this.mtbIdCard.Text = this.mtbIdCard.Text;
                // string str = this.mtbIdCard.Text.Substring(6, 8);

                //if (this.rd15.Checked)
                //{
                //    string str2 = this.mtbIdCard.Text.Substring(6, 6);
                //    int num = DateTime.Now.Year - 0x7d0;
                //    str = (int.Parse(str2.Substring(0, 2)) <= num) ? ("20" + str2) : ("19" + str2);
                //}
                //if (this.rd18.Checked)
                //{
                //    str = this.mtbIdCard.Text.Substring(6, 8);
                //}

                RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                if (!string.IsNullOrEmpty(this.mtbIdCard.Text))
                {
                    RecordsBaseInfoModel model = archive_baseinfo.GetModel(this.mtbIdCard.Text);

                    if (model != null)
                    {
                        this.inputIdCardInfo = model;
                        this.tbName.Text     = this.inputIdCardInfo.CustomerName;
                        this.tbAddress.Text  = this.inputIdCardInfo.HouseHoldAddress;
                        //this.hadFoundIt(true);
                    }
                    else
                    {
                        this.hadFoundIt(false);
                    }
                }
            }
        }
Ejemplo n.º 19
0
        public void ConbinData(string idcardno)
        {
            RecordsBaseInfoModel BaseModel = new RecordsBaseInfoBLL().GetModel(idcardno);

            if (BaseModel != null)
            {
                DataRow dr2 = this.dtData.NewRow();
                dr2[0] = BaseModel.CustomerName;
                dr2[1] = BaseModel.IDCardNo;
                this.dtData.Rows.Add(dr2);
            }
            else
            {
                DataRow dr2 = this.dtData.NewRow();
                dr2[0] = "";
                dr2[1] = idcardno;
                this.dtData.Rows.Add(dr2);
            }
        }
Ejemplo n.º 20
0
        private void pbxSearch_Click(object sender, EventArgs e)
        {
            RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();

            if (!string.IsNullOrEmpty(this.mtbIdCard.Text))
            {
                RecordsBaseInfoModel model = archive_baseinfo.GetModel(this.mtbIdCard.Text);
                if (model != null)
                {
                    int num2;
                    this.inputIdCardInfo = model;
                    this.tbName.Text     = this.inputIdCardInfo.CustomerName;
                    this.tbAddress.Text  = this.inputIdCardInfo.HouseHoldAddress;
                    this.hadFoundIt(true);
                }
                else
                {
                    this.hadFoundIt(false);
                }
            }
        }
Ejemplo n.º 21
0
        private void btnSave_Click(object sender, EventArgs e) // 保存功能
        {
            RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.IDCardNo);

            if (this.pictureBox1.Image != null)
            {
                if (!Directory.Exists(SavePath))
                {
                    Directory.CreateDirectory(SavePath);
                }

                string path = SavePath + this.IDCardNo + "_" + model.CustomerName + ".bmp";

                if (File.Exists(path))
                {
                    if (MessageBox.Show(path + "\r\n已经存在,是否覆盖?", "覆盖照片", MessageBoxButtons.YesNo,
                                        MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                    {
                        File.Delete(path);
                        this.pictureBox1.Image.Save(path);
                        MessageBox.Show("照片保存至:" + path);
                    }
                    else
                    {
                        return;
                    }
                }
                else
                {
                    this.pictureBox1.Image.Save(path);
                    MessageBox.Show("照片保存至:" + path);
                }

                // 更新基本信息中的照片路径
                new CommonClassBLL().Update(this.IDCardNo, path);

                base.DialogResult = DialogResult.OK;
            }
        }
Ejemplo n.º 22
0
        private void FrmInputIDCard_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(IDCardNo))
            {
                this.mtbIdCard.Text = IDCardNo;
                RecordsBaseInfoBLL archive_baseinfo = new RecordsBaseInfoBLL();
                if (!string.IsNullOrEmpty(this.mtbIdCard.Text))
                {
                    RecordsBaseInfoModel model = archive_baseinfo.GetModel(this.mtbIdCard.Text);

                    if (model != null)
                    {
                        this.inputIdCardInfo = model;
                        this.tbName.Text     = this.inputIdCardInfo.CustomerName;
                        this.tbAddress.Text  = this.inputIdCardInfo.HouseHoldAddress;
                    }
                    else
                    {
                        this.hadFoundIt(false);
                    }
                }
            }
        }
Ejemplo n.º 23
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (this.currentPage < (this.totalPages - 1))
            {
                this.lbPages.Text = string.Format("{0}/{1}页", ++this.currentPage + 1, this.totalPages);

                DataSet ds = new RecordsBaseInfoBLL().GetListByPage(this.GetWhere(), "", this.currentPage * this.pageCount, this.pageCount);

                DataTable dtTemp = dtTmp.Clone();
                int       nextV  = (this.currentPage + 1) * this.pageCount;
                if (nextV > this.totalCount)
                {
                    nextV = this.totalCount;
                }
                for (int i = this.currentPage * this.pageCount; i < nextV; i++)
                {
                    dtTemp.ImportRow(dtTmp.Rows[i]);
                }

                this.bds.DataSource     = dtTemp;
                this.dgvData.DataSource = this.bds;
            }
        }
Ejemplo n.º 24
0
        public FixedDocumentSequence getReport()
        {
            if (!string.IsNullOrEmpty(this.CardID))
            {
                List <ListValue> list = new List <ListValue>();
                BaseModel = new RecordsBaseInfoBLL().GetModel(this.CardID);
                if (BaseModel != null)
                {
                    list.Add(new ListValue
                    {
                        strMark = "$name",
                        strVal  = BaseModel.CustomerName
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$archiveid",
                        strVal  = BaseModel.RecordID
                    });
                }
                #region 健康问询
                HealthAssessExamModel model1 = new HealthAssessExamBLL().GetMaxModel(this.CardID);
                if (model1 != null)
                {
                    list.Add(new ListValue
                    {
                        strMark = "#jzjb",
                        strVal  = model1.FamilyHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#jb",
                        strVal  = model1.MedicalHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#yscs",
                        strVal  = model1.DietaryHabit
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#ysglx",
                        strVal  = model1.DietaryLaw
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ysqt",
                        strVal  = model1.DietaryOther
                    });

                    list.Add(new ListValue
                    {
                        strMark = "#dlpl",
                        strVal  = model1.ExerciseRate
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$dlsj",
                        strVal  = model1.ExerciseTimes.ToString()
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zys",
                        strVal  = model1.HospitalHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#fy",
                        strVal  = model1.TakingMedicine
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zlnl",
                        strVal  = model1.OldSelfCareability
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zldf",
                        strVal  = model1.GloomyScore.ToString()
                    });
                    string strtyfs = "";
                    if (!string.IsNullOrEmpty(model1.ExerciseExistense))
                    {
                        foreach (char c in model1.ExerciseExistense)
                        {
                            switch (c)
                            {
                            case '1': strtyfs = strtyfs + "散步;";
                                break;

                            case '2': strtyfs = strtyfs + "跑步;";
                                break;

                            case '3': strtyfs = strtyfs + "广场舞;";
                                break;

                            default: break;
                            }
                        }
                    }
                    if (!string.IsNullOrEmpty(model1.ExerciseExistenseOther))
                    {
                        strtyfs = strtyfs + model1.ExerciseExistenseOther + ";";
                    }
                    list.Add(new ListValue
                    {
                        strMark = "$dlfs",
                        strVal  = strtyfs
                    });
                    #region 体检评估
                    HealthHouseModel model2 = new HealthHouseBLL().GetDataByID(model1.PID);
                    if (model2 != null)
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$tjsj",
                            strVal  = DrawItems.strToDate(model2.CheckDate)
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$bmi",
                            strVal  = model2.BMI.ToString()
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$gy",
                            strVal  = model2.LeftHeight.ToString()
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$dy",
                            strVal  = model2.LeftPre.ToString()
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$ml",
                            strVal  = model2.PulseRate.ToString()
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$xy",
                            strVal  = model2.BloodOxygen
                        });

                        HealthHouseBCHAOModel BchaoModel = new HealthHouseBCHAOBLL().GetModel(model2.ID);//B超表
                        if (BchaoModel != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#bc",
                                strVal  = BchaoModel.BCHAO
                            });
                        }
                        HealthHouseEcgModel EcgModel = new HealthHouseEcgBLL().GetModel(model2.ID);//心电
                        if (EcgModel != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#xd",
                                strVal  = EcgModel.ECG
                            });
                        }
                        HHCardiovascularModel VascularModel = new HHCardiovascularBLL().GetData(this.CardID, model2.ID);//心血管
                        if (VascularModel != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#xx",
                                strVal  = VascularModel.Result
                            });
                        }
                        HHBoneModel BoneModel = new HHBoneBLL().GetData(this.CardID, model2.ID);//骨密度
                        if (BoneModel != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#gm",
                                strVal  = BoneModel.Result
                            });
                        }
                        HHLungModel LungModel = new HHLungBLL().GetData(this.CardID, model2.ID);//肺功能
                        if (LungModel != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#fg",
                                strVal  = LungModel.Result
                            });
                        }
                        HealthHousePhysicalAssistCheckModel HHAssistCheck = new HealthHousePhysicalAssistCheckBLL().GetModel(model2.ID);//辅助检查表
                        if (HHAssistCheck != null)
                        {
                            list.Add(new ListValue
                            {
                                strMark = "#xb",
                                strVal  = HHAssistCheck.CHESTX
                            });
                            if (!string.IsNullOrEmpty(HHAssistCheck.PRO) &&
                                !string.IsNullOrEmpty(HHAssistCheck.GLU) &&
                                !string.IsNullOrEmpty(HHAssistCheck.KET) &&
                                !string.IsNullOrEmpty(HHAssistCheck.BLD))
                            {
                                if (HHAssistCheck.PRO.Contains("+") ||
                                    HHAssistCheck.GLU.Contains("+") ||
                                    HHAssistCheck.KET.Contains("+") ||
                                    HHAssistCheck.BLD.Contains("+"))
                                {
                                    list.Add(new ListValue
                                    {
                                        strMark = "#nc",
                                        strVal  = "2"
                                    });
                                }
                                else
                                {
                                    list.Add(new ListValue
                                    {
                                        strMark = "#nc",
                                        strVal  = "1"
                                    });
                                }
                            }
                        }
                        HealthHouseMediPhyModel MedModel = new HealthHouseMediPhyBLL().GetModel(model2.ID);//中医体质类型
                        if (MedModel != null)
                        {
                            string strMed = "";
                            if (!string.IsNullOrEmpty(MedModel.Mild))
                            {
                                strMed += "平和质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.Faint))
                            {
                                strMed += "气虚质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.Yang))
                            {
                                strMed += "阳虚质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.Yin))
                            {
                                strMed += "阴虚质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.PhlegmDamp))
                            {
                                strMed += "痰湿质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.Muggy))
                            {
                                strMed += "湿热质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.BloodStasis))
                            {
                                strMed += "血瘀质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.QiConstraint))
                            {
                                strMed += "气郁质,";
                            }
                            if (!string.IsNullOrEmpty(MedModel.Characteristic))
                            {
                                strMed += "特兼质,";
                            }
                            if (strMed != "")
                            {
                                list.Add(new ListValue
                                {
                                    strMark = "$zytz",
                                    strVal  = strMed.Remove(strMed.Length - 1, 1)
                                });
                            }
                        }
                    }

                    #endregion
                    #region 范围值
                    List <HealthOverviewSetModel> SetList = new List <HealthOverviewSetModel>();
                    SetList = new HealthOverviewSetBLL().GetList(" and Type in (1,2,3,4) ");
                    string strBMI = "", strxueya = "", strxinlv = "", strxueyang = "";
                    if (SetList != null)
                    {
                        foreach (HealthOverviewSetModel setmodel in SetList)
                        {
                            if (setmodel.Type == "1")//体质指数
                            {
                                strBMI = setmodel.minValues + "~" + setmodel.maxValues;
                            }
                            else if (setmodel.Type == "2")//血压
                            {
                                strxueya = setmodel.minValues + "~" + setmodel.maxValues;
                            }
                            else if (setmodel.Type == "3")//心率
                            {
                                strxinlv = setmodel.minValues + "~" + setmodel.maxValues;
                            }
                            else if (setmodel.Type == "4")//血氧
                            {
                                strxueyang = setmodel.minValues + "~" + setmodel.maxValues;
                            }
                        }
                    }
                    list.Add(new ListValue
                    {
                        strMark = "$bmifw",
                        strVal  = strBMI
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xzfw",
                        strVal  = strxueya
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xlfw",
                        strVal  = strxinlv
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xyfw",
                        strVal  = strxueyang
                    });
                    #endregion
                }
                #endregion
                return(DrawItems.setPage("printXps\\" + PrintName, list));
            }
            return(null);
        }
Ejemplo n.º 25
0
        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
                    }
                };
                ChronicStrokeVisitModel model2 = new ChronicStrokeVisitBLL().GetModel(this.CardID);
                if (model2 != null)
                {
                    list.Add(new ListValue
                    {
                        strMark = "$xyzy",
                        strVal  = model2.SmokeDrinkAttention
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzqt",
                        strVal  = model2.SignOther
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xdy",
                        strVal  = DrawItems.objToNumStr(model2.Hypotension, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xgy",
                        strVal  = DrawItems.objToNumStr(model2.Hypertension, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "%zzqt",
                        strVal  = model2.SymptomOther
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zz",
                        strVal  = model2.Symptom
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xcsfsj",
                        strVal  = DrawItems.strToDate(model2.NextFollowupDate)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sfys",
                        strVal  = model2.FollowUpDoctor
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sfrq",
                        strVal  = DrawItems.strToDate(model2.FollowupDate)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "%fyhzyw",
                        strVal  = model2.EatingDrug
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#sffs",
                        strVal  = model2.FollowupWay
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzjg",
                        strVal  = model2.ReferralOrg
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzyy",
                        strVal  = model2.ReferralReason
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#sffl",
                        strVal  = model2.FollowupType
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ywbly",
                        strVal  = model2.AdrEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#ywbl",
                        strVal  = model2.Adr
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#fyyc",
                        strVal  = model2.MedicationCompliance
                    });
                    list.Add(new ListValue
                    {
                        strMark = "%fzjc",
                        strVal  = model2.AssistantExam
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zyxw",
                        strVal  = model2.ObeyDoctorBehavio
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#xltz",
                        strVal  = model2.PsychicAdjust
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$syzy",
                        strVal  = model2.EatSaltAttention
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ydzy",
                        strVal  = model2.SportAttention
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tz",
                        strVal  = DrawItems.objToNumStr(model2.Weight)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "&qm",
                        strVal  = string.Format("{0}{1}_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model2.FollowupDate).ToString("yyyyMMdd"))
                    });
                    List <ChronicDrugConditionModel> modelList = new ChronicDrugConditionBLL().GetModelList(string.Format(" IDCardNo = '{0}' and TYPE = '{1}' and OUTKey ='" + model2.ID + "' ", this.CardID, "5"));
                    if (modelList != null && modelList.Count > 0)
                    {
                        list.AddRange(this.getDrug(modelList).ToArray());
                    }
                }
            }
            return(DrawItems.setPage("printXps\\" + this.PrintName, list));
        }
Ejemplo n.º 26
0
        public FixedDocumentSequence getReport()
        {
            if (!string.IsNullOrEmpty(this.CardID))
            {
                RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.CardID);
                List <ListValue>     list  = new List <ListValue>
                {
                    new ListValue
                    {
                        strMark = "$archiveid",
                        strVal  = model.RecordID
                    },
                    new ListValue
                    {
                        strMark = "$name",
                        strVal  = model.CustomerName
                    }
                };
                WomenGravidaFirstVisitModel model2 = new WomenGravidaFirstVisitDAL().GetModel(this.CardID);
                if (model2 != null)
                {
                    list.Add(new ListValue
                    {
                        strMark = "$ylc",
                        strVal  = model2.AbortionInfo
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ylcr",
                        strVal  = model2.ArtificialAbortion
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$yst",
                        strVal  = model2.Deadfetus
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ysc",
                        strVal  = model2.StillBirthInfo
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ysw",
                        strVal  = model2.NewBornDead
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$yqx",
                        strVal  = model2.NewBornDefect
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sg",
                        strVal  = DrawItems.objToNumStr(model2.Height, 2)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tz",
                        strVal  = DrawItems.objToNumStr(model2.Weight)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzzs",
                        strVal  = DrawItems.objToNumStr(model2.Bmi)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xgy",
                        strVal  = DrawItems.objToNumStr(model2.HBloodpressure)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xdy",
                        strVal  = DrawItems.objToNumStr(model2.LBloodpressure)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#t",
                        strVal  = model2.Heart
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzxz",
                        strVal  = model2.Heartex
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#f",
                        strVal  = model2.Lung
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzfb",
                        strVal  = model2.Lungex
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#w",
                        strVal  = model2.Vulva
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$wy",
                        strVal  = model2.VulvaEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#y",
                        strVal  = model2.V****a
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$fkyd",
                        strVal  = model2.VaginaEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#g",
                        strVal  = model2.CervixuTeri
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$gj",
                        strVal  = model2.CervixuTeriex
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#z",
                        strVal  = model2.Corpus
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$fkzg",
                        strVal  = model2.CorpusEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#j",
                        strVal  = model2.Attach
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$fj",
                        strVal  = model2.AttachEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#ztpg",
                        strVal  = model2.OverAlassessMent
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ztpjyc",
                        strVal  = model2.OverAlassessmentEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#bjzd",
                        strVal  = model2.HealthZhiDao
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zdqt",
                        strVal  = model2.HealthZhiDaoOthers
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zz",
                        strVal  = model2.Referral
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzyy",
                        strVal  = model2.ReferralReason
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzjg",
                        strVal  = model2.ReferralOrg
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzlxr",
                        strVal  = model2.ReferralContacts
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zzlxfs",
                        strVal  = model2.ReferralContactsTel
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#zzjg",
                        strVal  = model2.ReferralResult
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xcsfrq",
                        strVal  = DrawItems.strToDate(model2.NextfollowupDate)
                    });
                    //list.Add(new ListValue
                    //{
                    //    strMark = "$sfys",
                    //    strVal = model2.FollowUpDoctor
                    //});
                    list.Add(new ListValue
                    {
                        strMark = "$fksqt",
                        strVal  = model2.GynecologyHistoryEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tbrq",
                        strVal  = DrawItems.strToDate(model2.RecordDate)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tbyz",
                        strVal  = DrawItems.objToNumStr(model2.PregancyWeeks, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$yfnl",
                        strVal  = DrawItems.objToNumStr(model2.CustomerAge, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zfxm",
                        strVal  = model2.HusbandName
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$tzfnl",
                        strVal  = DrawItems.objToNumStr(model2.HusbandAge, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$zfdh",
                        strVal  = model2.HusbandPhone
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$yc",
                        strVal  = DrawItems.objToNumStr(model2.PregancyCount, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ydcc",
                        strVal  = DrawItems.objToNumStr(model2.NatrualChildBirthCount, 0)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$pgcc",
                        strVal  = DrawItems.objToNumStr(model2.CaeSareanCount, 0)
                    });
                    if (model2.LastMenStruation == "0")
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$mcyj",
                            strVal  = "不详"
                        });
                    }
                    else
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$mcyj",
                            strVal  = DrawItems.strToDate(model2.LastMenStruationDate)
                        });
                    }
                    list.Add(new ListValue
                    {
                        strMark = "$ycc",
                        strVal  = DrawItems.strToDate(model2.ExpectedDueDate)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#jws",
                        strVal  = model2.CustomerHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$jwsqt",
                        strVal  = model2.CustomerHistoryEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#jzs",
                        strVal  = model2.FamilyHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$jzsqt",
                        strVal  = model2.FamilyHistoryEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#grs",
                        strVal  = model2.PersonalHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$grsqt",
                        strVal  = model2.PersonalHistoryEx
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#fks",
                        strVal  = model2.GyNecoloGyHistory
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$jcjg",
                        strVal  = model2.BooksInstitution
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#jcqk",
                        strVal  = model2.BooksInfo
                    });
                }
                WomenGravidaPreAssistCheckModel model3 = new WomenGravidaPreAssistCheckDAL().GetModel(this.CardID);
                if (model3 != null)
                {
                    list.Add(new ListValue
                    {
                        strMark = "$xhdb",
                        strVal  = DrawItems.objToNumStr(model3.HB)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xbxb",
                        strVal  = DrawItems.objToNumStr(model3.WBC)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xxb",
                        strVal  = DrawItems.objToNumStr(model3.PlT)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xcqt",
                        strVal  = model3.BloodOther
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ndb",
                        strVal  = model3.PRO
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$nt",
                        strVal  = model3.GLU
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ntt",
                        strVal  = model3.KET
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$nqx",
                        strVal  = model3.BLD
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$nqt",
                        strVal  = model3.UrineOthers
                    });
                    string bLOODTYPE;
                    string strVal;
                    if ((bLOODTYPE = model3.BloodType) != null)
                    {
                        if (bLOODTYPE == "1")
                        {
                            strVal = "A型";
                            goto IL_BBF;
                        }
                        if (bLOODTYPE == "2")
                        {
                            strVal = "B型";
                            goto IL_BBF;
                        }
                        if (bLOODTYPE == "3")
                        {
                            strVal = "O型";
                            goto IL_BBF;
                        }
                        if (bLOODTYPE == "4")
                        {
                            strVal = "AB型";
                            goto IL_BBF;
                        }
                        if (bLOODTYPE == "5")
                        {
                            strVal = "不详";
                            goto IL_BBF;
                        }
                    }
                    strVal = "";
IL_BBF:
                    list.Add(new ListValue
                    {
                        strMark = "$abo",
                        strVal  = strVal
                    });
                    if (model3.RH == "1")
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$rh",
                            strVal  = "阴性"
                        });
                    }
                    else
                    {
                        if (model3.RH == "2")
                        {
                            list.Add(new ListValue
                            {
                                strMark = "$rh",
                                strVal  = "阳性"
                            });
                        }
                        else
                        {
                            if (model3.RH == "3")
                            {
                                list.Add(new ListValue
                                {
                                    strMark = "$rh",
                                    strVal  = "不详"
                                });
                            }
                        }
                    }

                    list.Add(new ListValue
                    {
                        strMark = "$xt",
                        strVal  = DrawItems.objToNumStr(model3.FPGL)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ggb",
                        strVal  = DrawItems.objToNumStr(model3.SGPT)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ggc",
                        strVal  = DrawItems.objToNumStr(model3.GOT)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$gdb",
                        strVal  = DrawItems.objToNumStr(model3.BP)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$gdh",
                        strVal  = DrawItems.objToNumStr(model3.TBIL)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$gjh",
                        strVal  = DrawItems.objToNumStr(model3.CB)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sxq",
                        strVal  = DrawItems.objToNumStr(model3.SCR)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$sxn",
                        strVal  = DrawItems.objToNumStr(model3.BUN)
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#ydfm",
                        strVal  = model3.VaginalSecretions
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ydqt",
                        strVal  = model3.VaginalSecretionSothers
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#ydqj",
                        strVal  = model3.VaginalCleaess
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ygby",
                        strVal  = model3.HBSAG
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xtt",
                        strVal  = model3.HBSAB
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$ygey",
                        strVal  = model3.HBEAG
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$xet",
                        strVal  = model3.HBEAB
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$yght",
                        strVal  = model3.HBCAB
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#mdxq",
                        strVal  = model3.LUES
                    });
                    list.Add(new ListValue
                    {
                        strMark = "#hiv",
                        strVal  = model3.HIV
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$bc",
                        strVal  = model3.BCHAO
                    });
                    list.Add(new ListValue
                    {
                        strMark = "$fzqt",
                        strVal  = model3.AssistOther
                    });
                }
                list.Add(new ListValue
                {
                    strMark = "&qm",
                    strVal  = string.Format("{0}{1}_{2}.png", SignPath, model.IDCardNo, "PrenatalS_1")
                });
                list.Add(new ListValue
                {
                    strMark = "&sfys",
                    strVal  = string.Format("{0}{1}_{2}_Doc.png", SignPath, model.IDCardNo, "PrenatalS_1")
                });
                return(DrawItems.setPage("printXps\\15第一次产前随访服务记录表.xps", list));
            }
            return(null);
        }
Ejemplo n.º 27
0
 public FixedDocumentSequence getReport()
 {
     if (!string.IsNullOrEmpty(this.CardID))
     {
         RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.CardID);
         List <ListValue>     list  = new List <ListValue>
         {
             new ListValue
             {
                 strMark = "$idcard",
                 strVal  = model.IDCardNo
             },
             new ListValue
             {
                 strMark = "$name",
                 strVal  = model.CustomerName
             },
             new ListValue
             {
                 strMark = "$adress",
                 strVal  = model.Address
             }
         };
         string strsex = "";
         if (!string.IsNullOrEmpty(model.Sex))
         {
             if (DrawItems.objToNumStr(model.Sex, 0) == "1")
             {
                 strsex = "男";
             }
             if (DrawItems.objToNumStr(model.Sex, 0) == "2")
             {
                 strsex = "女";
             }
             if (DrawItems.objToNumStr(model.Sex, 0) == "0")
             {
                 strsex = "未知";
             }
             if (DrawItems.objToNumStr(model.Sex, 0) == "9")
             {
                 strsex = "未说明";
             }
         }
         list.Add(new ListValue
         {
             strMark = "$sex",
             strVal  = strsex
         });
         ReceiveTreatBaseInfoModel receivemodel = new ReceiveTreatBaseInfoBLL().GetMaxModel(this.CardID);
         if (receivemodel != null)
         {
             list.Add(new ListValue
             {
                 strMark = "%zgzl",
                 strVal  = receivemodel.SubjectiveData
             });
             list.Add(new ListValue
             {
                 strMark = "%pinggu",
                 strVal  = receivemodel.Assessment
             });
             list.Add(new ListValue
             {
                 strMark = "%kgzl",
                 strVal  = receivemodel.ObjectiveData
             });
             list.Add(new ListValue
             {
                 strMark = "%czjh",
                 strVal  = receivemodel.ManagePlane
             });
             list.Add(new ListValue
             {
                 strMark = "$Doctname",
                 strVal  = receivemodel.Doctor
             });
             list.Add(new ListValue
             {
                 strMark = "$jiezhenDate",
                 strVal  = DrawItems.strToDate(receivemodel.ReceiveDate, 1)
             });
         }
         return(DrawItems.setPage("printXps\\30接诊记录表.xps", list));
     }
     return(null);
 }
Ejemplo n.º 28
0
        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
                    }
                };

                ChronicLungerFirstVisitModel model2 = new ChronicLungerFirstVisitBLL().GetModel(this.CardID);
                if (model2 != null)
                {
                    ChronicLungerVisitModel model1 = new ChronicLungerVisitBLL().GetModelByOutKey(model2.ID, "1");

                    if (model1 != null)
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$sfrq1",
                            strVal  = DrawItems.strToDate(model1.FollowupDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$m1",
                            strVal  = DrawItems.objToNumStr(model1.CureMonth, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ddryxz1",
                            strVal  = model1.Supervisor
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#sffs1",
                            strVal  = model1.FollowupWay
                        });

                        string strSymptom1 = "";
                        if (!string.IsNullOrEmpty(model1.Symptom))
                        {
                            foreach (string str in model1.Symptom.Split(new char[] { ',' }))
                            {
                                if (!string.IsNullOrEmpty(str))
                                {
                                    strSymptom1 += (int.Parse(str) - 1).ToString() + ",";
                                }
                            }
                            strSymptom1 = strSymptom1.Remove(strSymptom1.Length - 1);
                        }
                        list.Add(new ListValue
                        {
                            strMark = "#zz1",
                            strVal  = strSymptom1
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%zzqt1",
                            strVal  = model1.SymptomEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$y1",
                            strVal  = DrawItems.objToNumStr(model1.SmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$ny1",
                            strVal  = DrawItems.objToNumStr(model1.NextSmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$j1",
                            strVal  = DrawItems.objToNumStr(model1.DayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$nj1",
                            strVal  = DrawItems.objToNumStr(model1.NextDayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%hlfa1",
                            strVal  = model1.ChemotherapyScheme
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#yf1",
                            strVal  = model1.MedicationCompliance
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ypjx1",
                            strVal  = model1.DrugType
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$lfycs1",
                            strVal  = DrawItems.objToNumStr(model1.OmissiveTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ywfy1",
                            strVal  = model1.Adr
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$fy1",
                            strVal  = model1.AdrEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#bfz1",
                            strVal  = model1.Complication
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$hbz1",
                            strVal  = model1.ComplicationEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzkb1",
                            strVal  = model1.ReferralOrg
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzyy1",
                            strVal  = model1.ReferralReason
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzjg1",
                            strVal  = model1.ReferralResult
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$clyj1",
                            strVal  = model1.HandleView
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$xcsfsj1",
                            strVal  = DrawItems.strToDate(model1.NextVisitDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sfys1",
                            strVal  = model1.VisitDoctor
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&qm1",
                            strVal  = string.Format("{0}{1}_1_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&sfys1",
                            strVal  = string.Format("{0}{1}_1_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        //滕州无签字版
                        list.Add(new ListValue
                        {
                            strMark = "$qm1",
                            strVal  = model.CustomerName
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$sfys1",
                            strVal  = model2.VisitDoctor
                        });
                    }

                    model1 = new ChronicLungerVisitBLL().GetModelByOutKey(model2.ID, "2");

                    if (model1 != null)
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$sfrq2",
                            strVal  = DrawItems.strToDate(model1.FollowupDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$m2",
                            strVal  = DrawItems.objToNumStr(model1.CureMonth, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ddryxz2",
                            strVal  = model1.Supervisor
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#sffs2",
                            strVal  = model1.FollowupWay
                        });

                        string strSymptom2 = "";
                        if (!string.IsNullOrEmpty(model1.Symptom))
                        {
                            foreach (string str in model1.Symptom.Split(new char[] { ',' }))
                            {
                                if (!string.IsNullOrEmpty(str))
                                {
                                    strSymptom2 += (int.Parse(str) - 1).ToString() + ",";
                                }
                            }
                            strSymptom2 = strSymptom2.Remove(strSymptom2.Length - 1);
                        }
                        list.Add(new ListValue
                        {
                            strMark = "#zz2",
                            strVal  = strSymptom2
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%zzqt2",
                            strVal  = model1.SymptomEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$y2",
                            strVal  = DrawItems.objToNumStr(model1.SmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$ny2",
                            strVal  = DrawItems.objToNumStr(model1.NextSmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$j2",
                            strVal  = DrawItems.objToNumStr(model1.DayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$nj2",
                            strVal  = DrawItems.objToNumStr(model1.NextDayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%hlfa2",
                            strVal  = model1.ChemotherapyScheme
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#yf2",
                            strVal  = model1.MedicationCompliance
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ypjx2",
                            strVal  = model1.DrugType
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$lfycs2",
                            strVal  = DrawItems.objToNumStr(model1.OmissiveTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ywfy2",
                            strVal  = model1.Adr
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$fy2",
                            strVal  = model1.AdrEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#bfz2",
                            strVal  = model1.Complication
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$hbz2",
                            strVal  = model1.ComplicationEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzkb2",
                            strVal  = model1.ReferralOrg
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzyy2",
                            strVal  = model1.ReferralReason
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzjg2",
                            strVal  = model1.ReferralResult
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$clyj2",
                            strVal  = model1.HandleView
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$xcsfsj2",
                            strVal  = DrawItems.strToDate(model1.NextVisitDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sfys2",
                            strVal  = model1.VisitDoctor
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&qm2",
                            strVal  = string.Format("{0}{1}_2_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&sfys2",
                            strVal  = string.Format("{0}{1}_2_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        //滕州无签字版
                        list.Add(new ListValue
                        {
                            strMark = "$qm2",
                            strVal  = model.CustomerName
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$sfys2",
                            strVal  = model2.VisitDoctor
                        });
                    }

                    model1 = new ChronicLungerVisitBLL().GetModelByOutKey(model2.ID, "3");

                    if (model1 != null)
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$sfrq3",
                            strVal  = DrawItems.strToDate(model1.FollowupDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$m3",
                            strVal  = DrawItems.objToNumStr(model1.CureMonth, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ddryxz3",
                            strVal  = model1.Supervisor
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#sffs3",
                            strVal  = model1.FollowupWay
                        });

                        string strSymptom3 = "";
                        if (!string.IsNullOrEmpty(model1.Symptom))
                        {
                            foreach (string str in model1.Symptom.Split(new char[] { ',' }))
                            {
                                if (!string.IsNullOrEmpty(str))
                                {
                                    strSymptom3 += (int.Parse(str) - 1).ToString() + ",";
                                }
                            }
                            strSymptom3 = strSymptom3.Remove(strSymptom3.Length - 1);
                        }
                        list.Add(new ListValue
                        {
                            strMark = "#zz3",
                            strVal  = strSymptom3
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%zzqt3",
                            strVal  = model1.SymptomEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$y3",
                            strVal  = DrawItems.objToNumStr(model1.SmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$ny3",
                            strVal  = DrawItems.objToNumStr(model1.NextSmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$j3",
                            strVal  = DrawItems.objToNumStr(model1.DayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$nj3",
                            strVal  = DrawItems.objToNumStr(model1.NextDayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%hlfa3",
                            strVal  = model1.ChemotherapyScheme
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#yf3",
                            strVal  = model1.MedicationCompliance
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ypjx3",
                            strVal  = model1.DrugType
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$lfycs3",
                            strVal  = DrawItems.objToNumStr(model1.OmissiveTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ywfy3",
                            strVal  = model1.Adr
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$fy3",
                            strVal  = model1.AdrEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#bfz3",
                            strVal  = model1.Complication
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$hbz3",
                            strVal  = model1.ComplicationEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzkb3",
                            strVal  = model1.ReferralOrg
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzyy3",
                            strVal  = model1.ReferralReason
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzjg3",
                            strVal  = model1.ReferralResult
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$clyj3",
                            strVal  = model1.HandleView
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$xcsfsj3",
                            strVal  = DrawItems.strToDate(model1.NextVisitDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sfys3",
                            strVal  = model1.VisitDoctor
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&qm3",
                            strVal  = string.Format("{0}{1}_3_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&sfys3",
                            strVal  = string.Format("{0}{1}_3_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        //滕州无签字版
                        list.Add(new ListValue
                        {
                            strMark = "$qm3",
                            strVal  = model.CustomerName
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$sfys3",
                            strVal  = model2.VisitDoctor
                        });
                    }
                    model1 = new ChronicLungerVisitBLL().GetModelByOutKey(model2.ID, "4");

                    if (model1 != null)
                    {
                        list.Add(new ListValue
                        {
                            strMark = "$sfrq4",
                            strVal  = DrawItems.strToDate(model1.FollowupDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$m4",
                            strVal  = DrawItems.objToNumStr(model1.CureMonth, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ddryxz4",
                            strVal  = model1.Supervisor
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#sffs4",
                            strVal  = model1.FollowupWay
                        });

                        string strSymptom4 = "";
                        if (!string.IsNullOrEmpty(model1.Symptom))
                        {
                            foreach (string str in model1.Symptom.Split(new char[] { ',' }))
                            {
                                if (!string.IsNullOrEmpty(str))
                                {
                                    strSymptom4 += (int.Parse(str) - 1).ToString() + ",";
                                }
                            }
                            strSymptom4 = strSymptom4.Remove(strSymptom4.Length - 1);
                        }
                        list.Add(new ListValue
                        {
                            strMark = "#zz4",
                            strVal  = strSymptom4
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%zzqt4",
                            strVal  = model1.SymptomEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$y4",
                            strVal  = DrawItems.objToNumStr(model1.SmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$ny4",
                            strVal  = DrawItems.objToNumStr(model1.NextSmokeDayNum, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$j4",
                            strVal  = DrawItems.objToNumStr(model1.DayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$nj4",
                            strVal  = DrawItems.objToNumStr(model1.NextDayDrinkVolume, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "%hlfa4",
                            strVal  = model1.ChemotherapyScheme
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#yf4",
                            strVal  = model1.MedicationCompliance
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ypjx4",
                            strVal  = model1.DrugType
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$lfycs4",
                            strVal  = DrawItems.objToNumStr(model1.OmissiveTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#ywfy4",
                            strVal  = model1.Adr
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$fy4",
                            strVal  = model1.AdrEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#bfz4",
                            strVal  = model1.Complication
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$hbz4",
                            strVal  = model1.ComplicationEx
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzkb4",
                            strVal  = model1.ReferralOrg
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzyy4",
                            strVal  = model1.ReferralReason
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$zzjg4",
                            strVal  = model1.ReferralResult
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$clyj4",
                            strVal  = model1.HandleView
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$xcsfsj4",
                            strVal  = DrawItems.strToDate(model1.NextVisitDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sfys4",
                            strVal  = model1.VisitDoctor
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$cxtzsj",
                            strVal  = DrawItems.strToDate(model1.StopCureDate)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "#tzyi",
                            strVal  = model1.StopCureReason
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$yfscs",
                            strVal  = DrawItems.objToNumStr(model1.ShouldVisitTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sjfscs",
                            strVal  = DrawItems.objToNumStr(model1.VisitTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$yfcs",
                            strVal  = DrawItems.objToNumStr(model1.ShouldPharmacyTimes, 0)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$sfcs",
                            strVal  = DrawItems.objToNumStr(model1.PharmacyTimes, 0)
                        });


                        list.Add(new ListValue
                        {
                            strMark = "$fyl",
                            strVal  = DrawItems.objToNumStr(model1.PharmacyRate, 2)
                        });

                        list.Add(new ListValue
                        {
                            strMark = "$pgys1",
                            strVal  = model1.EstimateDoctor
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&qm4",
                            strVal  = string.Format("{0}{1}_4_{2}.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        list.Add(new ListValue
                        {
                            strMark = "&sfys4",
                            strVal  = string.Format("{0}{1}_4_{2}_Doc.png", SignPath, model2.IDCardNo, Convert.ToDateTime(model1.FollowupDate).ToString("yyyyMMdd"))
                        });
                        //滕州无签字版
                        list.Add(new ListValue
                        {
                            strMark = "$qm4",
                            strVal  = model.CustomerName
                        });
                        list.Add(new ListValue
                        {
                            strMark = "$sfys4",
                            strVal  = model2.VisitDoctor
                        });
                    }
                }
            }

            return(DrawItems.setPage("printXps\\26肺结核患者随访服务记录表.xps", list));
        }
Ejemplo n.º 29
0
        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));
        }
Ejemplo n.º 30
0
        private void btndataupload_Click(object sender, EventArgs e)
        {
            string strwhere = "";

            if (this.ckbcheckdate.Checked)
            {
                strwhere = string.Format(" CheckDate BETWEEN '{0}' and '{1}' ",
                                         this.dtpstart.Value.Date.ToString("yyyy-MM-dd"), this.dtpend.Value.Date.ToString("yyyy-MM-dd"));
            }

            DataSet customds = new RecordsCustomerBaseInfoBLL().GetList(strwhere);

            int amount = 0;

            progressBar1.Visible   = true;
            progressBar1.Minimum   = 0;
            progressBar1.Maximum   = customds.Tables[0].Rows.Count;
            progressBar1.BackColor = Color.Green;
            labCountnum.Text       = customds.Tables[0].Rows.Count.ToString();

            foreach (DataRow row in customds.Tables[0].Rows)
            {
                int OutKey = Convert.ToInt32(row["ID"].ToString());

                if (string.IsNullOrEmpty(row["IDCardNo"].ToString()))
                {
                    continue;
                }

                // 基本信息
                RecordsBaseInfoModel Model = new RecordsBaseInfoBLL().GetModel(row["IDCardNo"].ToString());
                if (Model == null)
                {
                    Model = new RecordsBaseInfoModel();
                }

                // 一般状况
                RecordsGeneralConditionModel generalConditionModel = new RecordsGeneralConditionBLL().GetModelByOutKey(OutKey);
                if (generalConditionModel == null)
                {
                    generalConditionModel = new RecordsGeneralConditionModel();
                }

                ChronicDiadetesVisitModel diabetesModel = new ChronicDiadetesVisitModel();

                diabetesModel.IDCardNo     = row["IDCardNo"].ToString();
                diabetesModel.Hypertension = generalConditionModel.RightHeight;
                diabetesModel.Hypotension  = generalConditionModel.RightPre;
                diabetesModel.BMI          = generalConditionModel.BMI;
                diabetesModel.Weight       = generalConditionModel.Weight;
                diabetesModel.Hight        = generalConditionModel.Height;

                if (diabetesModel.BMI != null)
                {
                    if (diabetesModel.BMI >= 24)
                    {
                        diabetesModel.TargetWeight = diabetesModel.Weight - 5;
                    }
                }

                // 生活方式
                RecordsLifeStyleModel lifeModel = new RecordsLifeStyleBLL().GetModelByOutKey(OutKey);
                if (lifeModel == null)
                {
                    lifeModel = new RecordsLifeStyleModel();
                }

                if (lifeModel.SmokeCondition == "3")
                {
                    diabetesModel.DailySmokeNum = lifeModel.SmokeDayNum;
                }
                else
                {
                    diabetesModel.DailySmokeNum = 0;
                }

                if (lifeModel.DrinkRate == "2" || lifeModel.DrinkRate == "3" || lifeModel.DrinkRate == "4")
                {
                    diabetesModel.DailyDrinkNum = lifeModel.DayDrinkVolume;
                }
                else
                {
                    diabetesModel.DailyDrinkNum = 0;
                }

                diabetesModel.DailySmokeNumTarget      = 0;
                diabetesModel.DailyDrinkNumTarget      = 0;
                diabetesModel.SportTimePerWeekTarget   = 7;
                diabetesModel.SportPerMinuteTimeTarget = 60;

                // 辅助检查
                RecordsAssistCheckModel AssistCheck = new RecordsAssistCheckBLL().GetModelByOutKey(OutKey);
                if (AssistCheck == null)
                {
                    AssistCheck = new RecordsAssistCheckModel();
                }

                diabetesModel.FPG   = AssistCheck.FPGL;
                diabetesModel.HbAlc = AssistCheck.HBALC;

                new ChronicDiadetesVisitBLL().UpdateDate(diabetesModel);

                ChronicHypertensionVisitModel hypertensionModel = new ChronicHypertensionVisitModel();
                hypertensionModel.Hypertension = generalConditionModel.RightHeight;
                hypertensionModel.Hypotension  = generalConditionModel.RightPre;
                hypertensionModel.BMI          = generalConditionModel.BMI;
                hypertensionModel.Weight       = generalConditionModel.Weight;
                hypertensionModel.Hight        = generalConditionModel.Height;

                if (hypertensionModel.BMI != null)
                {
                    if (hypertensionModel.BMI >= 24)
                    {
                        hypertensionModel.WeightTarGet = hypertensionModel.Weight - 5;
                    }
                }
                if (AssistCheck.FPGL != null)
                {
                    hypertensionModel.AssistantExam = $"空腹血糖:{AssistCheck.FPGL}mmol/L";
                }

                // 查体
                RecordsPhysicalExamModel physicalModel = new RecordsPhysicalExamBLL().GetModelByOutKey(OutKey);
                if (physicalModel == null)
                {
                    physicalModel = new RecordsPhysicalExamModel();
                }

                decimal dd = 0;
                if (!string.IsNullOrEmpty(physicalModel.HeartRate))
                {
                    if (decimal.TryParse(physicalModel.HeartRate, out dd))
                    {
                        hypertensionModel.HeartRate = dd;
                    }
                }

                if (lifeModel.SmokeCondition == "3")
                {
                    hypertensionModel.DailySmokeNum = lifeModel.SmokeDayNum;
                }
                else
                {
                    hypertensionModel.DailySmokeNum = 0;
                }

                if (lifeModel.DrinkRate == "2" || lifeModel.DrinkRate == "3" || lifeModel.DrinkRate == "4")
                {
                    hypertensionModel.DailyDrinkNum = lifeModel.DayDrinkVolume;
                }
                else
                {
                    hypertensionModel.DailyDrinkNum = 0;
                }

                hypertensionModel.DailySmokeNumTarget       = 0;
                hypertensionModel.DailyDrinkNumTarget       = 0;
                hypertensionModel.SportTimeSperWeekTarget   = 7;
                hypertensionModel.SportPerMinutesTimeTarget = 60;
                hypertensionModel.IDCardNo = row["IDCardNo"].ToString();

                new ChronicHypertensionVisitBLL().UpdateDate(hypertensionModel);

                amount++;
                labUploadnum.Text  = amount.ToString();
                progressBar1.Value = amount;
            }

            MessageBox.Show("成功匹配:" + amount + "条数据!", "提示");
            progressBar1.Visible = false;
        }