public bool SaveModelToDB() { this.SignModel.FeedbackDate = new DateTime?(this.dtFeedbackDate.Value.Date); this.SignModel.SelfSn = Model.CustomerName; if (PhysicalInfoFactory.ID == -1) { return(true); } string strFeedBackDate = Convert.ToDateTime(this.SignModel.FeedbackDate).ToString("yyyyMMdd"); string strSelfPath = String.Format("{0}{1}_{2}_B.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strJsPath = String.Format("{0}{1}_{2}_J.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strFkrPath = String.Format("{0}{1}_{2}_F.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strYsPath = String.Format("{0}{1}_{2}_Doc.png", SignPath, this.Model.IDCardNo, strFeedBackDate); RecordsSignatureBLL SignatureBLL = new RecordsSignatureBLL(); this.SignModel.OutKey = PhysicalInfoFactory.ID; if (!SignatureBLL.Update(this.SignModel)) { SignatureBLL.Add(this.SignModel); } if (!File.Exists(strSelfPath) && File.Exists(this.BaseSelPath)) { File.Copy(this.BaseSelPath, strSelfPath, true); } if (!File.Exists(strFkrPath) && File.Exists(this.PersonalPath)) { File.Copy(this.PersonalPath, strFkrPath, true); } if (!File.Exists(strJsPath) && File.Exists(this.DependentPath)) { File.Copy(this.DependentPath, strJsPath, true); } //保存指纹 if (pictureFinger.Image != null) { Image img = pictureFinger.Image; img.Save(String.Format("{0}{1}{2}_Finger.png", FingerPath, this.Model.IDCardNo, RecordsManageMentModel.CheckDate.ToString("yyyyMMdd"))); } return(true); }
public FixedDocumentSequence getReport() { if (!string.IsNullOrEmpty(this.CardID)) { if (File.Exists("printtemp\\ecg.png")) { File.Delete("printtemp\\ecg.png"); } string xdWhere = string.Format(" IDCardNo='{0}' AND LEFT(CreateTime,4)='{1}' ORDER BY CreateTime DESC,ID DESC LIMIT 0,1 ", this.CardID, DateTime.Now.Year.ToString()); RecordsEcgModel ecgModel = new RecordsEcgBLL().GetModelByWhere(xdWhere); if (ecgModel == null) { ecgModel = new RecordsEcgModel(); } List <ListValue> list = new List <ListValue>(); string path = ECGReport + "\\" + ecgModel.MID + ".png"; if (!File.Exists(path)) { list.Add(new ListValue { strMark = "&ecg", strVal = "" }); } else { //读取文件流 FileStream fs = new System.IO.FileStream(path, FileMode.Open, FileAccess.Read); int byteLength = (int)fs.Length; byte[] fileBytes = new byte[byteLength]; fs.Read(fileBytes, 0, byteLength); //文件流关閉,文件解除锁定 fs.Close(); Image image = Image.FromStream(new MemoryStream(fileBytes)); //if (community.Equals("聊城东昌府区")) //{ Graphics g = Graphics.FromImage(image); #region 禹城 检查医生取文字版,审核医生取手写版,检查日期取心电createTime if (area.Equals("禹城")) { RecordsSignatureModel signModel = new RecordsSignatureBLL().GetModelByOutKey(0, "签字维护"); if (signModel == null) { signModel = new RecordsSignatureModel(); } // 加载检查医生签名 string signPath = SignPath + "_Doctor16.png"; if (File.Exists(signPath)) { //加载检查日期 string imgJianChaKong = SignPath + "_JianChaKongBai.png"; string imgJianChaZi = SignPath + "Date//" + CardID + "_imgJianChaZi.png"; if (!File.Exists(imgJianChaKong)) { //创建一个200*40的空白图 Bitmap b1 = new Bitmap(200, 80); //新建位图zdb1 Graphics g1 = Graphics.FromImage(b1); //创建版b1的Graphics g1.FillRectangle(Brushes.White, new Rectangle(0, 0, 200, 80)); //把b1涂成红色 b1.Save(imgJianChaKong); b1.Dispose(); } if (!File.Exists(SignPath + "Date")) { Directory.CreateDirectory(SignPath + "Date"); } if (File.Exists(imgJianChaZi)) { File.Delete(imgJianChaZi); } Bitmap bitmap = new Bitmap(imgJianChaKong); Graphics gp = Graphics.FromImage(bitmap); Font font = new Font("KaiTi", 40, FontStyle.Bold); SolidBrush sbrush = new SolidBrush(Color.Black); gp.DrawString(signModel.AECGSn, font, sbrush, 10, 2); bitmap.Save(imgJianChaZi); bitmap.Dispose(); Image imgrq = Image.FromFile(imgJianChaZi); g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(imgrq, 300, 1950, imgrq.Width, imgrq.Height); } //加载检查日期 string imgKong = SignPath + "_KongBai.png"; string imgZi = SignPath + "Date//" + CardID + "_imgZi.png"; //绑定检查日期 DateTime checkDate; if (DateTime.TryParse(ecgModel.CreateTime.ToString(), out checkDate)) { // 加载心电检查医生签名 string examinePath = SignPath + "_Doctor16.png"; if (File.Exists(SignPath + checkDate.ToString("yyyy-MM-dd") + "//_Doctor16.png")) { Image img = Image.FromFile(SignPath + checkDate.ToString("yyyy-MM-dd") + "//_Doctor16.png"); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 1300, 1950, img.Width, img.Height); } else { if (File.Exists(examinePath)) { Image img = Image.FromFile(examinePath); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 1300, 1950, img.Width, img.Height); } } if (!File.Exists(imgKong)) { //创建一个200*40的空白图 Bitmap b1 = new Bitmap(200, 40); //新建位图zdb1 Graphics g1 = Graphics.FromImage(b1); //创建版b1的Graphics g1.FillRectangle(Brushes.White, new Rectangle(0, 0, 200, 40)); //把b1涂成红色 b1.Save(imgKong); b1.Dispose(); } if (!File.Exists(SignPath + "Date")) { Directory.CreateDirectory(SignPath + "Date"); } if (File.Exists(imgZi)) { File.Delete(imgZi); } Bitmap bitmap = new Bitmap(imgKong); Graphics gp = Graphics.FromImage(bitmap); string label = checkDate.ToString("yyyy-MM-dd"); Font font = new Font("KaiTi", bitmap.Width / 10, FontStyle.Bold); SolidBrush sbrush = new SolidBrush(Color.Black); gp.DrawString(label, font, sbrush, 10, 2); bitmap.Save(imgZi); bitmap.Dispose(); Image imgrq = Image.FromFile(imgZi); g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(imgrq, 1830, 1950, imgrq.Width, imgrq.Height); } else { // 加载心电检查医生签名 string examinePath = SignPath + "_Doctor16.png"; if (File.Exists(examinePath)) { Image img = Image.FromFile(examinePath); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 1300, 1950, img.Width, img.Height); } } } #endregion #region 乐陵 else if (area.Equals("乐陵")) { // 加载心电医生签名 string signPath = SignPath + "_Doctor16.png"; if (File.Exists(signPath)) { Image img = Image.FromFile(signPath); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 300, 1950, img.Width, img.Height); } // 加载心电检查医生签名 string examinePath = SignPath + "_Doctor23.png"; if (File.Exists(examinePath)) { Image img = Image.FromFile(examinePath); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 1300, 1950, img.Width, img.Height); } //加载检查日期 RecordsCustomerBaseInfoModel model2 = new RecordsCustomerBaseInfoModel(); string strYear = DateTime.Now.Year.ToString(); string strWhere = string.Format(" IDCardNo='{0}'AND LEFT(CheckDate,4)='{1}' ORDER BY CheckDate DESC LIMIT 0,1 ", this.CardID, DateTime.Now.Year); string imgKong = SignPath + "_KongBai.png"; string imgZi = SignPath + "Date//" + CardID + "_imgZi.png"; //获取本年度最新一笔数据 model2 = new RecordsCustomerBaseInfoBLL().GetModelByWhere(strWhere); if (model2 != null) { DateTime checkDate; if (DateTime.TryParse(model2.CheckDate.ToString(), out checkDate)) { if (!File.Exists(imgKong)) { //创建一个200*40的空白图 Bitmap b1 = new Bitmap(200, 40); //新建位图zdb1 Graphics g1 = Graphics.FromImage(b1); //创建版b1的Graphics g1.FillRectangle(Brushes.White, new Rectangle(0, 0, 200, 40)); //把b1涂成红色 b1.Save(imgKong); b1.Dispose(); } if (!File.Exists(SignPath + "Date")) { Directory.CreateDirectory(SignPath + "Date"); } if (File.Exists(imgZi)) { File.Delete(imgZi); } Bitmap bitmap = new Bitmap(imgKong); Graphics gp = Graphics.FromImage(bitmap); string label = checkDate.ToString("yyyy-MM-dd"); Font font = new Font("KaiTi", bitmap.Width / 10, FontStyle.Bold); SolidBrush sbrush = new SolidBrush(Color.Black); gp.DrawString(label, font, sbrush, 10, 2); bitmap.Save(imgZi); bitmap.Dispose(); Image imgrq = Image.FromFile(imgZi); g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(imgrq, 1770, 1960, imgrq.Width, imgrq.Height); } } } #endregion else { // 加载心电医生签名 string signPath = SignPath + "_Doctor16.png"; if (File.Exists(signPath)) { Image img = Image.FromFile(signPath); // 将医生签名拼接到检查医生的位置 g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(img, 300, 1950, img.Width, img.Height); } } // 旋转图片 image.RotateFlip(RotateFlipType.Rotate270FlipNone); fs.Close(); image.Save("printtemp\\ecg.png"); list.Add(new ListValue { strMark = "&ecg", strVal = "printtemp\\ecg.png" }); image.Dispose(); } return(DrawItems.setPage("printXps\\38心电图.xps", list)); } return(null); }
public bool SaveModelToDB() { string date = ""; RecordsSignatureBLL SignatureBLL = new RecordsSignatureBLL(); if (!SignatureBLL.Update(this.SignModel)) { SignatureBLL.Add(this.SignModel); } if (this.dtPersonalFb.Visible) { date = dtPersonalFb.Value.ToString("yyyy-MM-dd"); if (!Directory.Exists(SignPath + date)) { Directory.CreateDirectory(SignPath + date); } } if (dtpCheckDate.Visible) { date = dtpCheckDate.Value.ToString("yyyy-MM-dd"); if (!Directory.Exists(SignPath + date)) { Directory.CreateDirectory(SignPath + date); } SavePicture(pictureBox, "_Doctor"); SavePicture(pictureBox1, "_Doctor1"); SavePicture(pictureBox3, "_Doctor3"); SavePicture(pictureBox4, "_Doctor4"); SavePicture(pictureBox5, "_Doctor5"); SavePicture(pictureBox6, "_Doctor6"); SavePicture(pictureBox7, "_Doctor7"); SavePicture(pictureBox8, "_Doctor8"); SavePicture(pictureBox9, "_Doctor9"); SavePicture(pictureBox10, "_Doctor10"); SavePicture(pictureBox11, "_Doctor11"); SavePicture(pictureBox13, "_Doctor13"); SavePicture(pictureBox16, "_Doctor16"); SavePicture(pictureBox17, "_Doctor17"); SavePicture(pictureBox18, "_Doctor18"); SavePicture(pictureBox19, "_Doctor19"); SavePicture(pictureBox20, "_Doctor20"); SavePicture(pictureBox22, "_Doctor22"); SavePicture(pictureBox23, "_Doctor23"); SavePicture(pictureBox24, "_Doctor24"); if (area.Equals("菏泽")) { SavePicture(pictureBox21, "_Doctor21"); } else if (area.Equals("禹城")) { string[] files = Directory.GetFiles(SignPath2, "*_" + date.Replace("-", "") + "_F.png", SearchOption.AllDirectories); for (int i = 0; i < files.Length; i++) { string fileName = files[i]; pictureBox13.Image.Save(fileName); } } } return(true); }
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)) { PhysicalInfoFactory.ID = int.Parse(view.Row["ID"].ToString()); PhysicalInfoFactory.NewAdd = false; using (PEControler controler = new PEControler(new PhysicalForm(view.Row["IDCardNo"].ToString()), new PhysicalInfoFactory())) { controler.IParentFrm.IShowDialog(); CheckData(); } 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 (MessageBox.Show("确定删除:" + row["CustomerName"].ToString() + "?删除之后的信息将无法恢复!", "删除", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { int BaseID = Convert.ToInt32(row["ID"].ToString()); RecordsGeneralConditionModel GerneralCondition = new RecordsGeneralConditionBLL().GetModelByOutKey(BaseID); if (GerneralCondition != null) { RecordsSelfcareabilityBLL RecordsSelfcareabilityBLL = new RecordsSelfcareabilityBLL(); RecordsSelfcareabilityBLL.Delete(GerneralCondition.SelfID); } RecordsMediPhysDistModel MediPhys = new RecordsMediPhysDistBLL().GetModelByOutKey(BaseID); if (MediPhys != null) { RecordsMedicineCnBLL MedicineCnBLL = new RecordsMedicineCnBLL(); RecordsMedicineResultBLL MedicineResultBLL = new RecordsMedicineResultBLL(); MedicineCnBLL.Delete(MediPhys.MedicineID); MedicineResultBLL.Delete(MediPhys.MedicineResultID); } RecordsSignatureModel Signature = new RecordsSignatureBLL().GetModelByOutKey(BaseID, row["IDCardNo"].ToString()); if (Signature != null) { if (Signature.FeedbackDate.HasValue) { string strfbDate = Convert.ToDateTime(Signature.FeedbackDate).ToString("yyyyMMdd"); string strSign1_Self = String.Format("{0}{1}_{2}_B.png", SignPath, Signature.IDCardNo, strfbDate); if (File.Exists(strSign1_Self)) //如果存在则删除图片 { File.Delete(strSign1_Self); } string strSign1_Js = String.Format("{0}{1}_{2}_J.png", SignPath, Signature.IDCardNo, strfbDate); if (File.Exists(strSign1_Js)) //如果存在则删除图片 { File.Delete(strSign1_Js); } string strSign1_Fkr = String.Format("{0}{1}_{2}_F.png", SignPath, Signature.IDCardNo, strfbDate); if (File.Exists(strSign1_Fkr)) //如果存在则删除图片 { File.Delete(strSign1_Fkr); } string strSign1_Ys = String.Format("{0}{1}_{2}_Doc.png", SignPath, Signature.IDCardNo, strfbDate); if (File.Exists(strSign1_Ys)) //如果存在则删除图片 { File.Delete(strSign1_Ys); } } } new RecordsCustomerBaseInfoBLL().Delete(BaseID); row.Delete(); row.Table.AcceptChanges(); CheckData(); } } } } }
public FixedDocumentSequence getReport() { if (!string.IsNullOrEmpty(this.CardID)) { this.model = new RecordsBaseInfoBLL().GetModel(this.CardID); string strsex = "", strage = ""; if (model.Sex != null) { 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 = "未说明"; } } TimeParser timeParser = new TimeParser(); strage = timeParser.GetAge(model.Birthday); List <ListValue> list = new List <ListValue> { new ListValue { strMark = "$archiveid", strVal = model.RecordID }, new ListValue { strMark = "$name", strVal = model.CustomerName }, new ListValue { strMark = "$idcard", strVal = model.IDCardNo }, new ListValue { strMark = "$xb", strVal = strsex }, new ListValue { strMark = "$nl", strVal = strage } }; string strUnit = ""; string orgcode = ConfigHelper.GetNode("orgCode"); string TownCode = (orgcode.Length < 9) ? "" : orgcode.Substring(0, 9); if (!string.IsNullOrEmpty(TownCode)) { SysOrgTownModel TownModel = new SysOrgTownBLL().GetModel(TownCode); strUnit = TownModel.Name; } list.Add(new ListValue { strMark = "^Unit", strVal = strUnit }); string strYear = DateTime.Now.Year.ToString(); string strPWhere = string.Format("IDCardNo='{0}' and LEFT(CheckDate ,4)='{1}' ORDER BY CheckDate DESC LIMIT 0,1 ", this.CardID, strYear); RecordsCustomerBaseInfoModel model2 = new RecordsCustomerBaseInfoDAL().GetModelByWhere(strPWhere);//获取本年度最新一笔 DataSet AssistDateSet = new DataSet(); if (model2 != null) { list.Add(new ListValue { strMark = "$tjrq", strVal = DrawItems.strToDate(model2.CheckDate, 1) }); AssistDateSet = new RecordsAssistCheckDAL().GetList("OutKey=" + model2.ID); strYear = Convert.ToDateTime(model2.CheckDate).ToString("yyyy"); } else { list.Add(new ListValue { strMark = "$tjrq", strVal = DrawItems.strToDate(DateTime.Now.Date, 1) }); } DataTable dtSH = null; if (File.Exists(Application.StartupPath + "\\SHValueRange.xml")) { DataSet ds = new DataSet(); ds.ReadXml(Application.StartupPath + "\\SHValueRange.xml"); dtSH = ds.Tables[0]; } // 血常规数据 if (AssistDateSet.Tables.Count > 0) { string strXuex = ""; switch (AssistDateSet.Tables[0].Rows[0]["BloodType"].ToString()) { case "1": strXuex = "A型"; break; case "2": strXuex = "B型"; break; case "3": strXuex = "O型"; break; case "4": strXuex = "AB型"; break; default: break; } list.Add(new ListValue { strMark = "$xx", strVal = strXuex }); #region 禹城乙肝五项 if (area == "禹城") { list.Add(new ListValue { strMark = "$xmmc" + num.ToString(), strVal = "乙肝表面抗原" }); if (AssistDateSet.Tables[0].Rows[0]["HBSAG"].ToString() == "1") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "-" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBSAG"].ToString() == "2") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBSAG"].ToString() == "3") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+-" }); } num++; list.Add(new ListValue { strMark = "$xmmc" + num.ToString(), strVal = "乙肝表面抗体" }); if (AssistDateSet.Tables[0].Rows[0]["HBSAB"].ToString() == "1") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "-" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBSAB"].ToString() == "2") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBSAB"].ToString() == "3") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+-" }); } num++; list.Add(new ListValue { strMark = "$xmmc" + num.ToString(), strVal = "乙肝e抗原" }); if (AssistDateSet.Tables[0].Rows[0]["HBEAG"].ToString() == "1") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "-" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBEAG"].ToString() == "2") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBEAG"].ToString() == "3") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+-" }); } num++; list.Add(new ListValue { strMark = "$xmmc" + num.ToString(), strVal = "乙肝e抗体" }); if (AssistDateSet.Tables[0].Rows[0]["HBEAB"].ToString() == "1") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "-" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBEAB"].ToString() == "2") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBEAB"].ToString() == "3") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+-" }); } num++; list.Add(new ListValue { strMark = "$xmmc" + num.ToString(), strVal = "乙肝核心抗体" }); if (AssistDateSet.Tables[0].Rows[0]["HBCAB"].ToString() == "1") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "-" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBCAB"].ToString() == "2") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+" }); } else if (AssistDateSet.Tables[0].Rows[0]["HBCAB"].ToString() == "3") { list.Add(new ListValue { strMark = "$jcjg" + num.ToString(), strVal = "+-" }); } num++; } #endregion // 生化常规数据 if (community.Equals("聊城韩集乡医院")) { list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TP", true)); //总蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "GLB", true)); //球蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "AG", true)); //白球比 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "CB", true)); //直接胆红素 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "IBIL", true)); //间接胆红素 } if (area.Equals("禹城")) { list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "FPGL", true)); //空腹血糖 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TC", true)); //总胆固醇 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TG", true)); //甘油三脂 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "HeiCho", true)); //高密度脂蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "LowCho", true)); //低密度脂蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TP", true)); //总蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "GLB", true)); //球蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "BP", true)); //白蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "AG", true)); //白球比 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "GOT", true)); //血清谷草氨酸 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "SGPT", true)); //血清谷丙氨酸 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "GT", true)); //谷氨酰氨基转肽酶 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TBIL", true)); //总胆红素 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "SCR", true)); //血清肌酐 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "BUN", true)); //血尿素氮 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "UA", true)); //尿酸 XueStart = 26; } else if (area.Equals("乐陵")) { list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "BP", true)); //白蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "CB", true)); //结合胆红素 } if (!area.Equals("禹城")) { list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TBIL", true)); //总胆红素 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "GOT", true)); //血清谷草氨酸 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "SGPT", true)); //血清谷丙氨酸 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TC", true)); //总胆固醇 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "TG", true)); //甘油三脂 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "LowCho", true)); //低密度脂蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "HeiCho", true)); //高密度脂蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "SCR", true)); //血清肌酐 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "BUN", true)); //血尿素氮 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "FPGL", true)); //空腹血糖 } if (community.Equals("威海美年大健康")) { list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "UA", false));//血清尿酸 XueStart = 12; } } // 血常规 num = XueStart; list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "HB", false)); //血红蛋白 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "PLT", false)); //血小板 list.AddRange(CombinData(AssistDateSet.Tables[0], dtSH, "WBC", false)); //白细胞 //血液细胞检测报告 string strWhere = string.Format("IDCardNo='{0}' AND LEFT(TestTime ,4)='{1}' ORDER BY TestTime DESC,ID DESC LIMIT 0,1 ", this.CardID, strYear); DataSet BlooDt = new RecordsxqDAL().GetDT(strWhere); if (BlooDt.Tables.Count > 0) { //血液细胞数据 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "NEU_B", false)); //中性粒细胞百分比 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "LYMPH_B", false)); //淋巴细胞百分比 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MON_B", false)); //单核细胞百分比 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "EOS_B", false)); //嗜酸性粒细胞百分比 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "BAS_B", false)); //嗜碱性粒细胞百分比 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "NEU_N", false)); //中性粒细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "LYMPH_N", false)); //淋巴细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MON_N", false)); //单核细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "EOS_N", false)); //嗜酸性粒细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "BAS_N", false)); //嗜碱性粒细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "RBC", false)); //红细胞数目 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "HCT", false)); //红细胞压积 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MCV", false)); //平均红细胞体积 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MCH", false)); //平均红细胞血红蛋白含量 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MCHC", false)); //平均红细胞血红蛋白浓度 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "RDW_CV", false)); //红细胞分布宽度变异系数 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "RDW_SD", false)); //红细胞分布宽度标准差 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "MPV", false)); //平均血小板体积 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "PDW", false)); //血小板分布宽度 list.AddRange(CombinData(BlooDt.Tables[0], dtSH, "PCT", false)); //血小板压积 } //尿液常规 string strUWhere = string.Format("IDCardNo='{0}' AND Devicetype=33 AND LEFT(UpdateData,4)='{1}' ORDER BY UpdateData DESC,ID DESC LIMIT 0,1 ", this.CardID, strYear); DataSet UrineDt = new DeviceInfoDAL().GetList(strUWhere); if (UrineDt != null && UrineDt.Tables.Count > 0 && UrineDt.Tables[0].Rows.Count > 0) { foreach (DataRow UrineRow in UrineDt.Tables[0].Rows) { list.Add(new ListValue { strMark = "$bxp", strVal = UrineRow["VALUE9"].ToString() }); list.Add(new ListValue { strMark = "$bxpf", strVal = UrineRow["VALUE9"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$yxs", strVal = UrineRow["VALUE8"].ToString() }); list.Add(new ListValue { strMark = "$yxsf", strVal = UrineRow["VALUE8"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$nny", strVal = UrineRow["VALUE1"].ToString() }); list.Add(new ListValue { strMark = "$nnyf", strVal = UrineRow["VALUE1"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$dbz", strVal = UrineRow["VALUE6"].ToString() }); list.Add(new ListValue { strMark = "$dbzf", strVal = UrineRow["VALUE6"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$qx", strVal = UrineRow["VALUE2"].ToString() }); list.Add(new ListValue { strMark = "$qxf", strVal = UrineRow["VALUE2"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$phz", strVal = UrineRow["VALUE7"].ToString() }); list.Add(new ListValue { strMark = "$tt", strVal = UrineRow["VALUE4"].ToString() }); list.Add(new ListValue { strMark = "$ttf", strVal = UrineRow["VALUE4"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$dhs", strVal = UrineRow["VALUE3"].ToString() }); list.Add(new ListValue { strMark = "$dhsf", strVal = UrineRow["VALUE3"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$ptt", strVal = UrineRow["VALUE5"].ToString() }); list.Add(new ListValue { strMark = "$pttf", strVal = UrineRow["VALUE5"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$vss", strVal = UrineRow["VALUE11"].ToString() }); list.Add(new ListValue { strMark = "$vssf", strVal = UrineRow["VALUE11"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$bz", strVal = UrineRow["VALUE10"].ToString() }); foreach (DataRow dtrow in dtSH.Rows) { if (dtrow["code"].ToString() == "SG") { list.Add(new ListValue { strMark = "$bzf", strVal = dtrow["minvalue"].ToString() + "-" + dtrow["maxvalue"].ToString() }); } if (dtrow["code"].ToString() == "PH") { list.Add(new ListValue { strMark = "$phf", strVal = dtrow["minvalue"].ToString() + "-" + dtrow["maxvalue"].ToString() }); } } } } else { if (AssistDateSet.Tables.Count > 0)// { list.Add(new ListValue { strMark = "$dbz", strVal = AssistDateSet.Tables[0].Rows[0]["PRO"].ToString() }); list.Add(new ListValue { strMark = "$dbzf", strVal = AssistDateSet.Tables[0].Rows[0]["PRO"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$ptt", strVal = AssistDateSet.Tables[0].Rows[0]["GLU"].ToString() }); list.Add(new ListValue { strMark = "$pttf", strVal = AssistDateSet.Tables[0].Rows[0]["GLU"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$tt", strVal = AssistDateSet.Tables[0].Rows[0]["KET"].ToString() }); list.Add(new ListValue { strMark = "$ttf", strVal = AssistDateSet.Tables[0].Rows[0]["KET"].ToString().Contains("+") ? "阳性" : "阴性" }); list.Add(new ListValue { strMark = "$qx", strVal = AssistDateSet.Tables[0].Rows[0]["BLD"].ToString() }); list.Add(new ListValue { strMark = "$qxf", strVal = AssistDateSet.Tables[0].Rows[0]["BLD"].ToString().Contains("+") ? "阳性" : "阴性" }); } } list.Add(new ListValue { strMark = "&q1", strVal = SignPath + "_Doctor6.png" }); if (area.Equals("平度") || area.Equals("济南") || area.Equals("禹城")) { list.Add(new ListValue { strMark = "&q2", strVal = SignPath + "_Doctor6.png" }); list.Add(new ListValue { strMark = "&q3", strVal = SignPath + "_Doctor6.png" }); } else if (area.Equals("乐陵") || area.Equals("菏泽") || area.Equals("聊城") || area.Equals("泰安")) { list.Add(new ListValue { strMark = "&q2", strVal = SignPath + "_Doctor6.png" }); list.Add(new ListValue { strMark = "&q3", strVal = SignPath + "_Doctor6.png" }); if (File.Exists(SignPath + "_Doctor22.png")) { list.Add(new ListValue { strMark = "&q4", strVal = SignPath + "_Doctor22.png" }); list.Add(new ListValue { strMark = "&q5", strVal = SignPath + "_Doctor22.png" }); list.Add(new ListValue { strMark = "&q6", strVal = SignPath + "_Doctor22.png" }); } else { RecordsSignatureModel signModel = new RecordsSignatureBLL().GetModel("签字维护"); if (signModel != null) { list.Add(new ListValue { strMark = "$jcys1", strVal = signModel.ExamineDoctor }); list.Add(new ListValue { strMark = "$jcys2", strVal = signModel.ExamineDoctor }); list.Add(new ListValue { strMark = "$jcys3", strVal = signModel.ExamineDoctor }); } } } return(DrawItems.setPage("printXps\\" + this.PrintName, list)); } return(null); }