using DevExpress.XtraEditors; using HL_FristAidPlatform_DTO; using HL_FristAidPlatform_Public; using System; using System.Collections.Generic; using System.Data; using System.Windows.Forms; namespace HL_FristAidPlatform_ChestPain.Part { public partial class UC_BasicInfo : UserControl, ISave { #region 变量 /// /// 当前病人编号(GUID) /// private string Cur_PatientGuid; /// /// 当前病人信息 /// private DataTable Cur_PatientDT = new DataTable(); /// /// 胸痛院前信息 V2.1 /// private DataTable Cur_FirstAIDInfoDT = new DataTable(); /// /// 等待窗体 /// private Loading loading = new Loading(); #endregion 变量 /// /// 基本信息 FMC时填写 /// /// 患者编号(GUID) public UC_BasicInfo(string _patientGuid) { InitializeComponent(); Cur_PatientGuid = _patientGuid; } /// /// 加载 /// /// /// private void UC_VitalSigns_Load(object sender, System.EventArgs e) { //减小tableLayoutPanel绘制时闪烁的情况 table_JBXX.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(table_JBXX, true, null); BindData(); BindInfo(Cur_PatientGuid); } #region 绑定 #region BindData() /// /// 绑定控件基础数据 /// private void BindData() { //性别 BindGender(); //民族 BindNation(); //职业 PublicClass.SetLookUpList(lookUp_Profession, Enumerate.PublicDictionaryType.职业, true, "请选择"); //文化程度 PublicClass.SetLookUpList(lookUp_Education, Enumerate.PublicDictionaryType.文化程度, true, "请选择"); //婚姻状况 PublicClass.SetLookUpList(lookUp_MaritalStatus, Enumerate.PublicDictionaryType.婚姻状况, true, "请选择"); //发病区间 BindOnsetTimeInterval(); //病情评估 BindConditionAssessment(); //绑定省 BindProvince(); } /// /// 绑定性别 /// private void BindGender() { try { DataTable BindDT = DBHelpClass.Get("/api/base/T_Base_Gender/GetList"); PublicClass.BindRadioGroupData(radioGroup_Gender, BindDT, "GenderName", "GenderCode"); radioGroup_Gender.EditValue = "0"; } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定性别:\r\n" + ex); } } /// /// 绑定民族 /// private void BindNation() { try { DataTable BindDT = DBHelpClass.Get("/api/base/T_Base_Nation/GetList"); PublicClass.SetLookUpList(lookUp_Nation, BindDT, "Value", "NationName", true, "请选择"); } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定民族:\r\n" + ex); } } /// /// 绑定发病区间 /// private void BindOnsetTimeInterval() { try { string Url = string.Format("/api/base/T_Base_IncidenceInterval/GetListBySystemModuleID?systemModuleID={0}", PublicClassForDataBase.Config10001); DataTable BindDT = DBHelpClass.Get(Url); PublicClass.SetLookUpList(lookUp_Attack_Zone, BindDT, "Value", "Content", true); } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定发病区间:\r\n" + ex); } } /// /// 绑定病情评估--胸痛 /// private void BindConditionAssessment() { try { string Url = string.Format("/api/base/T_Base_ConditionAssessment/GetListBySystemModuleID?systemModuleID={0}", PublicClassForDataBase.Config10001); DataTable BindDT = DBHelpClass.Get(Url); PublicClass.BindCheckedListBoxControlDataSource(checkedListBox_Distress_Case_Detail, BindDT, "Content", "Value"); } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定病情评估--胸痛:\r\n" + ex); } } /// /// 绑定省 /// private void BindProvince() { try { string Url = string.Format("/api/base/T_Base_Province/GetList?systemModuleId={0}", PublicClassForDataBase.Config10001); DataTable BindDT = DBHelpClass.Get(Url); PublicClass.SetLookUpList(lookUp_Province, BindDT, "ProvinceCode", "ProvinceName", true, "请选择"); lookUp_Province.EditValue = PublicClassForDataBase.Config110; } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定省:\r\n" + ex); } } #endregion #region BindInfo() /// /// 绑定业务数据 /// /// 患者编号(GUID) private void BindInfo(string PatientGuid) { //绑定患者信息 BindPatientInfo(PatientGuid); //绑定急救信息 BindPrehospital(PatientGuid); } /// /// 绑定胸痛患者基本信息 /// /// 患者编号(GUID) private void BindPatientInfo(string PatientGuid) { try { if (!string.IsNullOrEmpty(PatientGuid)) { #region 绑定胸痛患者基本信息 string Url = string.Format("api/service/T_Service_Patient/GetModelByIdOrGuid?guid={0}", PatientGuid); Cur_PatientDT = DBHelpClass.Get(Url); if (Cur_PatientDT != null && Cur_PatientDT.Rows.Count > 0) { //三无 ckb_Category.Checked = Cur_PatientDT.Rows[0]["Category"].ToString() == "0" ? false : true; if (ckb_Category.Checked) ckb_Category.ReadOnly = false; else ckb_Category.ReadOnly = true; //编号 txt_Name.Tag = Cur_PatientDT.Rows[0]["ID"].ToString(); //姓名 txt_Name.Text = Cur_PatientDT.Rows[0]["Name"].ToString(); //GUID txt_Age.Tag = Cur_PatientDT.Rows[0]["GUID"].ToString(); //性别 radioGroup_Gender.EditValue = PublicClass.ToString(Cur_PatientDT.Rows[0]["Gender"], "0"); #region 证件类型 int Credentials_Type = PublicClass.ToInt32(Cur_PatientDT.Rows[0]["Credentials_Type"], -1); if (Credentials_Type == -1) { comboBox_Credentials_Type.SelectedIndex = 0; } else if (Credentials_Type == 0) { comboBox_Credentials_Type.SelectedIndex = 4; } else { comboBox_Credentials_Type.SelectedIndex = Credentials_Type; } #endregion //证件号码 txt_IdentityCard.Text = Cur_PatientDT.Rows[0]["Identitycard"].ToString(); //年龄 txt_Age.Text = Cur_PatientDT.Rows[0]["Age"].ToString(); //年龄单位 comboBox_Age_Unit.Text = Cur_PatientDT.Rows[0]["Age_Unit"].ToString(); //民族 lookUp_Nation.EditValue = PublicClass.ToString(Cur_PatientDT.Rows[0]["Nation"], "-1"); //联系电话 txt_MobilePhone.Text = Cur_PatientDT.Rows[0]["MobilePhone"].ToString(); //职业 lookUp_Profession.EditValue = PublicClass.ToString(Cur_PatientDT.Rows[0]["Profession"], "-1"); //文化程度 lookUp_Education.EditValue = PublicClass.ToString(Cur_PatientDT.Rows[0]["Education"], "-1"); //婚姻状况 lookUp_MaritalStatus.EditValue = PublicClass.ToString(Cur_PatientDT.Rows[0]["MaritalStatus"], "-1"); } #endregion } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定胸痛患者基本信息:\r\n" + ex); } } /// /// 绑定急救信息 /// /// 患者编号(GUID) private void BindPrehospital(string PatientGuid) { try { if (!string.IsNullOrEmpty(PatientGuid)) { #region 院前信息 Cur_FirstAIDInfoDT = DBHelpClass.Get(string.Format("api/service/T_Service_ChestPain_FirstAIDInfo/GetByPatientGuid?patientGuid={0}", PatientGuid)); if (Cur_FirstAIDInfoDT != null && Cur_FirstAIDInfoDT.Rows.Count > 0) { //住院ID txt_Inpatient_ID.Text = Cur_FirstAIDInfoDT.Rows[0]["Inpatient_ID"].ToString(); //门诊ID txt_Outpatient_ID.Text = Cur_FirstAIDInfoDT.Rows[0]["Outpatient_ID"].ToString(); //发病时间 time_Attack_Time.TimeValue = Cur_FirstAIDInfoDT.Rows[0]["Attack_Time"].ToString(); //发病时间无法精确到分钟1是 0否 checkEdit_Is_Null_Attack_Detail_Time.Checked = PublicClass.ToInt32(Cur_FirstAIDInfoDT.Rows[0]["Is_Null_Attack_Detail_Time"], -1) == 1 ? true : false; if (checkEdit_Is_Null_Attack_Detail_Time.Checked) { //发病区间 lookUp_Attack_Zone.EditValue = Cur_FirstAIDInfoDT.Rows[0]["Attack_Zone"].ToString(); } //发病地址(省) lookUp_Province.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Province"], "-1"); //发病地址(市) lookUp_City.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["City"], "-1"); //发病地址区(县) lookUp_Area.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Area"], "-1"); //发病详细地址 txt_Attack_Address.Text = Cur_FirstAIDInfoDT.Rows[0]["Attack_Address"].ToString(); //医保类型1:城镇职工基本医疗保险2:新型农村合作医疗3:城镇居民基本医疗保险4:自费5:军免 radioGroup_Medical_Insurance_Type.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Medical_Insurance_Type"], "0"); //医保编号 txt_Medical_Insurance_No.Text = Cur_FirstAIDInfoDT.Rows[0]["Medical_Insurance_No"].ToString(); //大病医保1:是0:否 radioGroup_Serious_Disease_Medical_Insurance.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Serious_Disease_Medical_Insurance"], ""); //意识 radioGroup_Consciousness_Type.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Consciousness_Type"], "0"); //呼吸次/分钟 txt_Respiration_Rate.Text = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Respiration_Rate"], ""); //脉搏 txt_Pulse_Rate.Text = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Pulse_Rate"], ""); //心率 txt_Heart_Rate.Text = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Heart_Rate"], ""); //体温 txt_Temperature.Text = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Temperature"], ""); //血压 string Blood_Pressure = Cur_FirstAIDInfoDT.Rows[0]["Blood_Pressure"].ToString(); if (!string.IsNullOrEmpty(Blood_Pressure.Trim())) { string[] Blood_PressureArray = Blood_Pressure.Split('/'); txt_Blood_Pressure1.Text = Blood_PressureArray[0].ToString(); txt_Blood_Pressure2.Text = Blood_PressureArray[1].ToString(); } else { txt_Blood_Pressure1.Text = ""; txt_Blood_Pressure2.Text = ""; } //病情评估1:持续性胸闷/胸痛2:间歇性胸闷 / 胸痛3:症状已缓解 radioGroup_Distress_Case.EditValue = PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Distress_Case"], ""); //病情评估选项值#分割 PublicClass.SetItemChecked(checkedListBox_Distress_Case_Detail, PublicClass.ToString(Cur_FirstAIDInfoDT.Rows[0]["Distress_Case_Detail"], ""), '|'); } #endregion } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "绑定急救信息:\r\n" + ex); } } /// /// 选择省联动市 /// /// /// private void lookUp_Province_EditValueChanged(object sender, EventArgs e) { try { string ProvinceCode = PublicClass.ToString(lookUp_Province.EditValue, ""); if (ProvinceCode != "" && ProvinceCode != "-1") { string Url = string.Format("/api/base/T_Base_City/GetList?provinceCode={0}", ProvinceCode); DataTable BindDT = DBHelpClass.Get(Url); PublicClass.SetLookUpList(lookUp_City, BindDT, "CityCode", "CityName", true, "请选择"); lookUp_City.EditValue = PublicClassForDataBase.Config115; } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "选择省联动市:\r\n" + ex); } } /// /// 选择市联动县 /// /// /// private void lookUp_City_EditValueChanged(object sender, EventArgs e) { try { string CityCode = PublicClass.ToString(lookUp_City.EditValue, ""); if (CityCode != "" && CityCode != "-1") { string Url = string.Format("/api/base/T_Base_County/GetList?cityCode={0}", CityCode); DataTable BindDT = DBHelpClass.Get(Url); PublicClass.SetLookUpList(lookUp_Area, BindDT, "CountyCode", "CountyName", true, "请选择"); lookUp_Area.EditValue = PublicClassForDataBase.Config116; } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "选择市联动县:\r\n" + ex); } } #endregion #endregion #region 保存 /// /// 实现统一保存接口 /// public void Save() { if (!string.IsNullOrEmpty(Cur_PatientGuid)) { //统一验证 if (!CheckingDataAvailability()) return; loading.ShowMessage("请稍后", "正在保存数据..."); if (!Save_Patient()) { loading.HideMessage(); XtraMessageBox.Show("保存基本信息失败,请重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!Save_FirstAIDInfo()) { loading.HideMessage(); XtraMessageBox.Show("保存急救信息失败,请重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } loading.HideMessage(); XtraMessageBox.Show("保存基本信息成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //保存成功后重新加载 以便更新操作标记 BindInfo(Cur_PatientGuid); } } /// /// 检查数据有效性 /// /// private bool CheckingDataAvailability() { #region 一、基本信息 if (!ckb_Category.Checked) { if (string.IsNullOrEmpty(txt_Name.Text.ToString().Trim())) { XtraMessageBox.Show("请填写患者姓名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Name.Focus(); return false; } if (PublicClass.ToString(radioGroup_Gender.EditValue, "") == "") { XtraMessageBox.Show("请选择患者性别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); radioGroup_Gender.Focus(); return false; } if (PublicClass.ToInt32(txt_Age.Text, -1) == -1) { XtraMessageBox.Show("请正确填写患者年龄!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Age.Focus(); return false; } } //证件 int Credentials_Type = comboBox_Credentials_Type.SelectedIndex; if (Credentials_Type == 0 || Credentials_Type == 4) { } else { //判断身份证号是否合理 string IdentityCard = PublicClass.ToString(txt_IdentityCard.Text, ""); if (!string.IsNullOrEmpty(IdentityCard)) { if (!PublicClass.CheckChinaIDCardNumberFormat(IdentityCard) && Credentials_Type == 1) { XtraMessageBox.Show("请输入正确的身份证号码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_IdentityCard.Focus(); return false; } } else { XtraMessageBox.Show("请输入证件号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_IdentityCard.Focus(); return false; } } //联系电话 string MobilePhone = PublicClass.ToString(txt_MobilePhone.Text, ""); if (!string.IsNullOrEmpty(MobilePhone)) { if (!PublicClass.CheckPhoneIsAble(MobilePhone)) { XtraMessageBox.Show("请输入正确的联系电话!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_MobilePhone.Focus(); return false; } } #endregion #region 五、生命体征 //呼吸值 int Respiration_Rate = PublicClass.ToInt32(txt_Respiration_Rate.Text, 0); if (Respiration_Rate < 0 || Respiration_Rate > 40) { XtraMessageBox.Show("请正确填写呼吸值,取值范围为0-40!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Respiration_Rate.Focus(); return false; } //脉搏 int Pulse_Rate = PublicClass.ToInt32(txt_Pulse_Rate.Text, 0); if (Pulse_Rate < 0 || Pulse_Rate > 300) { XtraMessageBox.Show("请正确填写脉搏,取值范围为0-300!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Pulse_Rate.Focus(); return false; } //心率 int Heart_Rate = PublicClass.ToInt32(txt_Heart_Rate.Text, 0); if (Heart_Rate < 0 || Heart_Rate > 300) { XtraMessageBox.Show("请正确填写心率,取值范围为0-300!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Heart_Rate.Focus(); return false; } //血压 有一个不为空则判断 if (!string.IsNullOrEmpty(txt_Blood_Pressure1.Text.Trim()) || !string.IsNullOrEmpty(txt_Blood_Pressure1.Text.Trim())) { int Pressure1 = PublicClass.ToInt32(txt_Blood_Pressure1.Text, 0); int Pressure2 = PublicClass.ToInt32(txt_Blood_Pressure2.Text, 0); if (Pressure1 < 0) { XtraMessageBox.Show("请正确填写舒缩压!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Blood_Pressure1.Focus(); return false; } if (Pressure2 < 0) { XtraMessageBox.Show("请正确填写舒张压!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); txt_Blood_Pressure2.Focus(); return false; } } #endregion return true; } /// /// 保存 人员信息 /// private bool Save_Patient() { try { string Url = string.Empty; #region 保存信息 List list_model = new List(); T_Service_PatientDTO model = new T_Service_PatientDTO(); Url = "api/service/T_Service_Patient/UpdateNotNullColumns"; model.ID = PublicClass.ToInt64(Cur_PatientDT.Rows[0]["ID"], -1); model.GUID = Cur_PatientGuid; #region 非string类型的赋值为原始数据 model.SystemModuleID = PublicClass.ToInt64(Cur_PatientDT.Rows[0]["SystemModuleID"], -1); model.WristStrapID = PublicClass.ToInt64(Cur_PatientDT.Rows[0]["WristStrapID"], 0); model.EmergencyState = PublicClass.ToInt32(Cur_PatientDT.Rows[0]["EmergencyState"], 0); model.CreatorID = PublicClass.ToInt64(Cur_PatientDT.Rows[0]["CreatorID"], 0); model.CCPC_State = PublicClass.ToInt32(Cur_PatientDT.Rows[0]["CCPC_State"], 0); model.Portrait = Convert.FromBase64String(Cur_PatientDT.Rows[0]["Portrait"].ToString()); model.Status = PublicClass.ToInt32(Cur_PatientDT.Rows[0]["Status"], 0); model.IsGreenChannel = PublicClass.ToInt32(Cur_PatientDT.Rows[0]["IsGreenChannel"], 0); #endregion //三无 model.Category = ckb_Category.Checked == true ? 1 : 0; //姓名 string PatientName = txt_Name.Text.ToString().Trim(); model.Name = PatientName; model.PymCode = SpellAndWbConfig.GetSpellCode(PatientName); model.WbmCode = SpellAndWbConfig.GetWBCode(PatientName); //性别 model.Gender = PublicClass.ToInt32(radioGroup_Gender.EditValue, 0); #region 证件类型 string Credentials_Type = comboBox_Credentials_Type.SelectedIndex.ToString(); //无 if (Credentials_Type == "4") { model.Credentials_Type = "0"; } else { model.Credentials_Type = Credentials_Type; //证件号码 if (!string.IsNullOrEmpty(Credentials_Type)) model.IdentityCard = txt_IdentityCard.Text.ToString().Trim(); } #endregion //年龄 model.Age = PublicClass.ToInt32(txt_Age.Text, 0); //年龄单位 model.Age_Unit = comboBox_Age_Unit.Text; //民族 string Nation = PublicClass.ToString(lookUp_Nation.EditValue, "-1"); model.Nation = Nation == "-1" ? "" : Nation; //联系电话 model.MobilePhone = txt_MobilePhone.Text; //职业 string Profession = PublicClass.ToString(lookUp_Profession.EditValue, "-1"); model.Profession = Profession == "-1" ? "" : Profession; //文化程度 string Education = PublicClass.ToString(lookUp_Education.EditValue, "-1"); model.Education = Education == "-1" ? "" : Education; //婚姻状况 string MaritalStatus = PublicClass.ToString(lookUp_MaritalStatus.EditValue, "-1"); model.MaritalStatus = MaritalStatus == "-1" ? "" : MaritalStatus; //住院号 model.AdmissionNumber = txt_Inpatient_ID.Text.ToString().Trim(); //门诊号 model.OutpatientNumber = txt_Outpatient_ID.Text.ToString().Trim(); //最后编辑时间 model.EditTime = PublicClass.DateTimeNow(); //最后编辑人编号 model.EditorID = Information.User.ID; //最后编辑人 model.Editor = Information.User.FullName; //病案操作更新日志 model.Operation_Log = string.Format("{0} 由 {1} 创建了患者病案\r\n{2} 由 {3} 更新了急救信息\r\n", Cur_PatientDT.Rows[0]["CreationDate"].ToString(), Cur_PatientDT.Rows[0]["Creator"].ToString(), DateTime.Now.ToString(PublicClass.TimeToString), Information.User.FullName); list_model.Add(model); ClientFactory httpClient = new HttpClientFactory(); Client client = httpClient.VisitFactory(); #endregion //访问 return client.Post(Url, list_model).Success; } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "保存 基本信息:\r\n" + ex); return false; } } /// /// 保存 急救信息 /// private bool Save_FirstAIDInfo() { try { string Url = string.Empty; #region 保存院前信息 List list_model = new List(); T_Service_ChestPain_FirstAIDInfoDTO model = new T_Service_ChestPain_FirstAIDInfoDTO(); //存在则修改 否则新增 if (Cur_FirstAIDInfoDT != null && Cur_FirstAIDInfoDT.Rows.Count > 0) { Url = "api/service/T_Service_ChestPain_FirstAIDInfo/UpdateNotNullColumns"; model.ID = PublicClass.ToInt64(Cur_FirstAIDInfoDT.Rows[0]["ID"], -1); model.GUID = Cur_FirstAIDInfoDT.Rows[0]["GUID"].ToString(); model.DeleteFlag = PublicClass.ToInt32(Cur_FirstAIDInfoDT.Rows[0]["DeleteFlag"], -1); model.CreatorID = PublicClass.ToInt64(Cur_FirstAIDInfoDT.Rows[0]["CreatorID"], 0); model.EditorID = Information.User.ID; model.Editor = Information.User.FullName; model.EditTime = PublicClass.DateTimeNow(); } else { Url = "api/service/T_Service_ChestPain_FirstAIDInfo/AddNotNullColumns"; model.GUID = Guid.NewGuid().ToString(); model.DeleteFlag = 0; model.CreatorID = Information.User.ID; model.Creator = Information.User.FullName; model.CreationDate = PublicClass.DateTimeNow(); } //患者编号(GUID) model.PatientGuid = Cur_PatientGuid; //住院ID model.Inpatient_ID = txt_Inpatient_ID.Text; //门诊ID model.Outpatient_ID = txt_Outpatient_ID.Text; //发病时间 model.Attack_Time = time_Attack_Time.TimeValue; PublicClassForDataBase.UpdateTime_ChestPain(Cur_PatientGuid, time_Attack_Time.TimeValue, PublicClassForDataBase.Config1001); //发病时间无法精确到分钟1是 0否 model.Is_Null_Attack_Detail_Time = checkEdit_Is_Null_Attack_Detail_Time.Checked == true ? "1" : "0"; //发病区间 model.Attack_Zone = ""; if (checkEdit_Is_Null_Attack_Detail_Time.Checked) { //发病区间 model.Attack_Zone = lookUp_Attack_Zone.EditValue.ToString(); } //发病地址(省) model.Province = lookUp_Province.Text + ""; //发病地址(市) model.City = lookUp_City.Text + ""; //发病地址区(县) model.Area = lookUp_Area.Text + ""; //发病详细地址 model.Attack_Address = txt_Attack_Address.Text; //医保类型1:城镇职工基本医疗保险2:新型农村合作医疗3:城镇居民基本医疗保险4:自费5:军免 model.Medical_Insurance_Type = PublicClass.ToString(radioGroup_Medical_Insurance_Type.EditValue, ""); //医保编号 model.Medical_Insurance_No = txt_Medical_Insurance_No.Text; //大病医保1:是0:否 model.Serious_Disease_Medical_Insurance = PublicClass.ToString(radioGroup_Serious_Disease_Medical_Insurance.EditValue, ""); //意识 model.Consciousness_Type = PublicClass.ToString(radioGroup_Consciousness_Type.EditValue, ""); ; //呼吸次/分钟 model.Respiration_Rate = txt_Respiration_Rate.Text.Trim(); //脉搏 model.Pulse_Rate = txt_Pulse_Rate.Text.Trim(); //心率 model.Heart_Rate = txt_Heart_Rate.Text.Trim(); //血压 string Blood_Pressure1 = txt_Blood_Pressure1.Text; string Blood_Pressure2 = txt_Blood_Pressure2.Text; if (!string.IsNullOrEmpty(Blood_Pressure1) && !string.IsNullOrEmpty(Blood_Pressure2)) { model.Blood_Pressure = Blood_Pressure1 + "/" + Blood_Pressure2; } //体温 model.Temperature = txt_Temperature.Text; //病情评估1:持续性胸闷/胸痛2:间歇性胸闷/胸痛3:症状已缓解 model.Distress_Case = PublicClass.ToString(radioGroup_Distress_Case.EditValue, ""); //病情评估明细1:呼吸困难2:腹痛3:齿痛4:肩背痛5:合并出血6:合并心衰7:合并恶性心律失常8:不明原因的昏厥9:自汗、大汗淋漓10:心慌心悸11:烦躁不安12:颈前部束缚感13:乏力14:气喘99:其他多选用竖线隔开。如"1|7" string Distress_Case_Detail = string.Empty; string Distress_Case_DetailText = string.Empty; PublicClass.GetCheckedListBoxItemValues(checkedListBox_Distress_Case_Detail, "|", out Distress_Case_Detail, out Distress_Case_DetailText); model.Distress_Case_Detail = Distress_Case_Detail; list_model.Add(model); //初始化两个工厂 ClientFactory httpClient = new HttpClientFactory(); Client client = httpClient.VisitFactory(); #endregion //访问 return client.Post(Url, list_model).Success; } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "保存 院前信息:\r\n" + ex); return false; } } #endregion #region 控件显示隐藏 /// /// 是否三无人员 /// /// /// private void ckb_Category_CheckedChanged(object sender, EventArgs e) { if (ckb_Category.Checked) { lbl_Hint_Name.Visible = false; lbl_Hint_Age.Visible = false; txt_Name.ReadOnly = true; txt_Age.ReadOnly = true; radioGroup_Gender.ReadOnly = true; txt_Name.Text = PublicClassForDataBase.CreateCategoryName(); txt_Age.Text = "0"; } else { lbl_Hint_Name.Visible = true; lbl_Hint_Age.Visible = true; txt_Name.ReadOnly = false; txt_Age.ReadOnly = false; radioGroup_Gender.ReadOnly = false; txt_Name.Text = ""; txt_Age.Text = ""; } } /// /// 证件类型 /// /// /// private void comboBox_Credentials_Type_SelectedIndexChanged(object sender, EventArgs e) { string Type = PublicClass.ToString(comboBox_Credentials_Type.Text,""); if (Type == "" || Type == "未知" || Type == "请选择") { txt_IdentityCard.Visible = false; } else { txt_IdentityCard.Visible = true; } } /// /// 无法精确 /// /// /// private void checkEdit_TimeOfOnset_CheckedChanged(object sender, EventArgs e) { if (checkEdit_Is_Null_Attack_Detail_Time.Checked) { lbl_Attack_Time.Text = "发病日期:"; lbl_Attack_Zone.Visible = true; lookUp_Attack_Zone.Visible = true; lookUp_Attack_Zone.EditValue = "0"; //只显示日期 time_Attack_Time.FormatString_Date = TimeControl.DateFormat.yyyyMMdd; } else { lbl_Attack_Time.Text = "发病时间:"; time_Attack_Time.FormatString_Date = TimeControl.DateFormat.yyyyMMddHHmm; lbl_Attack_Zone.Visible = false; lookUp_Attack_Zone.Visible = false; } } #endregion } }