Пример #1
0
 public SymptomInfoDTO(SymptomInfo symptomInfo, string mac)
 {   //mac
     this.clientId = mac;
     //V1表信息
     this.fkUserId     = symptomInfo.Fk_User_Id.ToString();
     this.gmtCreate    = symptomInfo.Gmt_Create.ToString().Replace("/", "-");
     this.gmtModified  = symptomInfo.Gmt_Modified.ToString().Replace("/", "-");
     this.pkSiId       = symptomInfo.Pk_SI_Id.ToString();
     this.siCareinfo   = symptomInfo.SI_CareInfo.ToString();
     this.siInquiry    = symptomInfo.SI_Inquiry.ToString();
     this.siIsjoin     = symptomInfo.SI_IsJoin.ToString();
     this.siWaterinput = symptomInfo.SI_WaterInput.ToString();
     //V2表信息
     this.fkTIId            = symptomInfo.Fk_TI_Id.ToString();
     this.siPreAnimalheat   = symptomInfo.SI_Pre_AnimalHeat.ToString();
     this.siPreHeartrate    = symptomInfo.SI_Pre_HeartRate.ToString();
     this.siPreHighpressure = symptomInfo.SI_Pre_HighPressure.ToString();
     this.siPreLowpressure  = symptomInfo.SI_Pre_LowPressure.ToString();
     this.siPrePulse        = symptomInfo.SI_Pre_LowPressure.ToString();
     this.siSufAnimalheat   = symptomInfo.SI_Suf_AnimalHeat.ToString();
     this.siSufHeartrate    = symptomInfo.SI_Suf_HeartRate.ToString();
     this.siSufHighpressure = symptomInfo.SI_Suf_HighPressure.ToString();
     this.siSufLowpressure  = symptomInfo.SI_Suf_LowPressure.ToString();
     this.siSufPulse        = symptomInfo.SI_Suf_Pulse.ToString();
 }
Пример #2
0
        public static void GetSymptomsList(ServicesSoapClient _ServicesSoapClient, ref SymptomsViewModel sy)
        {
            DataSet   SymptomsDS       = new DataSet();
            DataTable SymptomsInfoList = new DataTable();

            SymptomsDS       = _ServicesSoapClient.GetSymptomsListByPId(sy.PId);
            SymptomsInfoList = SymptomsDS.Tables[0];
            foreach (DataRow SymptomsDR in SymptomsInfoList.Rows)
            {
                SymptomInfo SymptomInfoItem = new SymptomInfo();
                String      Date            = string.Empty;
                String      Time            = string.Empty;
                SymptomInfoItem.UserId           = sy.PId;
                SymptomInfoItem.VisitId          = SymptomsDR["VisitId"].ToString();
                SymptomInfoItem.SymptomsNo       = Convert.ToInt32(SymptomsDR["SynptomsNo"]);
                SymptomInfoItem.SymptomsTypeName = SymptomsDR["SymptomsTypeName"].ToString();
                SymptomInfoItem.SymptomsName     = SymptomsDR["SymptomsName"].ToString();
                SymptomInfoItem.Description      = SymptomsDR["Description"].ToString();
                SymptomInfoItem.RecordDate       = Functions.ConvertDate(SymptomsDR["RecordDate"].ToString());
                SymptomInfoItem.RecordTime       = Functions.ConvertTime(SymptomsDR["RecordTime"].ToString());
                SymptomInfoItem.ReInUserId       = SymptomsDR["ReInUserId"].ToString();
                if (SymptomInfoItem.ReInUserId == sy.UserId)
                {
                    SymptomInfoItem.IsAllowed = true;
                }
                else
                {
                    SymptomInfoItem.IsAllowed = false;
                }
                sy.SymptomsList.Add(SymptomInfoItem);
            }
        }
Пример #3
0
        public SymptomInfoDTO(SymptomInfo symptomInfo, Setter setter)
        {
            this.clientId = setter.Set_Unique_Id;
            this.fkUserId = symptomInfo.Fk_User_Id.ToString();

            this.gmtCreate    = symptomInfo.Gmt_Create.ToString().Replace("/", "-");
            this.gmtModified  = symptomInfo.Gmt_Modified.ToString().Replace("/", "-");
            this.pkSiId       = symptomInfo.Pk_SI_Id.ToString();
            this.siCareinfo   = symptomInfo.SI_CareInfo.ToString();
            this.siInquiry    = symptomInfo.SI_Inquiry.ToString();
            this.siIsjoin     = symptomInfo.SI_IsJoin.ToString();
            this.siWaterinput = symptomInfo.SI_WaterInput.ToString();
        }
Пример #4
0
        /// <summary>
        /// 添加症状信息和子表
        /// </summary>
        public void UpdateSymptomnInfo(SymptomInfo symptomInfo)
        {
            using (TransactionScope ts = new TransactionScope())//使整个代码块成为事务性代码
            {
                //插入症状信息返回主键
                new SymptomInfoDao().UpdateByPrimaryKey(symptomInfo);

                //插入至上传表
                UploadManagementDAO uploadManagementDao = new UploadManagementDAO();
                uploadManagementDao.Insert(new UploadManagement(symptomInfo.Pk_SI_Id, "bdl_symptominfo", 1));

                ts.Complete();
            }
        }
Пример #5
0
        /**
         * 添加症状信息
         */
        public void AddSymptomnInfo(SymptomInfo symptomInfo)
        {
            using (TransactionScope ts = new TransactionScope())//使整个代码块成为事务性代码
            {
                //插入症状信息返回主键
                int id = (int)new SymptomInfoDao().Insert(symptomInfo);

                //插入至上传表
                UploadManagementDAO uploadManagementDao = new UploadManagementDAO();
                uploadManagementDao.Insert(new UploadManagement(id, "bdl_symptominfo", 0));

                ts.Complete();
            }
        }
Пример #6
0
        public SymptomInfoDTO(SymptomInfo symptomInfo)
        {
            this.TI_ID      = symptomInfo.Fk_TI_Id;
            this.ID         = symptomInfo.Pk_SI_Id;
            this.Create     = symptomInfo.Gmt_Create.Value;
            this.CareInfo   = symptomInfo.SI_CareInfo;
            this.Inquiry    = symptomInfo.SI_Inquiry;
            this.WaterInput = symptomInfo.SI_WaterInput;
            this.Join       = symptomInfo.SI_IsJoin == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Yes") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.No");

            this.Pre_Pressure   = symptomInfo.SI_Pre_HighPressure + " / " + symptomInfo.SI_Pre_LowPressure;
            this.Pre_AnimalHeat = symptomInfo.SI_Pre_AnimalHeat;
            if (symptomInfo.SI_Pre_Pulse != -1)
            {
                this.Pre_Pulse = symptomInfo.SI_Pre_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
            }
            else
            {
                this.Pre_Pulse = "";
            }
            this.Pre_HeartRate = symptomInfo.SI_Pre_HeartRate;

            this.Suf_AnimalHeat = symptomInfo.SI_Suf_AnimalHeat;
            this.Suf_HeartRate  = symptomInfo.SI_Suf_HeartRate;
            if (symptomInfo.SI_Suf_Pulse != -1)
            {
                this.Suf_Pulse = symptomInfo.SI_Suf_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
            }
            else
            {
                this.Suf_Pulse = "";
            }
            this.Suf_Pressure = symptomInfo.SI_Suf_HighPressure + " / " + symptomInfo.SI_Suf_LowPressure;
            List <string> inquiryList = new List <string>();

            this.DateStr = symptomInfo.Gmt_Create.ToString();
            //翻译问卷票
            foreach (string inquiry in symptomInfo.SI_Inquiry.Split(new char[] { ',' }))
            {
                if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Janguidness"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Janguidness"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Diarrhea"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Diarrhea"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Wamble"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Wamble"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.BeingBreathless"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.BeingBreathless"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.CoughAndPhlegm"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.CoughAndPhlegm"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Fever"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Fever"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Stomachache"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Stomachache"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.APoorAppetite"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.APoorAppetite"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Constipation"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Constipation"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Dizziness"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Dizziness"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Headache"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Headache"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Other"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Other"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.NotApplicable"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.NotApplicable"));
                }
            }
            Inquiry = string.Join(",", inquiryList.ToArray());
        }
Пример #7
0
 public SymptomInfoExcelVO(SymptomInfo si)
 {
     this.Gmt_Create        = (DateTime)si.Gmt_Create;
     this.SI_Pre_Pressure   = si.SI_Pre_HighPressure + "/" + si.SI_Pre_LowPressure;
     this.SI_Pre_HeartRate  = si.SI_Pre_HeartRate;
     this.SI_Pre_Pulse      = si.SI_Pre_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Pre_AnimalHeat = si.SI_Pre_AnimalHeat;
     this.SI_Suf_Pressure   = si.SI_Suf_HighPressure + "/" + si.SI_Suf_LowPressure;
     this.SI_Suf_HeartRate  = si.SI_Suf_HeartRate;
     this.SI_Suf_Pulse      = si.SI_Suf_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Suf_AnimalHeat = si.SI_Suf_AnimalHeat;
     string[] inquirys = Regex.Split(si.SI_Inquiry, ",");
     foreach (string str in inquirys)
     {
         //1. 身体疲倦
         if (LanguageUtils.EqualsResource(str, "VitalInfoView.Janguidness"))
         {
             this.SI_Tired = 1;
         }
         //2.腹泻
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Diarrhea"))
         {
             this.SI_Diarrhoea = 1;
         }
         //3.摇晃
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Wamble"))
         {
             this.SI_Shake = 1;
         }
         //4. 心跳、气喘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.BeingBreathless"))
         {
             this.SI_Asthma = 1;
         }
         //5. 咳嗽、有痰
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.CoughAndPhlegm"))
         {
             this.SI_Phlegm = 1;
         }
         //6. 发烧
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Fever"))
         {
             this.SI_Fever = 1;
         }
         //7. 胸部、肚子痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Stomachache"))
         {
             this.SI_Stomach = 1;
         }
         //8. 没有食欲
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.APoorAppetite"))
         {
             this.SI_NoAppetite = 1;
         }
         //9. 持续便秘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Constipation"))
         {
             this.SI_Constipation = 1;
         }
         //10. 感到头晕
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Dizziness"))
         {
             this.SI_Dizzy = 1;
         }
         //11. 头痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Headache"))
         {
             this.SI_Headache = 1;
         }
         //12.其他
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Other"))
         {
             this.SI_Other = 1;
         }
         //13.没有相关症状
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.NotApplicable"))
         {
             this.SI_NoSymptoms = 1;
         }
     }
     this.SI_IsJoin     = si.SI_IsJoin == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.No") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Yes");
     this.SI_WaterInput = si.SI_WaterInput;
     this.SI_CareInfo   = si.SI_CareInfo;
 }
        private void Button_Save(object sender, RoutedEventArgs e)
        {
            //获取日期
            //DateTime? da = date.SelectedDate;
            DateTime?da = date.DateTime;
            //康复前血压
            string preLowPressure  = bloodlow_1.Text;
            string preHighPressure = bloodhight_1.Text;

            //康复前心率
            string preHeartRate = heartRate_1.Text;
            //康复前脉
            int prePulse = -1;

            if (rule_1.IsChecked == true)
            {//规律脉
                prePulse = 0;
            }
            else if (irregular_1.IsChecked == true)
            {//脉律不齐
                prePulse = 1;
            }
            else
            {
                MessageBox.Show(LanguageUtils.ConvertLanguage("请选择康复前脉症状", "Please choose the symptoms of the pre recovery pulse"));
                return;
            }

            //康复前体温
            string preAnimalheat = heat_1.Text;

            //康复后血压
            string sufLowPressure  = bloodlow_2.Text;
            string sufHighPressure = bloodhight_2.Text;

            if (preLowPressure.Trim() == "" || preHighPressure.Trim() == "" || !(Double.Parse(preHighPressure) > 0 && Double.Parse(preHighPressure) < 300) || !(Double.Parse(preLowPressure) > 0 && Double.Parse(preLowPressure) < 300))
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("请输入正确的血压", "Please enter the right blood pressure"));
                return;
            }
            //康复后心率
            string sufHeartRate = heartRate_2.Text;

            if (preHeartRate.Trim() == "" || !(Int32.Parse(preHeartRate) > 0 && Int32.Parse(preHeartRate) < 200))
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("请输入正确的心率", "Please enter the right heartrate"));
                return;
            }
            int sufPulse = -1;

            if (rule_2.IsChecked == true)
            {//规律脉
                sufPulse = 0;
            }
            else if (irregular_2.IsChecked == true)
            {//脉律不齐
                sufPulse = 1;
            }
            //康复后体温
            string sufAnimalheat = heat_2.Text;

            if (preAnimalheat.Trim() == "" || !(Double.Parse(preAnimalheat) < 50 && Double.Parse(preAnimalheat) > 30))
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("请输入正确的体温", "Please enter the right temperature"));
                return;
            }

            //问诊票
            List <string> inquiryList = new List <string>();

            foreach (CheckBox chk in this.stackPanel_1.Children.OfType <CheckBox>())
            {
                if (chk.IsChecked == true)
                {
                    inquiryList.Add(chk.Content as string);
                }
            }
            foreach (CheckBox chk in this.stackPanel_2.Children.OfType <CheckBox>())
            {
                if (chk.IsChecked == true)
                {
                    inquiryList.Add(chk.Content as string);
                }
            }
            string inquiryStr = string.Join(",", inquiryList.ToArray());

            //参加不参加
            Byte isJoin = 0;

            if (join_1.IsChecked == true)
            {
                isJoin = 0;
            }
            else if (join_2.IsChecked == true)
            {
                isJoin = 1;
            }
            else
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("请选择是否参加", "Please choose whether or not to participate"));
                return;
            }

            //int tiId = new DevicePrescriptionDAO().GetTIIdByPRId(trainDto.prescriptionResult.Pk_PR_Id);
            //摄取水分量
            string waterInput = amunt.Text;

            if (waterInput.Trim() == "" || Double.Parse(waterInput) < 0)
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("请输入正确的摄水量", "Please enter the correct water intake"));
                return;
            }


            //看护记录
            string careInfo = Record.Text;


            //构建对象
            SymptomInfo symptomInfo = new SymptomInfo();

            //症状信息
            symptomInfo.Fk_User_Id    = user.Pk_User_Id;
            symptomInfo.Gmt_Create    = da;
            symptomInfo.Gmt_Modified  = DateTime.Now;
            symptomInfo.SI_CareInfo   = careInfo;
            symptomInfo.SI_Inquiry    = inquiryStr;
            symptomInfo.SI_IsJoin     = isJoin;
            symptomInfo.SI_WaterInput = waterInput;
            if (!string.IsNullOrEmpty(train.Text))
            {
                //如果选择了训练记录
                symptomInfo.Fk_TI_Id = (int)train.SelectedValue;
            }
            //symptomInfo.Fk_TI_Id = tiId;
            //康复前
            symptomInfo.SI_Pre_AnimalHeat   = preAnimalheat;
            symptomInfo.SI_Pre_HeartRate    = preHeartRate;
            symptomInfo.SI_Pre_HighPressure = preHighPressure;
            symptomInfo.SI_Pre_LowPressure  = preLowPressure;
            symptomInfo.SI_Pre_Pulse        = prePulse;
            //康复后
            symptomInfo.SI_Suf_AnimalHeat   = sufAnimalheat;
            symptomInfo.SI_Suf_HeartRate    = sufHeartRate;
            symptomInfo.SI_Suf_HighPressure = sufHighPressure;
            symptomInfo.SI_Suf_LowPressure  = sufLowPressure;
            symptomInfo.SI_Suf_Pulse        = sufPulse;
            logger.Info("save:" + symptomInfo);
            //存储
            new SymptomService().AddSymptomnInfo(symptomInfo);
            MessageBoxX.Info(LanguageUtils.ConvertLanguage("已存储", "Finished storage"));
            this.Close();
        }