/// <summary>
        /// 更新终端资料库中的脏器资料--五官
        /// </summary>
        /// <param name="model"></param>
        /// <param name="RecordDate"></param>
        /// <returns></returns>
        public void InsertByMouth(RecordsVisceraFunctionModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"
                            INSERT INTO
                                ARCHIVE_VISCERAFUNCTION
                            (
                                PhysicalID
                                ,IDCardNo
                                ,Lips
                                ,ToothResides
                                ,Pharyngeal
                                ,LeftView
                                ,Listen
                                ,RightView
                                ,LeftEyecorrect
                                ,RightEyecorrect
                                ,OutKey
                                ,HypodontiaEx
                                ,SaprodontiaEx
                                ,DentureEx
                            )
                            VALUES
                             (
                                @PhysicalID
                                ,@IDCardNo
                                ,@Lips
                                ,@ToothResides
                                ,@Pharyngeal
                                ,@LeftView
                                ,@Listen
                                ,@RightView
                                ,@LeftEyecorrect
                                ,@RightEyecorrect
                                ,@OutKey
                                ,@HypodontiaEx
                                ,@SaprodontiaEx
                                ,@DentureEx
                            ) ");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@Lips", model.Lips),
                new MySqlParameter("@ToothResides", model.ToothResides),
                new MySqlParameter("@HypodontiaEx", model.HypodontiaEx),
                new MySqlParameter("@SaprodontiaEx", model.SaprodontiaEx),
                new MySqlParameter("@DentureEx", model.DentureEx),
                new MySqlParameter("@Pharyngeal", model.Pharyngeal),
                new MySqlParameter("@Listen", model.Listen),
                new MySqlParameter("@LeftView", model.LeftView),
                new MySqlParameter("@RightView", model.RightView),
                new MySqlParameter("@LeftEyecorrect", model.LeftEyecorrect),
                new MySqlParameter("@RightEyecorrect", model.RightEyecorrect),
                new MySqlParameter("@IDCardNo", model.IDCardNo),
                new MySqlParameter("@OutKey", model.OutKey),
                new MySqlParameter("@PhysicalID", model.PhysicalID)
            };

            MySQLHelper.ExecuteSql(builder.ToString(), cmdParms);
        }
Example #2
0
        public int AddServer(RecordsVisceraFunctionModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into ARCHIVE_VISCERAFUNCTION(");
            builder.Append("PhysicalID,IDCardNo,Lips,ToothResides,ToothResidesOther,Pharyngeal,LeftView,Listen,RightView,SportFunction,LeftEyecorrect,RightEyecorrect,OutKey,HypodontiaEx,SaprodontiaEx,DentureEx,LipsEx,PharyngealEx )");
            builder.Append(" values (");
            builder.Append("@PhysicalID,@IDCardNo,@Lips,@ToothResides,@ToothResidesOther,@Pharyngeal,@LeftView,@Listen,@RightView,@SportFunction,@LeftEyecorrect,@RightEyecorrect,@OutKey,@HypodontiaEx,@SaprodontiaEx,@DentureEx,@LipsEx,@PharyngealEx )");
            builder.Append(";select @@IDENTITY");
            MySqlParameter[] cmdParms = new MySqlParameter[]
            {
                new MySqlParameter("@PhysicalID", MySqlDbType.String, 8),
                new MySqlParameter("@IDCardNo", MySqlDbType.String, 21),
                new MySqlParameter("@Lips", MySqlDbType.String, 1),
                new MySqlParameter("@ToothResides", MySqlDbType.String, 100),
                new MySqlParameter("@ToothResidesOther", MySqlDbType.String, 200),
                new MySqlParameter("@Pharyngeal", MySqlDbType.String, 1),
                new MySqlParameter("@LeftView", MySqlDbType.Decimal),
                new MySqlParameter("@Listen", MySqlDbType.String, 1),
                new MySqlParameter("@RightView", MySqlDbType.Decimal),
                new MySqlParameter("@SportFunction", MySqlDbType.String, 1),
                new MySqlParameter("@LeftEyecorrect", MySqlDbType.Decimal),
                new MySqlParameter("@RightEyecorrect", MySqlDbType.Decimal),
                new MySqlParameter("@OutKey", MySqlDbType.Int32, 4),
                new MySqlParameter("@HypodontiaEx", MySqlDbType.String, 100),
                new MySqlParameter("@SaprodontiaEx", MySqlDbType.String, 100),
                new MySqlParameter("@DentureEx", MySqlDbType.String, 100),
                new MySqlParameter("@LipsEx", MySqlDbType.String, 100),
                new MySqlParameter("@PharyngealEx", MySqlDbType.String, 100)
            };
            cmdParms[0].Value  = model.PhysicalID;
            cmdParms[1].Value  = model.IDCardNo;
            cmdParms[2].Value  = model.Lips;
            cmdParms[3].Value  = model.ToothResides;
            cmdParms[4].Value  = model.ToothResidesOther;
            cmdParms[5].Value  = model.Pharyngeal;
            cmdParms[6].Value  = model.LeftView;
            cmdParms[7].Value  = model.Listen;
            cmdParms[8].Value  = model.RightView;
            cmdParms[9].Value  = model.SportFunction;
            cmdParms[10].Value = model.LeftEyecorrect;
            cmdParms[11].Value = model.RightEyecorrect;
            cmdParms[12].Value = model.OutKey;
            cmdParms[13].Value = model.HypodontiaEx;  //缺齿
            cmdParms[14].Value = model.SaprodontiaEx; //龋齿
            cmdParms[15].Value = model.DentureEx;     //义齿
            cmdParms[16].Value = model.LipsEx;        //口唇其他
            cmdParms[17].Value = model.PharyngealEx;  //咽部其他
            object single = MySQLHelper.GetSingleServer(builder.ToString(), cmdParms);

            if (single == null)
            {
                return(0);
            }
            return(Convert.ToInt32(single));
        }
Example #3
0
        /// <summary>
        /// 更新终端资料库中的脏器资料--五官
        /// </summary>
        /// <param name="model"></param>
        /// <param name="RecordDate"></param>
        /// <returns></returns>
        public bool UpdateByMouth(RecordsVisceraFunctionModel model, string RecordDate)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"
                            UPDATE 
                                ARCHIVE_VISCERAFUNCTION D
                            SET 
                                Lips = @Lips
                                ,ToothResides= @ToothResides
                                ,Pharyngeal= @Pharyngeal
                                ,LeftView= @LeftView
                                ,Listen= @Listen
                                ,RightView= @RightView
                                ,LeftEyecorrect= @LeftEyecorrect
                                ,RightEyecorrect= @RightEyecorrect
                                ,HypodontiaEx = @HypodontiaEx
                                ,SaprodontiaEx = @SaprodontiaEx
                                ,DentureEx = @DentureEx
                            WHERE 
                                D.OUTKEY=
                                (
                                    SELECT 
                                        M.ID 
                                    FROM
                                        ARCHIVE_CUSTOMERBASEINFO M 
                                    WHERE  
                                        IFNULL(M.IsDel,'')!='Y'
                                        AND M.IDCardNo =@IDCardNo 
                                        AND LEFT(M.CheckDate,4) = @CheckDate 
                                        order by M.CheckDate DESC LIMIT 0,1 
                                );  ");
            if (Convert.ToString(RecordDate).Length > 3)
            {
                RecordDate = RecordDate.Substring(0, 4);
            }
            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@Lips", model.Lips),
                new MySqlParameter("@ToothResides", model.ToothResides),
                new MySqlParameter("@HypodontiaEx", model.HypodontiaEx),
                new MySqlParameter("@SaprodontiaEx", model.SaprodontiaEx),
                new MySqlParameter("@DentureEx", model.DentureEx),
                new MySqlParameter("@Pharyngeal", model.Pharyngeal),
                new MySqlParameter("@Listen", model.Listen),
                new MySqlParameter("@LeftView", model.LeftView),
                new MySqlParameter("@RightView", model.RightView),
                new MySqlParameter("@LeftEyecorrect", model.LeftEyecorrect),
                new MySqlParameter("@RightEyecorrect", model.RightEyecorrect),
                new MySqlParameter("@IDCardNo", model.IDCardNo),
                new MySqlParameter("@CheckDate", RecordDate)
            };

            return(MySQLHelper.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
        public List <RecordsVisceraFunctionModel> DataTableToList(DataTable dt)
        {
            List <RecordsVisceraFunctionModel> list = new List <RecordsVisceraFunctionModel>();
            int count = dt.Rows.Count;

            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    RecordsVisceraFunctionModel item = this.dal.DataRowToModel(dt.Rows[i]);
                    if (item != null)
                    {
                        list.Add(item);
                    }
                }
            }
            return(list);
        }
        public bool UpdateVsiual(RecordsVisceraFunctionModel model)
        {
            StringBuilder builder = new StringBuilder();

            List <MySqlParameter> ilistStr = new List <MySqlParameter>();

            MySqlParameter[] cmdParms = new MySqlParameter[] { };

            builder.Append(@"UPDATE ARCHIVE_VISCERAFUNCTION SET 
                                     IDCardNo=IDCardNo  ");

            if (model.LeftView.HasValue)
            {
                builder.Append(",LeftView=@LeftView");
                ilistStr.Add(new MySqlParameter("@LeftView", model.LeftView));
            }
            if (model.LeftEyecorrect.HasValue)
            {
                builder.Append(",LeftEyecorrect=@LeftEyecorrect");
                ilistStr.Add(new MySqlParameter("@LeftEyecorrect", model.LeftEyecorrect));
            }
            if (model.RightView.HasValue)
            {
                builder.Append(",RightView=@RightView");
                ilistStr.Add(new MySqlParameter("@RightView", model.RightView));
            }
            if (model.RightEyecorrect.HasValue)
            {
                builder.Append(",RightEyecorrect=@RightEyecorrect");
                ilistStr.Add(new MySqlParameter("@RightEyecorrect", model.RightEyecorrect));
            }

            builder.Append(" WHERE IDCardNo = @IDCardNo AND OutKey = @OutKey");

            ilistStr.Add(new MySqlParameter("@IDCardNo", model.IDCardNo));
            ilistStr.Add(new MySqlParameter("@OutKey", model.OutKey));

            cmdParms = ilistStr.ToArray();

            return(MySQLHelper.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
        /// <summary>
        /// 更新终端资料库中的脏器资料--五官
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateByMouth(RecordsVisceraFunctionModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"
                            UPDATE 
                                ARCHIVE_VISCERAFUNCTION D
                            SET 
                                Lips = @Lips
                                ,ToothResides= @ToothResides
                                ,Pharyngeal= @Pharyngeal
                                ,LeftView= @LeftView
                                ,Listen= @Listen
                                ,RightView= @RightView
                                ,LeftEyecorrect= @LeftEyecorrect
                                ,RightEyecorrect= @RightEyecorrect
                                ,HypodontiaEx = @HypodontiaEx
                                ,SaprodontiaEx = @SaprodontiaEx
                                ,DentureEx = @DentureEx
                            WHERE 
                              OutKey=@OutKey  ");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@Lips", model.Lips),
                new MySqlParameter("@ToothResides", model.ToothResides),
                new MySqlParameter("@HypodontiaEx", model.HypodontiaEx),
                new MySqlParameter("@SaprodontiaEx", model.SaprodontiaEx),
                new MySqlParameter("@DentureEx", model.DentureEx),
                new MySqlParameter("@Pharyngeal", model.Pharyngeal),
                new MySqlParameter("@Listen", model.Listen),
                new MySqlParameter("@LeftView", model.LeftView),
                new MySqlParameter("@RightView", model.RightView),
                new MySqlParameter("@LeftEyecorrect", model.LeftEyecorrect),
                new MySqlParameter("@RightEyecorrect", model.RightEyecorrect),
                new MySqlParameter("@IDCardNo", model.IDCardNo),
                new MySqlParameter("@OutKey", model.OutKey)
            };

            return(MySQLHelper.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
Example #7
0
        public bool UpdateByTJMiniPad(RecordsVisceraFunctionModel model, string checkDate) //体检问询同步
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"UPDATE 
                                    ARCHIVE_VISCERAFUNCTION  D
                             SET 
                                 Lips=@Lips,ToothResides=@ToothResides,Pharyngeal=@Pharyngeal,
                                 Listen=@Listen,SportFunction=@SportFunction,HypodontiaEx=@HypodontiaEx,
                                 SaprodontiaEx=@SaprodontiaEx,DentureEx=@DentureEx 
                             WHERE
                                    EXISTS
                                    (
                                        SELECT 
                                            ID 
                                        FROM
                                        ARCHIVE_CUSTOMERBASEINFO M
                                        WHERE M.ID = D.OutKey
                                        AND M.IDCardNo = @IDCardNo
                                        AND M.CheckDate = @CheckDate
                                    )
                            ");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@IDCardNo", model.IDCardNo),
                new MySqlParameter("@CheckDate", checkDate),
                new MySqlParameter("@Lips", model.Lips),
                new MySqlParameter("@ToothResides", model.ToothResides),
                new MySqlParameter("@Pharyngeal", model.Pharyngeal),
                new MySqlParameter("@Listen", model.Listen),
                new MySqlParameter("@SportFunction", model.SportFunction),
                new MySqlParameter("@HypodontiaEx", model.HypodontiaEx),
                new MySqlParameter("@SaprodontiaEx", model.SaprodontiaEx),
                new MySqlParameter("@DentureEx", model.DentureEx)
            };

            return(MySQLHelper.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
Example #8
0
 /// <summary>
 /// 更新终端资料库中的脏器资料--五官
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateByMouth(RecordsVisceraFunctionModel model)
 {
     return(this.dal.UpdateByMouth(model));
 }
Example #9
0
        public bool UpdateServer(RecordsVisceraFunctionModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update ARCHIVE_VISCERAFUNCTION set ");
            builder.Append("PhysicalID=@PhysicalID,");
            builder.Append("IDCardNo=@IDCardNo,");
            builder.Append("Lips=@Lips,");
            builder.Append("ToothResides=@ToothResides,");
            builder.Append("Pharyngeal=@Pharyngeal,");
            builder.Append("LeftView=@LeftView,");
            builder.Append("Listen=@Listen,");
            builder.Append("RightView=@RightView,");
            builder.Append("SportFunction=@SportFunction,");
            builder.Append("LeftEyecorrect=@LeftEyecorrect,");
            builder.Append("RightEyecorrect=@RightEyecorrect,");
            builder.Append("ToothResidesOther=@ToothResidesOther,");
            builder.Append("HypodontiaEx=@HypodontiaEx,");
            builder.Append("SaprodontiaEx=@SaprodontiaEx,");
            builder.Append("DentureEx=@DentureEx,");
            builder.Append("LipsEx=@LipsEx, ");
            builder.Append("PharyngealEx=@PharyngealEx ");
            builder.Append(" where IDCardNo=@IDCardNo");
            MySqlParameter[] cmdParms = new MySqlParameter[]
            {
                new MySqlParameter("@PhysicalID", MySqlDbType.String, 8),
                new MySqlParameter("@IDCardNo", MySqlDbType.String, 21),
                new MySqlParameter("@Lips", MySqlDbType.String, 1),
                new MySqlParameter("@ToothResides", MySqlDbType.String, 100),
                new MySqlParameter("@Pharyngeal", MySqlDbType.String, 1),
                new MySqlParameter("@LeftView", MySqlDbType.Decimal),
                new MySqlParameter("@Listen", MySqlDbType.String, 1),
                new MySqlParameter("@RightView", MySqlDbType.Decimal),
                new MySqlParameter("@SportFunction", MySqlDbType.String, 1),
                new MySqlParameter("@LeftEyecorrect", MySqlDbType.Decimal),
                new MySqlParameter("@RightEyecorrect", MySqlDbType.Decimal),
                new MySqlParameter("@ToothResidesOther", MySqlDbType.String, 200),
                new MySqlParameter("@HypodontiaEx", MySqlDbType.String, 100),
                new MySqlParameter("@SaprodontiaEx", MySqlDbType.String, 100),
                new MySqlParameter("@DentureEx", MySqlDbType.String, 100),
                new MySqlParameter("@LipsEx", MySqlDbType.String, 100),
                new MySqlParameter("@PharyngealEx", MySqlDbType.String, 100)
                // new MySqlParameter("@ID", MySqlDbType.Int32, 8)
            };
            cmdParms[0].Value  = model.PhysicalID;
            cmdParms[1].Value  = model.IDCardNo;
            cmdParms[2].Value  = model.Lips;
            cmdParms[3].Value  = model.ToothResides;
            cmdParms[4].Value  = model.Pharyngeal;
            cmdParms[5].Value  = model.LeftView;
            cmdParms[6].Value  = model.Listen;
            cmdParms[7].Value  = model.RightView;
            cmdParms[8].Value  = model.SportFunction;
            cmdParms[9].Value  = model.LeftEyecorrect;
            cmdParms[10].Value = model.RightEyecorrect;
            cmdParms[11].Value = model.ToothResidesOther;
            cmdParms[12].Value = model.HypodontiaEx;
            cmdParms[13].Value = model.SaprodontiaEx;
            cmdParms[14].Value = model.DentureEx;
            cmdParms[15].Value = model.LipsEx;
            cmdParms[16].Value = model.PharyngealEx;
            //cmdParms[12].Value = model.ID;
            return(MySQLHelper.ExecuteSqlServer(builder.ToString(), cmdParms) > 0);
        }
Example #10
0
        public void SavePhysical(string IDCardNo, DateTime CheckDate, string VersionNo, string barCode = "")
        {
            try
            {
                DataTable dsRequire = new RequireBLL().GetList("TabName = '健康体检' ").Tables[0];
                DataView  dv        = dsRequire.DefaultView;

                // 获取最后一次体检数据
                RecordsCustomerBaseInfoModel customerOldModel = CustomerBaseInfoBLL.GetMaxModel(IDCardNo);
                if (customerOldModel == null)
                {
                    customerOldModel = new RecordsCustomerBaseInfoModel();
                }
                RecordsCustomerBaseInfoModel customerNewModel = new RecordsCustomerBaseInfoModel();

                customerNewModel.IDCardNo       = IDCardNo;
                customerNewModel.CheckDate      = CheckDate;
                customerNewModel.CustomerID     = barCode;
                customerNewModel.Doctor         = ConfigHelper.GetNode("doctorName");
                customerNewModel.CreateBy       = ConfigHelper.GetNodeDec("doctor");
                customerNewModel.CreateDate     = DateTime.Now;
                customerNewModel.LastUpdateBy   = ConfigHelper.GetNodeDec("doctor");
                customerNewModel.LastUpdateDate = DateTime.Now;

                #region 一般状况

                dv.RowFilter = "Comment='一般状况' AND (IsSetValue='是' OR IsSetValue='预设上次体检') AND OptionName='Symptom' ";
                DataTable dt = dv.ToTable();

                // 栏位名遍历默认项配置
                foreach (DataRow item in dt.Rows)
                {
                    if (item["IsSetValue"].ToString() == "是")
                    {
                        customerNewModel.Symptom = item["ItemValue"].ToString();
                    }
                    else
                    {
                        customerNewModel.Symptom = customerOldModel.Symptom;
                        customerNewModel.Other   = customerOldModel.Other;
                    }
                }

                dv.RowFilter = null;
                dv.RowFilter = "Comment='一般状况' AND (IsSetValue='是' OR IsSetValue='预设上次体检') AND OptionName<>'Symptom' ";
                dt           = dv.ToTable();
                RecordsGeneralConditionModel gerneralOldModel = GeneralConditionBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsGeneralConditionModel gerneralNewModel = new RecordsGeneralConditionModel();

                gerneralNewModel = EntityAssignment <RecordsGeneralConditionModel>(gerneralOldModel, gerneralNewModel, dt);

                #endregion

                #region 生活方式

                dv.RowFilter = null;
                dv.RowFilter = "Comment='生活方式' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                RecordsLifeStyleModel lifeStyleOldModel = LifeStyleBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsLifeStyleModel lifeStyleNewModel = new RecordsLifeStyleModel();
                if (lifeStyleOldModel == null)
                {
                    lifeStyleOldModel = new RecordsLifeStyleModel();
                }

                lifeStyleNewModel = EntityAssignment <RecordsLifeStyleModel>(lifeStyleOldModel, lifeStyleNewModel, dt);

                #endregion

                #region 查体信息

                dv.RowFilter = null;
                dv.RowFilter = "Comment='查体信息' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                RecordsPhysicalExamModel physicalExamOldModel = PhysicalExamBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsPhysicalExamModel physicalExamNewModel = new RecordsPhysicalExamModel();
                if (physicalExamOldModel == null)
                {
                    physicalExamOldModel = new RecordsPhysicalExamModel();
                }

                physicalExamNewModel = EntityAssignment <RecordsPhysicalExamModel>(physicalExamOldModel, physicalExamNewModel, dt);

                #endregion

                #region 辅助检查

                dv.RowFilter = null;
                dv.RowFilter = "Comment='辅助检查' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                RecordsAssistCheckModel assistCheckOldModel = AssistCheckBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsAssistCheckModel assistCheckNewModel = new RecordsAssistCheckModel();
                if (assistCheckOldModel == null)
                {
                    assistCheckOldModel = new RecordsAssistCheckModel();
                }

                assistCheckNewModel = EntityAssignment <RecordsAssistCheckModel>(assistCheckOldModel, assistCheckNewModel, dt);

                #endregion

                #region 脏器功能

                dv.RowFilter = null;
                dv.RowFilter = "Comment='脏器功能' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                RecordsVisceraFunctionModel visceraOldModel = VisceraFunctionBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsVisceraFunctionModel visceraNewModel = new RecordsVisceraFunctionModel();
                if (visceraOldModel == null)
                {
                    visceraOldModel = new RecordsVisceraFunctionModel();
                }

                visceraNewModel = EntityAssignment <RecordsVisceraFunctionModel>(visceraOldModel, visceraNewModel, dt);

                #endregion

                #region 中医体质

                RecordsMediPhysDistModel mediPhysDistModel = new RecordsMediPhysDistModel();

                #endregion

                #region 健康评价

                RecordsAssessmentGuideModel assessmentGuideModel = new RecordsAssessmentGuideModel();

                #endregion

                #region 健康问题

                dv.RowFilter = null;
                dv.RowFilter = "Comment='健康问题' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                RecordsHealthQuestionModel questionOldModel = HealthQuestionBLL.GetModelByOutKey(customerOldModel.ID);
                RecordsHealthQuestionModel questionNewModel = new RecordsHealthQuestionModel();
                if (questionOldModel == null)
                {
                    questionOldModel = new RecordsHealthQuestionModel();
                }

                questionNewModel = EntityAssignment <RecordsHealthQuestionModel>(questionOldModel, questionNewModel, dt);

                #endregion

                #region 住院史、用药情况

                dv.RowFilter = null;
                dv.RowFilter = "Comment='治疗情况' AND (IsSetValue='是' OR IsSetValue='预设上次体检' OR IsSetValue='预设随访用药') ";
                dt           = dv.ToTable();

                // 获取list model对象,用来获取最后一次体检数据的值
                List <RecordsHospitalHistoryModel> hospitalHistoryOld = HospitalHistoryBLL.GetModelList(
                    string.Format("IDCardNo='{0}' AND OutKey={1}", IDCardNo, customerOldModel.ID));
                List <RecordsFamilyBedHistoryModel> familyBedHistoryInfoOld = FamilyBedHistoryBLL.GetModelList(
                    string.Format("IDCardNo='{0}' AND OutKey={1}", IDCardNo, customerOldModel.ID));
                List <RecordsMedicationModel> medicationOld = MedicationBLL.GetModelList(
                    string.Format("IDCardNo='{0}' AND OutKey={1}", IDCardNo, customerOldModel.ID));

                if (hospitalHistoryOld == null)
                {
                    hospitalHistoryOld = new List <RecordsHospitalHistoryModel>();
                }
                if (familyBedHistoryInfoOld == null)
                {
                    familyBedHistoryInfoOld = new List <RecordsFamilyBedHistoryModel>();
                }
                if (medicationOld == null)
                {
                    medicationOld = new List <RecordsMedicationModel>();
                }

                #region 随访用药

                List <RecordsMedicationModel> medicationFollowUp = new List <RecordsMedicationModel>();

                // 高血压随访
                ChronicHypertensionVisitModel HyperModel = new ChronicHypertensionVisitBLL().GetMaxModel(IDCardNo, VersionNo);

                if (HyperModel != null)
                {
                    List <ChronicDrugConditionModel> DrugConditions = new ChronicDrugConditionBLL().GetModelList(
                        string.Format(" IDCardNo='{0}' AND Type='{1}' AND OutKey='{2}' ", IDCardNo, "1", HyperModel.ID));

                    foreach (ChronicDrugConditionModel drugModel in DrugConditions)
                    {
                        RecordsMedicationModel newModel = new RecordsMedicationModel
                        {
                            MedicinalName = drugModel.Name,
                            UseNum        = drugModel.DosAge,
                            IDCardNo      = IDCardNo
                        };

                        medicationFollowUp.Add(newModel);
                    }
                }

                // 糖尿病随访
                ChronicDiadetesVisitModel DiaModel = new ChronicDiadetesVisitBLL().GetMaxModel(IDCardNo);

                if (DiaModel != null)
                {
                    List <ChronicDrugConditionModel> DiaDrugConditions = new ChronicDrugConditionBLL().GetModelList(
                        string.Format(" IDCardNo='{0}' AND Type='{1}' AND OutKey='{2}' ", IDCardNo, "2", DiaModel.ID));

                    foreach (ChronicDrugConditionModel drugModel in DiaDrugConditions)
                    {
                        RecordsMedicationModel newModel = new RecordsMedicationModel
                        {
                            MedicinalName = drugModel.Name,
                            UseNum        = drugModel.DosAge,
                            IDCardNo      = IDCardNo
                        };

                        medicationFollowUp.Add(newModel);
                    }
                }

                #endregion

                // 用于存储需存档的体检数据
                List <RecordsHospitalHistoryModel>  hospitalHistoryNew      = new List <RecordsHospitalHistoryModel>();
                List <RecordsFamilyBedHistoryModel> familyBedHistoryInfoNew = new List <RecordsFamilyBedHistoryModel>();
                List <RecordsMedicationModel>       medicationNew           = new List <RecordsMedicationModel>();

                // 临时存储住院史的默认值
                RecordsHospitalHistoryModel hModel = new RecordsHospitalHistoryModel();

                //通过栏位名,遍历默认项配置
                foreach (DataRow item in dt.Rows)
                {
                    switch (item["ChinName"].ToString())
                    {
                    case "住院史":
                        if (item["IsSetValue"].ToString() == "是")
                        {
                            if (!string.IsNullOrEmpty(item["ItemValue"].ToString()))
                            {
                                string[] resList = item["ItemValue"].ToString().Split(';');

                                if (resList.Length > 4)
                                {
                                    hModel.InHospitalDate  = Convert.ToDateTime(resList[0].ToString());
                                    hModel.OutHospitalDate = Convert.ToDateTime(resList[1].ToString());
                                    hModel.Reason          = resList[2].ToString();
                                    hModel.HospitalName    = resList[3].ToString();
                                    hModel.IllcaseNum      = resList[4].ToString();
                                }
                                else if (resList.Length == 1)
                                {
                                    hModel.Reason = resList[0].ToString();
                                }

                                hospitalHistoryNew.Add(hModel);
                            }
                        }
                        else
                        {
                            hospitalHistoryNew = hospitalHistoryOld;
                        }
                        break;

                    case "家庭病床史":
                        if (item["IsSetValue"].ToString() == "预设上次体检")
                        {
                            familyBedHistoryInfoNew = familyBedHistoryInfoOld;
                        }
                        break;

                    case "用药情况":
                        if (item["IsSetValue"].ToString() == "预设上次体检")
                        {
                            medicationNew = medicationOld;
                        }
                        else if (item["IsSetValue"].ToString() == "预设随访用药")
                        {
                            medicationNew = medicationFollowUp;
                        }
                        break;

                    default:
                        break;
                    }
                }

                #endregion

                #region 预防接种史

                dv.RowFilter = null;
                dv.RowFilter = "Comment='健康评价' AND (IsSetValue='是' OR IsSetValue='预设上次体检') ";
                dt           = dv.ToTable();
                List <RecordsInoculationHistoryModel> inoculationHistoryOld = InoculationHistoryBLL.GetModelList(
                    string.Format("IDCardNo='{0}' AND OutKey={1}", IDCardNo, customerOldModel.ID));
                if (inoculationHistoryOld == null)
                {
                    inoculationHistoryOld = new List <RecordsInoculationHistoryModel>();
                }

                List <RecordsInoculationHistoryModel> inoculationHistoryNew = new List <RecordsInoculationHistoryModel>();

                foreach (DataRow item in dt.Rows)
                {
                    switch (item["ChinName"].ToString())
                    {
                    case "非免疫预防接种史":
                        if (item["IsSetValue"].ToString() == "预设上次体检")
                        {
                            inoculationHistoryNew = inoculationHistoryOld;
                        }
                        break;
                    }
                }

                #endregion

                #region 保存默认值

                // 体检主档保存
                int id = CustomerBaseInfoBLL.Add(customerNewModel);

                if (id > 0)
                {
                    // 一般状况
                    gerneralNewModel.IDCardNo = IDCardNo;
                    gerneralNewModel.OutKey   = id;
                    GeneralConditionBLL.Add(gerneralNewModel, VersionNo);

                    // 生活方式
                    lifeStyleNewModel.IDCardNo = IDCardNo;
                    lifeStyleNewModel.OutKey   = id;
                    LifeStyleBLL.Add(lifeStyleNewModel);

                    // 查体信息
                    physicalExamNewModel.IDCardNo = IDCardNo;
                    physicalExamNewModel.OutKey   = id;
                    PhysicalExamBLL.Add(physicalExamNewModel);

                    // 辅助检查
                    assistCheckNewModel.IDCardNo = IDCardNo;
                    assistCheckNewModel.OutKey   = id;
                    AssistCheckBLL.Add(assistCheckNewModel);

                    // 脏器功能
                    visceraNewModel.IDCardNo = IDCardNo;
                    visceraNewModel.OutKey   = id;
                    VisceraFunctionBLL.Add(visceraNewModel);

                    // 中医体质
                    mediPhysDistModel.IDCardNo = IDCardNo;
                    mediPhysDistModel.OutKey   = id;
                    MediPhysDistBLL.Add(mediPhysDistModel);

                    // 健康问题
                    questionNewModel.IDCardNo = IDCardNo;
                    questionNewModel.OutKey   = id;
                    HealthQuestionBLL.Add(questionNewModel);

                    // 健康评价
                    assessmentGuideModel.IDCardNo = IDCardNo;
                    assessmentGuideModel.OutKey   = id;
                    AssessmentGuideBLL.Add(assessmentGuideModel);

                    // 住院史
                    if (hospitalHistoryNew.Count > 0)
                    {
                        foreach (RecordsHospitalHistoryModel recordsInoculationHistoryModel in hospitalHistoryNew)
                        {
                            recordsInoculationHistoryModel.OutKey   = id;
                            recordsInoculationHistoryModel.IDCardNo = IDCardNo;
                        }

                        HospitalHistoryBLL.AddList(hospitalHistoryNew);
                    }

                    // 家庭住院史
                    if (familyBedHistoryInfoNew.Count > 0)
                    {
                        foreach (RecordsFamilyBedHistoryModel model in familyBedHistoryInfoNew)
                        {
                            model.OutKey   = id;
                            model.IDCardNo = IDCardNo;
                        }

                        FamilyBedHistoryBLL.AddList(familyBedHistoryInfoNew);
                    }

                    // 用药
                    if (medicationNew.Count > 0)
                    {
                        foreach (RecordsMedicationModel model in medicationNew)
                        {
                            model.OutKey   = id;
                            model.IDCardNo = IDCardNo;
                        }

                        MedicationBLL.AddList(medicationNew);
                    }

                    // 接种史
                    if (inoculationHistoryNew.Count > 0)
                    {
                        foreach (RecordsInoculationHistoryModel model in inoculationHistoryNew)
                        {
                            model.OutKey   = id;
                            model.IDCardNo = IDCardNo;
                        }

                        InoculationHistoryBLL.AddList(inoculationHistoryNew);
                    }
                }

                #endregion
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog(ex.ToString());
                throw ex;
            }
        }
 public int AddServer(RecordsVisceraFunctionModel model)
 {
     return(this.dal.AddServer(model));
 }
 public bool UpdateByTJMiniPad(RecordsVisceraFunctionModel model, string checkDate) //Ìå¼ìÎÊѯͬ²½
 {
     return(this.dal.UpdateByTJMiniPad(model, checkDate));
 }
 public bool UpdateServer(RecordsVisceraFunctionModel model)
 {
     return(this.dal.UpdateServer(model));
 }
 public bool UpdateVsiual(RecordsVisceraFunctionModel model)
 {
     return(dal.UpdateVsiual(model));
 }
Example #15
0
 /// <summary>
 /// 新增终端资料库中的脏器资料--五官
 /// </summary>
 /// <param name="model"></param>
 /// <param name="RecordDate"></param>
 /// <returns></returns>
 public void InsertByMouth(RecordsVisceraFunctionModel model)
 {
     this.dal.InsertByMouth(model);
 }
Example #16
0
        public RecordsVisceraFunctionModel DataRowToModel(DataRow row)
        {
            RecordsVisceraFunctionModel recordsVisceraFunctionModel = new RecordsVisceraFunctionModel();

            if (row != null)
            {
                if (((row["ID"] != null) && (row["ID"] != DBNull.Value)) && (row["ID"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.ID = int.Parse(row["ID"].ToString());
                }
                if (((row["OutKey"] != null) && (row["OutKey"] != DBNull.Value)) && (row["OutKey"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.OutKey = int.Parse(row["OutKey"].ToString());
                }
                if ((row["PhysicalID"] != null) && (row["PhysicalID"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.PhysicalID = row["PhysicalID"].ToString();
                }
                if ((row["IDCardNo"] != null) && (row["IDCardNo"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.IDCardNo = row["IDCardNo"].ToString();
                }
                if ((row["Lips"] != null) && (row["Lips"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.Lips = row["Lips"].ToString();
                }
                if ((row["ToothResides"] != null) && (row["ToothResides"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.ToothResides = row["ToothResides"].ToString();
                }
                if ((row["ToothResidesOther"] != null) && (row["ToothResidesOther"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.ToothResidesOther = row["ToothResidesOther"].ToString();
                }
                if ((row["Pharyngeal"] != null) && (row["Pharyngeal"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.Pharyngeal = row["Pharyngeal"].ToString();
                }
                if (((row["LeftView"] != null) && (row["LeftView"] != DBNull.Value)) && (row["LeftView"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.LeftView = new decimal?(decimal.Parse(row["LeftView"].ToString()));
                }
                if ((row["Listen"] != null) && (row["Listen"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.Listen = row["Listen"].ToString();
                }
                if (((row["RightView"] != null) && (row["RightView"] != DBNull.Value)) && (row["RightView"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.RightView = new decimal?(decimal.Parse(row["RightView"].ToString()));
                }
                if ((row["SportFunction"] != null) && (row["SportFunction"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.SportFunction = row["SportFunction"].ToString();
                }
                if (((row["LeftEyecorrect"] != null) && (row["LeftEyecorrect"] != DBNull.Value)) && (row["LeftEyecorrect"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.LeftEyecorrect = new decimal?(decimal.Parse(row["LeftEyecorrect"].ToString()));
                }
                if (((row["RightEyecorrect"] != null) && (row["RightEyecorrect"] != DBNull.Value)) && (row["RightEyecorrect"].ToString() != ""))
                {
                    recordsVisceraFunctionModel.RightEyecorrect = new decimal?(decimal.Parse(row["RightEyecorrect"].ToString()));
                }
                if ((row["HypodontiaEx"] != null) && (row["HypodontiaEx"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.HypodontiaEx = row["HypodontiaEx"].ToString();
                }
                if ((row["DentureEx"] != null) && (row["DentureEx"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.DentureEx = row["DentureEx"].ToString();
                }
                if ((row["SaprodontiaEx"] != null) && (row["SaprodontiaEx"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.SaprodontiaEx = row["SaprodontiaEx"].ToString();
                }
                if ((row["LipsEx"] != null) && (row["LipsEx"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.LipsEx = row["LipsEx"].ToString();
                }
                if ((row["PharyngealEx"] != null) && (row["PharyngealEx"] != DBNull.Value))
                {
                    recordsVisceraFunctionModel.PharyngealEx = row["PharyngealEx"].ToString();
                }
            }
            return(recordsVisceraFunctionModel);
        }
Example #17
0
        private void pictureBoxDataupload_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)
            {
                if (string.IsNullOrEmpty(row["IDCardNo"].ToString()))
                {
                    continue;
                }

                int OutKey = Convert.ToInt32(row["ID"].ToString());

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

                // 健康评价
                this.AssessmentGuides = new RecordsAssessmentGuideBLL().GetModelByOutKey(OutKey);

                if (this.AssessmentGuides == null)
                {
                    this.AssessmentGuides = new RecordsAssessmentGuideModel();
                }

                this.AssessmentGuides.IDCardNo = this.Model.IDCardNo;

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

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

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

                // 现存健康问题
                this.questionModel = new RecordsHealthQuestionBLL().GetModelByOutKey(OutKey);
                if (this.questionModel == null)
                {
                    this.questionModel = new RecordsHealthQuestionModel();
                }

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

                //脏器功能
                this.visceraFunctionModel = new RecordsVisceraFunctionBLL().GetModelByOutKey(OutKey);
                if (this.visceraFunctionModel == null)
                {
                    this.visceraFunctionModel = new RecordsVisceraFunctionModel();
                }
                AssessmentGuides.IsNormal      = "1";
                AssessmentGuides.Exception1    = null;
                AssessmentGuides.Exception2    = null;
                AssessmentGuides.Exception3    = null;
                AssessmentGuides.Exception4    = null;
                AssessmentGuides.HealthGuide   = null;
                AssessmentGuides.DangerControl = null;
                AssessmentGuides.Arm           = null;
                AssessmentGuides.VaccineAdvice = null;
                AssessmentGuides.Other         = null;
                AssessmentGuides.WaistlineArm  = null;

                #region  赋值给RecordsManageMentModel

                RecordsManageMentModel.Symptom            = row["Symptom"].ToString();
                RecordsManageMentModel.Other              = row["Other"].ToString();
                RecordsManageMentModel.BMI                = this.generalconditionmodel.BMI;
                RecordsManageMentModel.RightHeight        = this.generalconditionmodel.RightHeight;
                RecordsManageMentModel.RightPre           = this.generalconditionmodel.RightPre;
                RecordsManageMentModel.LeftHeight         = this.generalconditionmodel.LeftHeight;
                RecordsManageMentModel.LeftPre            = this.generalconditionmodel.LeftPre;
                RecordsManageMentModel.Waistline          = this.generalconditionmodel.Waistline;
                RecordsManageMentModel.Height             = this.generalconditionmodel.Height;
                RecordsManageMentModel.PulseRate          = this.generalconditionmodel.PulseRate;
                RecordsManageMentModel.Weight             = this.generalconditionmodel.Weight;
                RecordsManageMentModel.OldSelfCareability = this.generalconditionmodel.OldSelfCareability;
                RecordsManageMentModel.DrinkRate          = this.liftModel.DrinkRate;
                RecordsManageMentModel.SmokeCondition     = this.liftModel.SmokeCondition;
                RecordsManageMentModel.ExerciseRate       = this.liftModel.ExerciseRate;

                if (this.liftModel.ExerciseTimes.HasValue)
                {
                    RecordsManageMentModel.ExerciseTimes = this.liftModel.ExerciseTimes.ToString();
                }
                else
                {
                    RecordsManageMentModel.ExerciseTimes = "";
                }

                RecordsManageMentModel.DietaryHabit = this.liftModel.DietaryHabit;
                RecordsManageMentModel.ECG          = this.AssistCheck.ECG;
                RecordsManageMentModel.ECGEx        = "";

                if (!string.IsNullOrEmpty(this.AssistCheck.ECG))
                {
                    if (this.AssistCheck.ECG.Contains("2"))
                    {
                        RecordsManageMentModel.ECGEx += "ST-T改变,";
                    }
                    if (this.AssistCheck.ECG.Contains("3"))
                    {
                        RecordsManageMentModel.ECGEx += "陈旧性心肌梗塞,";
                    }
                    if (this.AssistCheck.ECG.Contains("4"))
                    {
                        RecordsManageMentModel.ECGEx += "窦性心动过速,";
                    }
                    if (this.AssistCheck.ECG.Contains("5"))
                    {
                        RecordsManageMentModel.ECGEx += "窦性心动过缓,";
                    }
                    if (this.AssistCheck.ECG.Contains("6"))
                    {
                        RecordsManageMentModel.ECGEx += "早搏,";
                    }
                    if (this.AssistCheck.ECG.Contains("7"))
                    {
                        RecordsManageMentModel.ECGEx += "房颤,";
                    }
                    if (this.AssistCheck.ECG.Contains("8"))
                    {
                        RecordsManageMentModel.ECGEx += "房室传导阻滞,";
                    }
                    if (this.AssistCheck.ECG.Contains("9"))
                    {
                        RecordsManageMentModel.ECGEx += this.AssistCheck.ECGEx;
                    }
                }
                else
                {
                    RecordsManageMentModel.ECGEx = "";
                }

                RecordsManageMentModel.BCHAO      = this.AssistCheck.BCHAO;
                RecordsManageMentModel.BCHAOEx    = this.AssistCheck.BCHAOEx;
                RecordsManageMentModel.PRO        = this.AssistCheck.PRO;
                RecordsManageMentModel.GLU        = this.AssistCheck.GLU;
                RecordsManageMentModel.KET        = this.AssistCheck.KET;
                RecordsManageMentModel.BLD        = this.AssistCheck.BLD;
                RecordsManageMentModel.UrineOther = this.AssistCheck.UrineOther;
                RecordsManageMentModel.HB         = this.AssistCheck.HB;
                RecordsManageMentModel.WBC        = this.AssistCheck.WBC;
                RecordsManageMentModel.PLT        = this.AssistCheck.PLT;
                RecordsManageMentModel.SGPT       = this.AssistCheck.SGPT;
                RecordsManageMentModel.GOT        = this.AssistCheck.GOT;
                RecordsManageMentModel.BP         = this.AssistCheck.BP;
                RecordsManageMentModel.TBIL       = this.AssistCheck.TBIL;
                RecordsManageMentModel.CB         = this.AssistCheck.CB;
                RecordsManageMentModel.SCR        = this.AssistCheck.SCR;
                RecordsManageMentModel.BUN        = this.AssistCheck.BUN;
                RecordsManageMentModel.PC         = this.AssistCheck.PC;
                RecordsManageMentModel.TC         = this.AssistCheck.TC;
                RecordsManageMentModel.HYPE       = this.AssistCheck.HYPE;
                RecordsManageMentModel.TG         = this.AssistCheck.TG;
                RecordsManageMentModel.GT         = this.AssistCheck.GT;
                RecordsManageMentModel.LowCho     = this.AssistCheck.LowCho;
                RecordsManageMentModel.HeiCho     = this.AssistCheck.HeiCho;
                RecordsManageMentModel.FPGL       = this.AssistCheck.FPGL;
                RecordsManageMentModel.HCY        = this.AssistCheck.HCY;
                RecordsManageMentModel.Other      = this.AssistCheck.Other;

                if (community.Equals("威海美年大健康") && StringPlus.toString(this.AssistCheck.UA) != "")
                {
                    RecordsManageMentModel.UA = this.AssistCheck.UA;
                }

                RecordsManageMentModel.BrainDis      = this.questionModel.BrainDis;
                RecordsManageMentModel.RenalDis      = this.questionModel.RenalDis;
                RecordsManageMentModel.HeartDis      = this.questionModel.HeartDis;
                RecordsManageMentModel.EyeDis        = this.questionModel.EyeDis;
                RecordsManageMentModel.NerveDis      = this.questionModel.NerveDis;
                RecordsManageMentModel.ElseDis       = this.questionModel.ElseDis;
                RecordsManageMentModel.BrainOther    = this.questionModel.BrainOther;
                RecordsManageMentModel.RenalOther    = this.questionModel.RenalOther;
                RecordsManageMentModel.HeartOther    = this.questionModel.HeartOther;
                RecordsManageMentModel.EyeOther      = this.questionModel.EyeOther;
                RecordsManageMentModel.NerveOther    = this.questionModel.NerveOther;
                RecordsManageMentModel.ElseOther     = this.questionModel.ElseOther;
                RecordsManageMentModel.BarrelChest   = this.physicalModel.BarrelChest;  //桶状胸
                RecordsManageMentModel.BreathSounds  = this.physicalModel.BreastEx;     //呼吸音
                RecordsManageMentModel.Rale          = this.physicalModel.Rale;         //罗音
                RecordsManageMentModel.HeartRhythm   = this.physicalModel.HeartRhythm;  //心律
                RecordsManageMentModel.Noise         = this.physicalModel.Noise;        //杂音
                RecordsManageMentModel.PressPain     = this.physicalModel.PressPain;    //压痛
                RecordsManageMentModel.EnclosedMass  = this.physicalModel.EnclosedMass; //包块
                RecordsManageMentModel.Liver         = this.physicalModel.Liver;        //肝大
                RecordsManageMentModel.Spleen        = this.physicalModel.Spleen;       //脾大
                RecordsManageMentModel.Voiced        = this.physicalModel.Voiced;       //移动性浊音
                RecordsManageMentModel.FootBack      = this.physicalModel.FootBack;     //足背动脉搏动
                RecordsManageMentModel.Edema         = this.physicalModel.Edema;        // 下肢水肿
                RecordsManageMentModel.LeftView      = this.visceraFunctionModel.LeftView;
                RecordsManageMentModel.RightView     = this.visceraFunctionModel.RightView;
                RecordsManageMentModel.HeartRate     = this.physicalModel.HeartRate;
                RecordsManageMentModel.Listen        = visceraFunctionModel.Listen;
                RecordsManageMentModel.SportFunction = visceraFunctionModel.SportFunction;

                #endregion

                healthAssessment = new HealthAssessment {
                    Model = this.Model
                };
                olderCnandResult = new OlderCnAndResult();

                // 异常信息
                this.AssessmentGuides = healthAssessment.SetHealthEx(this.AssessmentGuides);

                // 危险因素控制
                this.AssessmentGuides = healthAssessment.SetDangerous(this.AssessmentGuides);

                //随访中医辨识更新
                olderCnandResult.SetCnResult(row["IDCardNo"].ToString());

                // 健康评价异常的更新
                if (this.AssessmentGuides != null)
                {
                    this.AssessmentGuides.OutKey = OutKey;
                    RecordsAssessmentGuideBLL recordsAssessmentGuideBll = new RecordsAssessmentGuideBLL();
                    if (!recordsAssessmentGuideBll.ExistsOutKey(this.AssessmentGuides.IDCardNo, OutKey))
                    {
                        if (recordsAssessmentGuideBll.Add(this.AssessmentGuides) > 0)
                        {
                            amount++;
                            labUploadnum.Text  = amount.ToString();
                            progressBar1.Value = amount;
                        }
                    }
                    else
                    {
                        if (recordsAssessmentGuideBll.Update(this.AssessmentGuides))
                        {
                            amount++;
                            labUploadnum.Text  = amount.ToString();
                            progressBar1.Value = amount;
                        }
                    }
                }
            }

            MessageBox.Show("成功匹配:" + amount + "条数据!", "提示");
            progressBar1.Visible = false;
        }
 /// <summary>
 /// 更新终端资料库中的脏器资料--五官
 /// </summary>
 /// <param name="model"></param>
 /// <param name="RecordDate"></param>
 /// <returns></returns>
 public bool UpdateByMouth(RecordsVisceraFunctionModel model, string RecordDate)
 {
     return(this.dal.UpdateByMouth(model, RecordDate));
 }