Esempio n. 1
0
        public RecordsSignatureModel GetModel(string IDCardNo)
        {
            DataSet ds = this.dal.GetModel(IDCardNo);
            RecordsSignatureModel model = null;

            if (ds != null && ds.Tables.Count > 0)
            {
                List <RecordsSignatureModel> list = CommonExtensions.ToList <RecordsSignatureModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    model = list[0];
                }
            }

            return(model);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public bool Update(RecordsSignatureModel model)
 {
     return(this.dal.Update(model));
 }
Esempio n. 4
0
 public int Add(RecordsSignatureModel model)
 {
     return(this.dal.Add(model));
 }
Esempio n. 5
0
        public bool Update(RecordsSignatureModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update ARCHIVE_SIGNATURE set ");
            builder.Append("PhysicalID=@PhysicalID,");
            builder.Append("IDCardNo=@IDCardNo,");
            builder.Append("SymptomSn=@SymptomSn,");
            builder.Append("GeneralConditionSn=@GeneralConditionSn,");
            builder.Append("LifeStyleSn=@LifeStyleSn,");
            builder.Append("OrgansFunctionSn=@OrgansFunctionSn,");
            builder.Append("PEyebseSn=@PEyebseSn,");
            builder.Append("PSkinSn=@PSkinSn,");
            builder.Append("PDigtalExamSn=@PDigtalExamSn,");
            builder.Append("PBreastSn=@PBreastSn,");
            builder.Append("PGynecologySn=@PGynecologySn,");
            builder.Append("PhysicalQtSn=@PhysicalQtSn,");
            builder.Append("ABloodRoutineSn=@ABloodRoutineSn,");
            builder.Append("AMAUSn=@AMAUSn,");
            builder.Append("AECGSn=@AECGSn,");
            builder.Append("AChestXraySn=@AChestXraySn,");
            builder.Append("ABtypeUltrasonicSn=@ABtypeUltrasonicSn,");
            builder.Append("ABtypeQtSn=@ABtypeQtSn,");
            builder.Append("ASmearSn=@ASmearSn,");
            builder.Append("AssistQtSn=@AssistQtSn,");
            builder.Append("InpatientCareSn=@InpatientCareSn,");
            builder.Append("DrugNonimmunitySn=@DrugNonimmunitySn,");
            builder.Append("HealthAssessmentSn=@HealthAssessmentSn,");
            builder.Append("HealthGuidanceSn=@HealthGuidanceSn,");
            builder.Append("SelfSn=@SelfSn,");
            builder.Append("DependentSn=@DependentSn,");
            builder.Append("PersonalFb=@PersonalFb,");
            builder.Append("DoctorSn=@DoctorSn,");
            builder.Append("FeedbackDate=@FeedbackDate, ");
            builder.Append("BloodLiverKidneySn=@BloodLiverKidneySn, ");
            builder.Append("ExamineDoctor=@ExamineDoctor,");
            builder.Append("ECGExamineDoctor=@ECGExamineDoctor,");
            builder.Append("PhysiqueSn=@PhysiqueSn");

            if (model.OutKey == 0)
            {
                builder.Append(" WHERE OutKey IS NULL ");
            }
            else
            {
                builder.Append(" WHERE OutKey=@OutKey ");
            }

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@PhysicalID", MySqlDbType.String, 8),
                new MySqlParameter("@IDCardNo", MySqlDbType.String, 21),
                new MySqlParameter("@SymptomSn", MySqlDbType.String, 100),
                new MySqlParameter("@GeneralConditionSn", MySqlDbType.String, 100),
                new MySqlParameter("@LifeStyleSn", MySqlDbType.String, 100),
                new MySqlParameter("@OrgansFunctionSn", MySqlDbType.String, 100),
                new MySqlParameter("@PEyebseSn", MySqlDbType.String, 100),
                new MySqlParameter("@PSkinSn", MySqlDbType.String, 100),
                new MySqlParameter("@PDigtalExamSn", MySqlDbType.String, 100),
                new MySqlParameter("@PBreastSn", MySqlDbType.String, 100),
                new MySqlParameter("@PGynecologySn", MySqlDbType.String, 100),
                new MySqlParameter("@PhysicalQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@ABloodRoutineSn", MySqlDbType.String, 100),
                new MySqlParameter("@AMAUSn", MySqlDbType.String, 100),
                new MySqlParameter("@AECGSn", MySqlDbType.String, 100),
                new MySqlParameter("@AChestXraySn", MySqlDbType.String, 100),
                new MySqlParameter("@ABtypeUltrasonicSn", MySqlDbType.String, 100),
                new MySqlParameter("@ABtypeQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@ASmearSn", MySqlDbType.String, 100),
                new MySqlParameter("@AssistQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@InpatientCareSn", MySqlDbType.String, 100),
                new MySqlParameter("@DrugNonimmunitySn", MySqlDbType.String, 100),
                new MySqlParameter("@HealthAssessmentSn", MySqlDbType.String, 100),
                new MySqlParameter("@HealthGuidanceSn", MySqlDbType.String, 100),
                new MySqlParameter("@SelfSn", MySqlDbType.String, 100),
                new MySqlParameter("@DependentSn", MySqlDbType.String, 100),
                new MySqlParameter("@PersonalFb", MySqlDbType.String),
                new MySqlParameter("@DoctorSn", MySqlDbType.String),
                new MySqlParameter("@FeedbackDate", MySqlDbType.Date),
                new MySqlParameter("@BloodLiverKidneySn", MySqlDbType.String),
                new MySqlParameter("@ExamineDoctor", MySqlDbType.String, 20),
                new MySqlParameter("@ECGExamineDoctor", MySqlDbType.String, 20),
                new MySqlParameter("@PhysiqueSn", MySqlDbType.String, 20),
                new MySqlParameter("@OutKey", MySqlDbType.Int32, 4)
            };

            cmdParms[0].Value  = model.PhysicalID;
            cmdParms[1].Value  = model.IDCardNo;
            cmdParms[2].Value  = model.SymptomSn;
            cmdParms[3].Value  = model.GeneralConditionSn;
            cmdParms[4].Value  = model.LifeStyleSn;
            cmdParms[5].Value  = model.OrgansFunctionSn;
            cmdParms[6].Value  = model.PEyebseSn;
            cmdParms[7].Value  = model.PSkinSn;
            cmdParms[8].Value  = model.PDigtalExamSn;
            cmdParms[9].Value  = model.PBreastSn;
            cmdParms[10].Value = model.PGynecologySn;
            cmdParms[11].Value = model.PhysicalQtSn;
            cmdParms[12].Value = model.ABloodRoutineSn;
            cmdParms[13].Value = model.AMAUSn;
            cmdParms[14].Value = model.AECGSn;
            cmdParms[15].Value = model.AChestXraySn;
            cmdParms[16].Value = model.ABtypeUltrasonicSn;
            cmdParms[17].Value = model.ABtypeQtSn;
            cmdParms[18].Value = model.ASmearSn;
            cmdParms[19].Value = model.AssistQtSn;
            cmdParms[20].Value = model.InpatientCareSn;
            cmdParms[21].Value = model.DrugNonimmunitySn;
            cmdParms[22].Value = model.HealthAssessmentSn;
            cmdParms[23].Value = model.HealthGuidanceSn;
            cmdParms[24].Value = model.SelfSn;
            cmdParms[25].Value = model.DependentSn;
            cmdParms[26].Value = model.PersonalFb;
            cmdParms[27].Value = model.DoctorSn;
            cmdParms[28].Value = model.FeedbackDate;
            cmdParms[29].Value = model.BloodLiverKidneySn;
            cmdParms[30].Value = model.ExamineDoctor;
            cmdParms[31].Value = model.ECGExamineDoctor;
            cmdParms[32].Value = model.PhysiqueSn;
            cmdParms[33].Value = model.OutKey;

            return(MySQLHelper.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
Esempio n. 6
0
        public int Add(RecordsSignatureModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("INSERT INTO ARCHIVE_SIGNATURE(");
            builder.Append("PhysicalID,IDCardNo,SymptomSn,GeneralConditionSn,LifeStyleSn,OrgansFunctionSn,PEyebseSn,PSkinSn,");
            builder.Append("PDigtalExamSn,PBreastSn,PGynecologySn,PhysicalQtSn,ABloodRoutineSn,AMAUSn,AECGSn,AChestXraySn,");
            builder.Append("ABtypeUltrasonicSn,ABtypeQtSn,ASmearSn,AssistQtSn,InpatientCareSn,DrugNonimmunitySn,HealthAssessmentSn,");
            builder.Append("HealthGuidanceSn,SelfSn,DependentSn,PersonalFb,DoctorSn,FeedbackDate,OutKey,BloodLiverKidneySn,ExamineDoctor,ECGExamineDoctor,PhysiqueSn)");
            builder.Append(" VALUES (");
            builder.Append("@PhysicalID,@IDCardNo,@SymptomSn,@GeneralConditionSn,@LifeStyleSn,@OrgansFunctionSn,@PEyebseSn,");
            builder.Append("@PSkinSn,@PDigtalExamSn,@PBreastSn,@PGynecologySn,@PhysicalQtSn,@ABloodRoutineSn,@AMAUSn,@AECGSn,");
            builder.Append("@AChestXraySn,@ABtypeUltrasonicSn,@ABtypeQtSn,@ASmearSn,@AssistQtSn,@InpatientCareSn,");
            builder.Append("@DrugNonimmunitySn,@HealthAssessmentSn,@HealthGuidanceSn,@SelfSn,@DependentSn,@PersonalFb,");
            builder.Append("@DoctorSn,@FeedbackDate,@OutKey,@BloodLiverKidneySn,@ExamineDoctor,@ECGExamineDoctor,@PhysiqueSn)");
            builder.Append(";SELECT @@IDENTITY");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@PhysicalID", MySqlDbType.String, 8),
                new MySqlParameter("@IDCardNo", MySqlDbType.String, 21),
                new MySqlParameter("@SymptomSn", MySqlDbType.String, 100),
                new MySqlParameter("@GeneralConditionSn", MySqlDbType.String, 100),
                new MySqlParameter("@LifeStyleSn", MySqlDbType.String, 100),
                new MySqlParameter("@OrgansFunctionSn", MySqlDbType.String, 100),
                new MySqlParameter("@PEyebseSn", MySqlDbType.String, 100),
                new MySqlParameter("@PSkinSn", MySqlDbType.String, 100),
                new MySqlParameter("@PDigtalExamSn", MySqlDbType.String, 100),
                new MySqlParameter("@PBreastSn", MySqlDbType.String, 100),
                new MySqlParameter("@PGynecologySn", MySqlDbType.String, 100),
                new MySqlParameter("@PhysicalQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@ABloodRoutineSn", MySqlDbType.String, 100),
                new MySqlParameter("@AMAUSn", MySqlDbType.String, 100),
                new MySqlParameter("@AECGSn", MySqlDbType.String, 100),
                new MySqlParameter("@AChestXraySn", MySqlDbType.String, 100),
                new MySqlParameter("@ABtypeUltrasonicSn", MySqlDbType.String, 100),
                new MySqlParameter("@ABtypeQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@ASmearSn", MySqlDbType.String, 100),
                new MySqlParameter("@AssistQtSn", MySqlDbType.String, 100),
                new MySqlParameter("@InpatientCareSn", MySqlDbType.String, 100),
                new MySqlParameter("@DrugNonimmunitySn", MySqlDbType.String, 100),
                new MySqlParameter("@HealthAssessmentSn", MySqlDbType.String, 100),
                new MySqlParameter("@HealthGuidanceSn", MySqlDbType.String, 100),
                new MySqlParameter("@SelfSn", MySqlDbType.String, 100),
                new MySqlParameter("@DependentSn", MySqlDbType.String, 100),
                new MySqlParameter("@PersonalFb", MySqlDbType.String),
                new MySqlParameter("@DoctorSn", MySqlDbType.String),
                new MySqlParameter("@FeedbackDate", MySqlDbType.Date),
                new MySqlParameter("@BloodLiverKidneySn", MySqlDbType.String),
                new MySqlParameter("@OutKey", MySqlDbType.Int32, 4),
                new MySqlParameter("@ExamineDoctor", MySqlDbType.VarChar, 20),
                new MySqlParameter("@ECGExamineDoctor", MySqlDbType.VarChar, 20),
                new MySqlParameter("@PhysiqueSn", MySqlDbType.VarChar, 20)
            };

            cmdParms[0].Value  = model.PhysicalID;
            cmdParms[1].Value  = model.IDCardNo;
            cmdParms[2].Value  = model.SymptomSn;
            cmdParms[3].Value  = model.GeneralConditionSn;
            cmdParms[4].Value  = model.LifeStyleSn;
            cmdParms[5].Value  = model.OrgansFunctionSn;
            cmdParms[6].Value  = model.PEyebseSn;
            cmdParms[7].Value  = model.PSkinSn;
            cmdParms[8].Value  = model.PDigtalExamSn;
            cmdParms[9].Value  = model.PBreastSn;
            cmdParms[10].Value = model.PGynecologySn;
            cmdParms[11].Value = model.PhysicalQtSn;
            cmdParms[12].Value = model.ABloodRoutineSn;
            cmdParms[13].Value = model.AMAUSn;
            cmdParms[14].Value = model.AECGSn;
            cmdParms[15].Value = model.AChestXraySn;
            cmdParms[16].Value = model.ABtypeUltrasonicSn;
            cmdParms[17].Value = model.ABtypeQtSn;
            cmdParms[18].Value = model.ASmearSn;
            cmdParms[19].Value = model.AssistQtSn;
            cmdParms[20].Value = model.InpatientCareSn;
            cmdParms[21].Value = model.DrugNonimmunitySn;
            cmdParms[22].Value = model.HealthAssessmentSn;
            cmdParms[23].Value = model.HealthGuidanceSn;
            cmdParms[24].Value = model.SelfSn;
            cmdParms[25].Value = model.DependentSn;
            cmdParms[26].Value = model.PersonalFb;
            cmdParms[27].Value = model.DoctorSn;
            cmdParms[28].Value = model.FeedbackDate;
            cmdParms[29].Value = model.BloodLiverKidneySn;
            cmdParms[30].Value = model.ExamineDoctor;
            cmdParms[31].Value = model.ECGExamineDoctor;
            cmdParms[32].Value = model.PhysiqueSn;

            if (model.OutKey == 0)
            {
                cmdParms[0].Value = DBNull.Value;
            }
            else
            {
                cmdParms[30].Value = model.OutKey;
            }

            object single = MySQLHelper.GetSingle(builder.ToString(), cmdParms);

            if (single == null)
            {
                return(0);
            }

            return(Convert.ToInt32(single));
        }