using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using HL_FristAidPlatform_DTO; using HL_FristAidPlatform_Public; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Reflection; using System.Windows.Forms; namespace HL_FristAidPlatform_Apoplexy { public partial class Form_PatientTurnOver : XtraForm { public string patientGuid; public string ACZLType; public int auditStatus; private int eyesOpenScore; private int verbalResponseScore; private int limbExerciseScore; public string aczltype = ""; public string mdllCType = ""; public int nihssgFlag; public int gcsFlag; int addCount = 1; private PatientNIHSSDTO nihss = new PatientNIHSSDTO(); private PatientGCSDTO gcs = new PatientGCSDTO(); public List list = new List(); /// /// 文本框历史记录 /// private TextBoxRemind remind = null; public List nameList = new List(); public List codeList = new List(); public Form_PatientTurnOver(string guid, string aczlType, int _auditStatus) { InitializeComponent(); patientGuid = guid; ACZLType = aczlType; auditStatus = _auditStatus; } private void radio_KFZLYN_SelectedIndexChanged(object sender, EventArgs e) { if (radio_KFZLYN.SelectedIndex == 0) { panel_KFZLYN.Visible = true; } else { panel_KFZLYN.Visible = false; for (int j = 0; j < checked_KFPlace.Items.Count; j++) { checked_KFPlace.SetItemChecked(j, false); } for (int j = 0; j < checked_KFWays.Items.Count; j++) { checked_KFWays.SetItemChecked(j, false); } } } private void Form_PatientTurnOver_Load(object sender, EventArgs e) { List lst = DBHelpClass.GetList(string.Format("api/base/T_Base_InpatientDepartment/GetListBySystemModuleID?systemId={0}", long.Parse(PublicClassForDataBase.Config10002))); DataTable hdt = ListToDataTable(lst); PublicClass.SetLookUpList(ref look_Hospitalization, hdt, 0, 1, false); string url1 = string.Format("api/service/T_Service_Patient/GetApoplexyBaseModel?PatientGUID={0}", patientGuid); T_Service_PatientApoplexyBaseDTO patientDTO = DBHelpClass.GetDateModel(url1); if (patientDTO != null) { if (patientDTO.IllnessLevel == "5") { checked_CYLyFs.SetItemChecked(5, true); } } DataTable dataTable = DBHelpClass.Get(string.Format("api/service/T_Service_Apoplexy_EmergencyRoom/GetByPatientGuid?patientGuid={0}", patientGuid)); if (dataTable != null && dataTable.Rows.Count > 0) { if (dataTable.Rows[0]["PatientLocation"] + "" == "3") { checked_CYLyFs.SetItemChecked(5, true); } } list = DBHelpClass.GetList(string.Format("api/base/T_Base_Diagnose/GetDiagnosisDetailAll")); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { nameList.Add(list[i].Name); if (string.IsNullOrEmpty(list[i].Code)) { codeList.Add(""); } else { codeList.Add(list[i].Code); } } } gid_OtherDiagnosticName1.Properties.DataSource = nameList; OtherDiagnosticCode1.Properties.DataSource = codeList; gid_OtherDiagnosticName2.Properties.DataSource = nameList; OtherDiagnosticCode2.Properties.DataSource = codeList; gid_OtherDiagnosticName3.Properties.DataSource = nameList; OtherDiagnosticCode3.Properties.DataSource = codeList; gid_OtherDiagnosticName4.Properties.DataSource = nameList; OtherDiagnosticCode4.Properties.DataSource = codeList; gid_OtherDiagnosticName5.Properties.DataSource = nameList; OtherDiagnosticCode5.Properties.DataSource = codeList; gid_OtherDiagnosticName6.Properties.DataSource = nameList; OtherDiagnosticCode6.Properties.DataSource = codeList; gid_OtherDiagnosticName11.Properties.DataSource = nameList; OtherDiagnosticCode11.Properties.DataSource = codeList; gid_OtherDiagnosticName8.Properties.DataSource = nameList; OtherDiagnosticCode8.Properties.DataSource = codeList; gid_OtherDiagnosticName9.Properties.DataSource = nameList; OtherDiagnosticCode9.Properties.DataSource = codeList; gid_OtherDiagnosticName10.Properties.DataSource = nameList; OtherDiagnosticCode10.Properties.DataSource = codeList; gid_OtherDiagnosticName11.Properties.DataSource = nameList; OtherDiagnosticCode11.Properties.DataSource = codeList; gid_OtherDiagnosticName12.Properties.DataSource = nameList; OtherDiagnosticCode12.Properties.DataSource = codeList; gid_OtherDiagnosticName13.Properties.DataSource = nameList; OtherDiagnosticCode13.Properties.DataSource = codeList; gid_OtherDiagnosticName14.Properties.DataSource = nameList; OtherDiagnosticCode14.Properties.DataSource = codeList; gid_OtherDiagnosticName15.Properties.DataSource = nameList; OtherDiagnosticCode15.Properties.DataSource = codeList; try { ACZLTypeAuditModel model = new ACZLTypeAuditModel(); string url = string.Format("api/service/T_Service_Patient/GetApoplexyHospitalModel?guid={0}", patientGuid); model = DBHelpClass.GetDateModel(url); if (model != null) { aczltype = model.ACZLType; auditStatus = model.Audit; mdllCType = model.DMLLCType; } if (string.IsNullOrEmpty(aczltype)) { panelCYQK.Enabled = false; panelControl14.Visible = true; lbl_Msg.Text = "填写出院情况之前,请确定患者的治疗类型等相关信息"; panel1.Visible = false; } else { if (aczltype.Contains("03") || aczltype.Contains("04") || aczltype.Contains("05")) { panelCYPG.Visible = true; panel_CYDY.Visible = true; } if (aczltype.Contains("03") || aczltype.Contains("04") || aczltype.Contains("05")) { panelMRS.Visible = true; } if (aczltype.Contains("04") || aczltype.Contains("05")) { panelNIHSS.Visible = true; } if ((aczltype.Contains("04") || aczltype.Contains("03")) && (mdllCType == "1" || mdllCType == "2")) { panelGCS.Visible = true; } radioGroup1.SelectedIndex = -1; radioGroup2.SelectedIndex = -1; radioGroup3.SelectedIndex = -1; string Url = string.Format("api/service/T_Service_Apoplexy_PatientOutcome/GetPatientTurnOverInfo?patientGuid={0}", patientGuid); DataTable dt = DBHelpClass.GetDataRow(Url); if (dt != null) { if (dt.Rows.Count > 0) { #region time_DiagnosisTime.TimeValue = dt.Rows[0]["DiagnosisTime"].ToString(); time_HospitalizationTime.TimeValue = dt.Rows[0]["HospitalizationTime"].ToString(); txt_DischargeDoctor.Text = dt.Rows[0]["DischargeDoctor"].ToString(); if (!string.IsNullOrEmpty(dt.Rows[0]["Comorbidities"].ToString())) cmb_Comorbidities.Text = dt.Rows[0]["Comorbidities"].ToString(); radio_TreatmentEffect.EditValue = string.IsNullOrEmpty(dt.Rows[0]["TreatmentEffect"].ToString()) ? "" : dt.Rows[0]["TreatmentEffect"].ToString(); radio_DVT.EditValue = string.IsNullOrEmpty(dt.Rows[0]["DVT"].ToString()) ? -1 : int.Parse(dt.Rows[0]["DVT"].ToString()); #endregion if (!string.IsNullOrEmpty(dt.Rows[0]["Diagnosis"].ToString())) { if (dt.Rows[0]["Diagnosis"].ToString() != "-1") { radioGroup_Diagnosis.SelectedIndex = int.Parse(dt.Rows[0]["Diagnosis"].ToString()) - 1; } } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName1"] + "")) { addCount = 1; gid_OtherDiagnosticName1.EditValue = dt.Rows[0]["OtherDiagnosticName1"] + ""; OtherDiagnosticCode1.EditValue = dt.Rows[0]["OtherDiagnosticCode1"] + ""; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName2"] + "")) { addCount = 2; panelControl4.Height = panelControl4.Height + 40; gid_OtherDiagnosticName2.EditValue = dt.Rows[0]["OtherDiagnosticName2"] + ""; OtherDiagnosticCode2.EditValue = dt.Rows[0]["OtherDiagnosticCode2"] + ""; gid_OtherDiagnosticName2.Visible = true; OtherDiagnosticCode2.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName3"] + "")) { addCount = 3; gid_OtherDiagnosticName3.EditValue = dt.Rows[0]["OtherDiagnosticName3"] + ""; OtherDiagnosticCode3.EditValue = dt.Rows[0]["OtherDiagnosticCode3"] + ""; labelControl34.Visible = true; gid_OtherDiagnosticName3.Visible = true; OtherDiagnosticCode3.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName4"] + "")) { addCount = 4; panelControl4.Height = panelControl4.Height + 40; gid_OtherDiagnosticName4.EditValue = dt.Rows[0]["OtherDiagnosticName4"] + ""; OtherDiagnosticCode4.EditValue = dt.Rows[0]["OtherDiagnosticCode4"] + ""; labelControl33.Visible = true; gid_OtherDiagnosticName4.Visible = true; OtherDiagnosticCode4.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName5"] + "")) { addCount = 5; gid_OtherDiagnosticName5.EditValue = dt.Rows[0]["OtherDiagnosticName5"] + ""; OtherDiagnosticCode5.EditValue = dt.Rows[0]["OtherDiagnosticCode5"] + ""; labelControl36.Visible = true; gid_OtherDiagnosticName5.Visible = true; OtherDiagnosticCode5.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName6"] + "")) { addCount = 6; panelControl4.Height = panelControl4.Height + 40; gid_OtherDiagnosticName6.EditValue = dt.Rows[0]["OtherDiagnosticName6"] + ""; OtherDiagnosticCode6.EditValue = dt.Rows[0]["OtherDiagnosticCode6"] + ""; labelControl35.Visible = true; gid_OtherDiagnosticName6.Visible = true; OtherDiagnosticCode6.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName11"] + "")) { addCount = 11; labelControl38.Visible = true; gid_OtherDiagnosticName11.EditValue = dt.Rows[0]["OtherDiagnosticName11"] + ""; OtherDiagnosticCode11.EditValue = dt.Rows[0]["OtherDiagnosticCode11"] + ""; gid_OtherDiagnosticName11.Visible = true; OtherDiagnosticCode11.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName8"] + "")) { addCount = 8; panelControl4.Height = panelControl4.Height + 40; labelControl37.Visible = true; gid_OtherDiagnosticName8.EditValue = dt.Rows[0]["OtherDiagnosticName8"] + ""; OtherDiagnosticCode8.EditValue = dt.Rows[0]["OtherDiagnosticCode8"] + ""; gid_OtherDiagnosticName8.Visible = true; OtherDiagnosticCode8.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName9"] + "")) { addCount = 9; labelControl40.Visible = true; gid_OtherDiagnosticName9.EditValue = dt.Rows[0]["OtherDiagnosticName9"] + ""; OtherDiagnosticCode9.EditValue = dt.Rows[0]["OtherDiagnosticCode9"] + ""; gid_OtherDiagnosticName9.Visible = true; OtherDiagnosticCode9.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName10"] + "")) { addCount = 10; panelControl4.Height = panelControl4.Height + 40; labelControl39.Visible = true; gid_OtherDiagnosticName10.EditValue = dt.Rows[0]["OtherDiagnosticName10"] + ""; OtherDiagnosticCode10.EditValue = dt.Rows[0]["OtherDiagnosticCode10"] + ""; gid_OtherDiagnosticName10.Visible = true; OtherDiagnosticCode10.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName11"] + "")) { addCount = 11; labelControl42.Visible = true; gid_OtherDiagnosticName11.EditValue = dt.Rows[0]["OtherDiagnosticName11"] + ""; OtherDiagnosticCode11.EditValue = dt.Rows[0]["OtherDiagnosticCode11"] + ""; gid_OtherDiagnosticName11.Visible = true; OtherDiagnosticCode11.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName12"] + "")) { addCount = 12; panelControl4.Height = panelControl4.Height + 40; labelControl41.Visible = true; gid_OtherDiagnosticName12.EditValue = dt.Rows[0]["OtherDiagnosticName12"] + ""; OtherDiagnosticCode12.EditValue = dt.Rows[0]["OtherDiagnosticCode12"] + ""; gid_OtherDiagnosticName12.Visible = true; OtherDiagnosticCode12.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName13"] + "")) { addCount = 13; labelControl44.Visible = true; gid_OtherDiagnosticName13.EditValue = dt.Rows[0]["OtherDiagnosticName13"] + ""; OtherDiagnosticCode13.EditValue = dt.Rows[0]["OtherDiagnosticCode13"] + ""; gid_OtherDiagnosticName13.Visible = true; OtherDiagnosticCode13.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName14"] + "")) { addCount = 14; panelControl4.Height = panelControl4.Height + 40; labelControl43.Visible = true; gid_OtherDiagnosticName14.EditValue = dt.Rows[0]["OtherDiagnosticName14"] + ""; OtherDiagnosticCode14.EditValue = dt.Rows[0]["OtherDiagnosticCode14"] + ""; gid_OtherDiagnosticName14.Visible = true; OtherDiagnosticCode14.Visible = true; } if (!string.IsNullOrEmpty(dt.Rows[0]["OtherDiagnosticName15"] + "")) { addCount = 15; labelControl46.Visible = true; gid_OtherDiagnosticName15.EditValue = dt.Rows[0]["OtherDiagnosticName15"] + ""; OtherDiagnosticCode15.EditValue = dt.Rows[0]["OtherDiagnosticCode15"] + ""; gid_OtherDiagnosticName15.Visible = true; OtherDiagnosticCode15.Visible = true; } radio_JYEduYN.SelectedIndex = dt.Rows[0]["JYEduYN"].ToString() == "1" ? 0 : 1; if (radio_JYEduYN.SelectedIndex == 0 && !string.IsNullOrEmpty(dt.Rows[0]["JYEduWays"].ToString())) { string[] arryJYEduWays = dt.Rows[0]["JYEduWays"].ToString().Remove(0, 1).TrimEnd(';').Split(new char[] { ';' }); for (int i = 0; i < arryJYEduWays.Length; i++) { for (int j = 0; j < checked_JYEduWays.Items.Count; j++) { if (checked_JYEduWays.Items[j].Value.ToString().Trim().Contains(arryJYEduWays[i])) { checked_JYEduWays.SetItemChecked(j, true); } } } } radio_KFZLYN.SelectedIndex = dt.Rows[0]["KFZLYN"].ToString() == "1" ? 0 : 1; if (!string.IsNullOrEmpty(dt.Rows[0]["KFZLYN"].ToString())) { if (!string.IsNullOrEmpty(dt.Rows[0]["KFPlace"].ToString())) { string[] arryKFPlace = dt.Rows[0]["KFPlace"].ToString().Remove(0, 1).TrimEnd(';').Split(new char[] { ';' }); for (int i = 0; i < arryKFPlace.Length; i++) { for (int j = 0; j < checked_KFPlace.Items.Count; j++) { if (checked_KFPlace.Items[j].Value.ToString().Trim().Contains(arryKFPlace[i])) { checked_KFPlace.SetItemChecked(j, true); } } } } if (!string.IsNullOrEmpty(dt.Rows[0]["KFWays"].ToString())) { string[] arryKFWays = dt.Rows[0]["KFWays"].ToString().Remove(0, 1).TrimEnd(';').Split(new char[] { ';' }); for (int i = 0; i < arryKFWays.Length; i++) { for (int j = 0; j < checked_KFWays.Items.Count; j++) { if (checked_KFWays.Items[j].Value.ToString().Trim().Contains(arryKFWays[i])) { checked_KFWays.SetItemChecked(j, true); } } } } } time_CYTime.TimeValue = dt.Rows[0]["CYTime"].ToString(); textEdit_HospitalDay.Text = dt.Rows[0]["HospitalDay"].ToString(); look_Hospitalization.EditValue = String.IsNullOrEmpty(dt.Rows[0]["DischargeDepartment"].ToString()) ? -1 : int.Parse(dt.Rows[0]["DischargeDepartment"].ToString()); textEdit_AllInCost.Text = dt.Rows[0]["AllInCost"].ToString(); if (!string.IsNullOrEmpty(dt.Rows[0]["CYDY"].ToString())) { string[] arryCYDY = dt.Rows[0]["CYDY"].ToString().Remove(0, 1).TrimEnd(';').Split(new char[] { ';' }); for (int i = 0; i < arryCYDY.Length; i++) { for (int j = 0; j < checked_CYDY.Items.Count; j++) { if (checked_CYDY.Items[j].Value.ToString().Trim().Contains(arryCYDY[i])) { checked_CYDY.SetItemChecked(j, true); } } } } if (!string.IsNullOrEmpty(dt.Rows[0]["CYLyFs"].ToString())) { for (int j = 0; j < checked_CYLyFs.Items.Count; j++) { if (checked_CYLyFs.Items[j].Value.ToString().Trim().Contains(dt.Rows[0]["CYLyFs"].ToString())) { checked_CYLyFs.SetItemChecked(j, true); } } } if (!string.IsNullOrEmpty(dt.Rows[0]["CYSwYy"].ToString())) { string[] arryCYSwYy = dt.Rows[0]["CYSwYy"].ToString().Remove(0, 1).TrimEnd(';').Split(new char[] { ';' }); for (int i = 0; i < arryCYSwYy.Length; i++) { for (int j = 0; j < checked_CYSwYy.Items.Count; j++) { if (checked_CYSwYy.Items[j].Value.ToString().Trim().Contains(arryCYSwYy[i])) { checked_CYSwYy.SetItemChecked(j, true); } } } } txt_CYSwYyOther.Text = dt.Rows[0]["CYSwYyOther"].ToString(); radio_CYMRSYesNo.EditValue = dt.Rows[0]["CYMRSYesNo"].ToString(); txt_CYMRS.Text = dt.Rows[0]["CYMRS"].ToString(); if (!string.IsNullOrEmpty(dt.Rows[0]["CYMRSYesNo"].ToString())) radio_CYMRS.EditValue = dt.Rows[0]["CYMRSYesNo"].ToString(); radio_CYNIHSSYesNo.EditValue = dt.Rows[0]["CYNIHSSYesNo"].ToString(); txt_CYNIHSS.Text = dt.Rows[0]["CYNIHSS"].ToString(); radio_GCSYesNo.EditValue = dt.Rows[0]["ZWMPGCYGCSYN"].ToString(); txt_ZWMPGCYGCS.Text = dt.Rows[0]["ZWMPGCYGCS"].ToString(); txt_Remark.Text = dt.Rows[0]["Remark"].ToString(); } } //if (auditStatus == 2) //{ // panelControl14.Visible = true; //} //else //{ // panelControl14.Visible = false; //} } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "卒中患者出院信息查询:\r\n" + ex); } } /// /// C# List转换成DataTable /// /// /// public static DataTable ListToDataTable(IList list) { DataTable result = new DataTable(); if (list.Count > 0) { PropertyInfo[] propertys = list[0].GetType().GetProperties(); foreach (PropertyInfo pi in propertys) { //获取类型 Type colType = pi.PropertyType; //当类型为Nullable<>时 if ((colType.IsGenericType) && (colType.GetGenericTypeDefinition() == typeof(Nullable<>))) { colType = colType.GetGenericArguments()[0]; } result.Columns.Add(pi.Name, colType); } for (int i = 0; i < list.Count; i++) { ArrayList tempList = new ArrayList(); foreach (PropertyInfo pi in propertys) { object obj = pi.GetValue(list[i], null); tempList.Add(obj); } object[] array = tempList.ToArray(); result.LoadDataRow(array, true); } } return result; } public void SaveTurnOver() { try { if (string.IsNullOrEmpty(time_CYTime.TimeValue.ToString())) { XtraMessageBox.Show("出院时间不能为空"); time_CYTime.Focus(); return; } if (checked_CYLyFs.CheckedItems.Count == 0) { XtraMessageBox.Show("请选择一个离院方式"); checked_CYLyFs.Focus(); return; } //出院科室look_Hospitalization if (look_Hospitalization.EditValue == null) { XtraMessageBox.Show("请选择一个出院科室"); checked_CYLyFs.Focus(); return; } PatientTurnOverDTO dto = new PatientTurnOverDTO(); dto.NIHSS = new PatientNIHSSDTO(); dto.GCS = new PatientGCSDTO(); List list = new List(); dto.PatientGuid = patientGuid; #region if (!string.IsNullOrEmpty(time_DiagnosisTime.TimeValue.ToString())) dto.DiagnosisTime = Convert.ToDateTime(time_DiagnosisTime.TimeValue).ToString("yyyy-MM-dd HH:mm"); if (!string.IsNullOrEmpty(time_HospitalizationTime.TimeValue)) dto.HospitalizationTime = Convert.ToDateTime(time_HospitalizationTime.TimeValue).ToString("yyyy-MM-dd HH:mm"); dto.DischargeDepartment = string.IsNullOrEmpty(look_Hospitalization.EditValue.ToString()) ? 0 : int.Parse(look_Hospitalization.EditValue.ToString()); dto.DischargeDoctor = txt_DischargeDoctor.Text; dto.Comorbidities = cmb_Comorbidities.Text; dto.TreatmentEffect = radio_TreatmentEffect.SelectedIndex > -1 ? radio_TreatmentEffect.EditValue.ToString() : ""; dto.DVT = radio_DVT.SelectedIndex > -1 ? radio_DVT.EditValue.ToString() : ""; #endregion dto.Diagnosis = radioGroup_Diagnosis.SelectedIndex > -1 ? int.Parse(radioGroup_Diagnosis.EditValue.ToString()) : 0; dto.MainDiagnosticName = radioGroup_Diagnosis.SelectedIndex > -1 ? radioGroup_Diagnosis.Properties.Items[radioGroup_Diagnosis.SelectedIndex].Description : ""; dto.MainDiagnosticCode = radioGroup_Diagnosis.SelectedIndex > -1 ? (string)radioGroup_Diagnosis.Properties.Items[radioGroup_Diagnosis.SelectedIndex].Tag : ""; dto.OtherDiagnosticName1 = gid_OtherDiagnosticName1.EditValue.ToString(); dto.OtherDiagnosticCode1 = OtherDiagnosticCode1.EditValue.ToString(); dto.OtherDiagnosticName2 = gid_OtherDiagnosticName2.EditValue.ToString(); dto.OtherDiagnosticCode2 = OtherDiagnosticCode2.EditValue.ToString(); dto.OtherDiagnosticName3 = gid_OtherDiagnosticName3.EditValue.ToString(); dto.OtherDiagnosticCode3 = OtherDiagnosticCode3.EditValue.ToString(); dto.OtherDiagnosticName4 = gid_OtherDiagnosticName4.EditValue.ToString(); dto.OtherDiagnosticCode4 = OtherDiagnosticCode4.EditValue.ToString(); dto.OtherDiagnosticName5 = gid_OtherDiagnosticName5.EditValue.ToString(); dto.OtherDiagnosticCode5 = OtherDiagnosticCode5.EditValue.ToString(); dto.OtherDiagnosticName6 = gid_OtherDiagnosticName6.EditValue.ToString(); dto.OtherDiagnosticCode6 = OtherDiagnosticCode6.EditValue.ToString(); dto.OtherDiagnosticName11 = gid_OtherDiagnosticName11.EditValue.ToString(); dto.OtherDiagnosticCode11 = OtherDiagnosticCode11.EditValue.ToString(); dto.OtherDiagnosticName8 = gid_OtherDiagnosticName8.EditValue.ToString(); dto.OtherDiagnosticCode8 = OtherDiagnosticCode8.EditValue.ToString(); dto.OtherDiagnosticName9 = gid_OtherDiagnosticName9.EditValue.ToString(); dto.OtherDiagnosticCode9 = OtherDiagnosticCode9.EditValue.ToString(); dto.OtherDiagnosticName10 = gid_OtherDiagnosticName10.EditValue.ToString(); dto.OtherDiagnosticCode10 = OtherDiagnosticCode10.EditValue.ToString(); dto.OtherDiagnosticName11 = gid_OtherDiagnosticName11.EditValue.ToString(); dto.OtherDiagnosticCode11 = OtherDiagnosticCode11.EditValue.ToString(); dto.OtherDiagnosticName12 = gid_OtherDiagnosticName12.EditValue.ToString(); dto.OtherDiagnosticCode12 = OtherDiagnosticCode12.EditValue.ToString(); dto.OtherDiagnosticName13 = gid_OtherDiagnosticName13.EditValue.ToString(); dto.OtherDiagnosticCode13 = OtherDiagnosticCode13.EditValue.ToString(); dto.OtherDiagnosticName14 = gid_OtherDiagnosticName14.EditValue.ToString(); dto.OtherDiagnosticCode14 = OtherDiagnosticCode14.EditValue.ToString(); dto.OtherDiagnosticName15 = gid_OtherDiagnosticName15.EditValue.ToString(); dto.OtherDiagnosticCode15 = OtherDiagnosticCode15.EditValue.ToString(); if (!string.IsNullOrEmpty(dto.RelatedDiagnosis)) { dto.RelatedDiagnosis += ";"; } #region 健康教育 dto.JYEduYN = radio_JYEduYN.SelectedIndex == -1 ? "" : radio_JYEduYN.Properties.Items[radio_JYEduYN.SelectedIndex].Value.ToString(); for (int i = 0; i < checked_JYEduWays.Items.Count; i++) { if (checked_JYEduWays.Items[i].CheckState == CheckState.Checked) { dto.JYEduWays += ";" + checked_JYEduWays.Items[i].Value.ToString(); } } if (!string.IsNullOrEmpty(dto.JYEduWays)) { dto.JYEduWays += ";"; } #endregion 健康教育 #region 康复治疗 dto.KFZLYN = radio_KFZLYN.SelectedIndex == -1 ? "" : radio_KFZLYN.Properties.Items[radio_KFZLYN.SelectedIndex].Value.ToString(); for (int i = 0; i < checked_KFPlace.Items.Count; i++) { if (checked_KFPlace.Items[i].CheckState == CheckState.Checked) { dto.KFPlace += ";" + checked_KFPlace.Items[i].Value.ToString(); } } if (!string.IsNullOrEmpty(dto.KFPlace)) { dto.KFPlace += ";"; } for (int i = 0; i < checked_KFWays.Items.Count; i++) { if (checked_KFWays.Items[i].CheckState == CheckState.Checked) { dto.KFWays += ";" + checked_KFWays.Items[i].Value.ToString(); } } if (!string.IsNullOrEmpty(dto.KFWays)) { dto.KFWays += ";"; } #endregion 康复治疗 #region 出院情况 if (!string.IsNullOrEmpty(aczltype)) { if (!string.IsNullOrEmpty(time_CYTime.TimeValue)) dto.CYTime = Convert.ToDateTime(time_CYTime.TimeValue).ToString("yyyy-MM-dd"); for (int i = 0; i < checked_CYLyFs.Items.Count; i++) { if (checked_CYLyFs.Items[i].CheckState == CheckState.Checked) { dto.CYLyFs = checked_CYLyFs.Items[i].Value.ToString(); } } if (!string.IsNullOrEmpty(dto.CYLyFs) && dto.CYLyFs.Contains("5")) { dto.CYSwSj = time_CYSwSj.TimeValue.ToString(); for (int i = 0; i < checked_CYSwYy.Items.Count; i++) { if (checked_CYSwYy.Items[i].CheckState == CheckState.Checked) dto.CYSwYy += ";" + checked_CYSwYy.Items[i].Value.ToString(); } if (!string.IsNullOrEmpty(dto.CYSwYy)) { dto.CYSwYy += ";"; if (dto.CYSwYy.Contains("99")) dto.CYSwYyOther = txt_CYSwYyOther.Text; } } if (aczltype.Contains("03") || aczltype.Contains("04") || aczltype.Contains("05")) { for (int i = 0; i < checked_CYDY.Items.Count; i++) { if (checked_CYDY.Items[i].CheckState == CheckState.Checked) { dto.CYDY += ";" + checked_CYDY.Items[i].Value.ToString(); } } if (!string.IsNullOrEmpty(dto.CYDY)) { dto.CYDY += ";"; } //dto.CYMRSYesNo = radio_CYMRSYesNo.EditValue.ToString(); //dto.CYMRS = txt_CYMRS.Text; } } #endregion 出院情况 dto.CYNIHSS = txt_CYNIHSS.Text; dto.HospitalDay = textEdit_HospitalDay.Text; dto.AllInCost = textEdit_AllInCost.Text; dto.CYNIHSSYesNo = radio_CYNIHSSYesNo.SelectedIndex > -1 ? radio_CYNIHSSYesNo.EditValue.ToString() : ""; dto.NIHSS = nihss; //if (aczltype.Contains("04") || aczltype.Contains("05")) //{ // dto.CYNIHSS = txt_CYNIHSS.Text; // dto.CYNIHSSYesNo = radio_CYNIHSSYesNo.EditValue.ToString(); // dto.NIHSS = nihss; //} //if (aczltype.Contains("04") || aczltype.Contains("03")) //{ // dto.ZWMPGCYGCSYN = radio_GCSYesNo.EditValue.ToString(); // dto.ZWMPGCYGCS = txt_ZWMPGCYGCS.Text; // dto.GCS = gcs; //} if (gcsFlag == 1) { dto.GCS.CreateUser = Information.User.ID; dto.GCS.EyesOpenScore = eyesOpenScore; dto.GCS.VerbalResponseScore = verbalResponseScore; dto.GCS.LimbExerciseScore = limbExerciseScore; dto.GCS.TotalScore = eyesOpenScore + verbalResponseScore + limbExerciseScore; dto.GCS.Flag = 2; } if (nihssgFlag == 1) { dto.NIHSS = nihss; } if (radio_GCSYesNo.SelectedIndex > -1) { dto.ZWMPGCYGCSYN = radio_GCSYesNo.EditValue.ToString(); dto.ZWMPGCYGCS = txt_ZWMPGCYGCS.Text; } if (radio_CYNIHSSYesNo.SelectedIndex > -1) { dto.CYNIHSSYesNo = radio_CYNIHSSYesNo.EditValue.ToString(); dto.CYNIHSS = txt_CYNIHSS.Text; } if (radio_CYMRSYesNo.SelectedIndex > -1) { dto.CYMRSYesNo = radio_CYMRSYesNo.EditValue.ToString(); dto.CYMRS = txt_CYMRS.Text; } dto.Remark = txt_Remark.Text; dto.CreateUser = Information.User.ID; list.Add(dto); string Url = string.Empty; Url = "api/service/ApoplexyPatientTran/SaveTurnOver"; //初始化两个工厂 ClientFactory httpClient = new HttpClientFactory(); Client client = httpClient.VisitFactory(); //访问 ListEntity t = client.Post(Url, list); if (t.Success) { if (!string.IsNullOrEmpty(t.DataString)) { if (t.DataString.Contains("Success")) { JObject jo = (JObject)JsonConvert.DeserializeObject(t.DataString); string msg = jo["Msg"].ToString(); if (!string.IsNullOrEmpty(msg)) { XtraMessageBox.Show(msg); } } else { string msg1 = t.DataString.Replace("/", "").Replace(@"\", "").Replace("\"", ""); XtraMessageBox.Show(msg1); } } } else { XtraMessageBox.Show("保存失败"); } } catch (Exception ex) { PublicClass.WriteErrorLog(this.Text, "卒中患者出院信息保存:\r\n" + ex); } } public void RefreshNIHSS(string sorce, PatientNIHSSDTO nihss1) { txt_CYNIHSS.Text = sorce; nihss = nihss1; if (!string.IsNullOrEmpty(sorce)) { nihss.Flag = 10; nihss.PatientGUID = patientGuid; nihss.CreateUser = Information.User.ID; nihss.TotalScore = int.Parse(sorce); radio_CYNIHSSYesNo.SelectedIndex = 0; nihssgFlag = 1; } } private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) { switch (radioGroup1.SelectedIndex) { case 0: eyesOpenScore = 4; break; case 1: eyesOpenScore = 3; break; case 2: eyesOpenScore = 2; break; case 3: eyesOpenScore = 1; break; } gcs.EyesOpenScore = radioGroup1.SelectedIndex == -1 ? 0 : radioGroup1.SelectedIndex; gcs.TotalScore = gcs.EyesOpenScore + gcs.VerbalResponseScore + gcs.LimbExerciseScore; txt_ZWMPGCYGCS.Text = (eyesOpenScore + verbalResponseScore + limbExerciseScore).ToString(); gcsFlag = 1; } private void radioGroup2_SelectedIndexChanged(object sender, EventArgs e) { switch (radioGroup2.SelectedIndex) { case 0: verbalResponseScore = 5; break; case 1: verbalResponseScore = 4; break; case 2: verbalResponseScore = 3; break; case 3: verbalResponseScore = 2; break; case 4: verbalResponseScore = 1; break; } gcs.VerbalResponseScore = radioGroup2.SelectedIndex == -1 ? 0 : radioGroup2.SelectedIndex; gcs.TotalScore = gcs.EyesOpenScore + gcs.VerbalResponseScore + gcs.LimbExerciseScore; txt_ZWMPGCYGCS.Text = (eyesOpenScore + verbalResponseScore + limbExerciseScore).ToString(); gcsFlag = 1; } private void radioGroup3_SelectedIndexChanged(object sender, EventArgs e) { switch (radioGroup3.SelectedIndex) { case 0: limbExerciseScore = 6; break; case 1: limbExerciseScore = 5; break; case 2: limbExerciseScore = 4; break; case 3: limbExerciseScore = 3; break; case 4: limbExerciseScore = 2; break; case 5: limbExerciseScore = 1; break; } gcs.LimbExerciseScore = radioGroup3.SelectedIndex == -1 ? 0 : radioGroup3.SelectedIndex; gcs.TotalScore = gcs.EyesOpenScore + gcs.VerbalResponseScore + gcs.LimbExerciseScore; txt_ZWMPGCYGCS.Text = (eyesOpenScore + verbalResponseScore + limbExerciseScore).ToString(); gcsFlag = 1; } private void radio_JYEduYN_SelectedIndexChanged(object sender, EventArgs e) { if (radio_JYEduYN.SelectedIndex == 0) { checked_JYEduWays.Visible = true; labelControl3.Visible = true; } else { checked_JYEduWays.Visible = false; labelControl3.Visible = false; } if (radio_JYEduYN.SelectedIndex == 1) { for (int j = 0; j < checked_JYEduWays.Items.Count; j++) { checked_JYEduWays.SetItemChecked(j, false); } } } private void checked_CYLyFs_SelectedIndexChanged(object sender, EventArgs e) { if (checked_CYLyFs.SelectedIndex == 4) { panel_Die.Visible = true; } else { panel_Die.Visible = false; } } private void checked_CYSwYy_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) { string checkState = checked_CYSwYy.GetItemCheckState(11).ToString(); if (checkState == "Checked") { for (int i = 0; i < checked_CYSwYy.Items.Count; i++) { if (checked_CYSwYy.Items[i].Value.ToString() == "99") { labelControl16.Visible = true; txt_CYSwYyOther.Visible = true; } } } else { for (int i = 0; i < checked_CYSwYy.Items.Count; i++) { if (checked_CYSwYy.Items[i].Value.ToString() == "99") { checked_CYSwYy.Items[i].CheckState = CheckState.Unchecked; labelControl16.Visible = false; txt_CYSwYyOther.Visible = false; } } } } private void radioGroup4_SelectedIndexChanged(object sender, EventArgs e) { if (radio_CYMRS.SelectedIndex > -1) { txt_CYMRS.Text = radio_CYMRS.SelectedIndex.ToString(); radio_CYMRSYesNo.SelectedIndex = 0; } } private void simpleButton2_Click(object sender, EventArgs e) { Form_PatientNIHSS nihssFrom = new Form_PatientNIHSS(1); nihssFrom.Owner = this; nihssFrom.Show(); } private void simpleButton1_Click(object sender, EventArgs e) { panelCYMRS.Visible = true; } private void simpleButton3_Click(object sender, EventArgs e) { panelZWMPGCYGCS.Visible = true; } private void radio_CYMRSYesNo_SelectedIndexChanged(object sender, EventArgs e) { if (radio_CYMRSYesNo.SelectedIndex > 0) { txt_CYMRS.Text = ""; radio_CYMRS.SelectedIndex = -1; panelCYMRS.Visible = false; } } private void radio_CYNIHSSYesNo_SelectedIndexChanged(object sender, EventArgs e) { if (radio_CYNIHSSYesNo.SelectedIndex > 0) { txt_CYNIHSS.Text = ""; panelCYMRS.Visible = false; } } private void radio_GCSYesNo_SelectedIndexChanged(object sender, EventArgs e) { if (radio_GCSYesNo.SelectedIndex > 0) { txt_ZWMPGCYGCS.Text = ""; radioGroup1.SelectedIndex = -1; radioGroup2.SelectedIndex = -1; radioGroup3.SelectedIndex = -1; panelZWMPGCYGCS.Visible = false; } } private void txt_ZWMPGCYGCS_TextChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txt_ZWMPGCYGCS.Text)) radio_GCSYesNo.SelectedIndex = 0; } private void simpleButton_ADD_Click(object sender, EventArgs e) { addCount++; if (addCount == 2) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode2.Visible = true; OtherDiagnosticCode2.Visible = true; labelControl5.Visible = true; gid_OtherDiagnosticName2.Visible = true; } if (addCount == 3) { lbl_OtherDiagnosticCode3.Visible = true; OtherDiagnosticCode3.Visible = true; labelControl34.Visible = true; gid_OtherDiagnosticName3.Visible = true; } if (addCount == 4) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode4.Visible = true; OtherDiagnosticCode4.Visible = true; labelControl33.Visible = true; gid_OtherDiagnosticName4.Visible = true; } if (addCount == 5) { lbl_OtherDiagnosticCode5.Visible = true; OtherDiagnosticCode5.Visible = true; labelControl36.Visible = true; gid_OtherDiagnosticName5.Visible = true; } if (addCount == 6) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode6.Visible = true; OtherDiagnosticCode6.Visible = true; labelControl35.Visible = true; gid_OtherDiagnosticName6.Visible = true; } if (addCount == 11) { lbl_OtherDiagnosticCode11.Visible = true; OtherDiagnosticCode11.Visible = true; labelControl38.Visible = true; gid_OtherDiagnosticName11.Visible = true; } if (addCount == 8) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode8.Visible = true; OtherDiagnosticCode8.Visible = true; labelControl37.Visible = true; gid_OtherDiagnosticName8.Visible = true; } if (addCount == 9) { lbl_OtherDiagnosticCode9.Visible = true; OtherDiagnosticCode9.Visible = true; labelControl40.Visible = true; gid_OtherDiagnosticName9.Visible = true; } if (addCount == 10) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode10.Visible = true; OtherDiagnosticCode10.Visible = true; labelControl39.Visible = true; gid_OtherDiagnosticName10.Visible = true; } if (addCount == 11) { lbl_OtherDiagnosticCode11.Visible = true; OtherDiagnosticCode11.Visible = true; labelControl42.Visible = true; gid_OtherDiagnosticName11.Visible = true; } if (addCount == 12) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode12.Visible = true; OtherDiagnosticCode12.Visible = true; labelControl41.Visible = true; gid_OtherDiagnosticName12.Visible = true; } if (addCount == 13) { lbl_OtherDiagnosticCode13.Visible = true; OtherDiagnosticCode13.Visible = true; labelControl44.Visible = true; gid_OtherDiagnosticName13.Visible = true; } if (addCount == 14) { panelControl4.Height = panelControl4.Height + 40; lbl_OtherDiagnosticCode14.Visible = true; OtherDiagnosticCode14.Visible = true; labelControl43.Visible = true; gid_OtherDiagnosticName14.Visible = true; } if (addCount == 15) { lbl_OtherDiagnosticCode15.Visible = true; OtherDiagnosticCode15.Visible = true; labelControl46.Visible = true; gid_OtherDiagnosticName15.Visible = true; } if (addCount > 15) { addCount = 15; } } private void simpleButton_subtract_Click(object sender, EventArgs e) { addCount--; if (addCount == 1) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode2.Visible = false; OtherDiagnosticCode2.Visible = false; labelControl5.Visible = false; gid_OtherDiagnosticName2.Visible = false; gid_OtherDiagnosticName2.EditValue = ""; OtherDiagnosticCode2.EditValue = ""; } if (addCount == 2) { lbl_OtherDiagnosticCode3.Visible = false; OtherDiagnosticCode3.Visible = false; labelControl34.Visible = false; gid_OtherDiagnosticName3.Visible = false; gid_OtherDiagnosticName3.EditValue = ""; OtherDiagnosticCode3.EditValue = ""; } if (addCount == 3) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode4.Visible = false; OtherDiagnosticCode4.Visible = false; labelControl33.Visible = false; gid_OtherDiagnosticName4.Visible = false; gid_OtherDiagnosticName4.EditValue = ""; OtherDiagnosticCode4.EditValue = ""; } if (addCount == 4) { lbl_OtherDiagnosticCode5.Visible = false; OtherDiagnosticCode5.Visible = false; labelControl36.Visible = false; gid_OtherDiagnosticName5.Visible = false; gid_OtherDiagnosticName5.EditValue = ""; OtherDiagnosticCode5.EditValue = ""; } if (addCount == 5) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode6.Visible = false; OtherDiagnosticCode6.Visible = false; labelControl35.Visible = false; gid_OtherDiagnosticName6.Visible = false; gid_OtherDiagnosticName6.EditValue = ""; OtherDiagnosticCode6.EditValue = ""; } if (addCount == 6) { lbl_OtherDiagnosticCode11.Visible = false; OtherDiagnosticCode11.Visible = false; labelControl38.Visible = false; gid_OtherDiagnosticName11.Visible = false; gid_OtherDiagnosticName11.EditValue = ""; OtherDiagnosticCode11.EditValue = ""; } if (addCount == 11) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode8.Visible = false; OtherDiagnosticCode8.Visible = false; labelControl31.Visible = false; gid_OtherDiagnosticName8.Visible = false; gid_OtherDiagnosticName8.EditValue = ""; OtherDiagnosticCode8.EditValue = ""; } if (addCount == 8) { lbl_OtherDiagnosticCode9.Visible = false; OtherDiagnosticCode9.Visible = false; labelControl37.Visible = false; gid_OtherDiagnosticName9.Visible = false; gid_OtherDiagnosticName9.EditValue = ""; OtherDiagnosticCode9.EditValue = ""; } if (addCount == 9) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode10.Visible = false; OtherDiagnosticCode10.Visible = false; labelControl39.Visible = false; gid_OtherDiagnosticName10.Visible = false; gid_OtherDiagnosticName10.EditValue = ""; OtherDiagnosticCode10.EditValue = ""; } if (addCount == 10) { lbl_OtherDiagnosticCode11.Visible = false; OtherDiagnosticCode11.Visible = false; labelControl42.Visible = false; gid_OtherDiagnosticName11.Visible = false; gid_OtherDiagnosticName11.EditValue = ""; OtherDiagnosticCode11.EditValue = ""; } if (addCount == 11) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode12.Visible = false; OtherDiagnosticCode12.Visible = false; labelControl41.Visible = false; gid_OtherDiagnosticName12.Visible = false; gid_OtherDiagnosticName12.EditValue = ""; OtherDiagnosticCode12.EditValue = ""; } if (addCount == 12) { lbl_OtherDiagnosticCode13.Visible = false; OtherDiagnosticCode13.Visible = false; labelControl44.Visible = false; gid_OtherDiagnosticName13.Visible = false; gid_OtherDiagnosticName13.EditValue = ""; OtherDiagnosticCode13.EditValue = ""; } if (addCount == 13) { panelControl4.Height = panelControl4.Height - 40; lbl_OtherDiagnosticCode14.Visible = false; OtherDiagnosticCode14.Visible = false; labelControl43.Visible = false; gid_OtherDiagnosticName14.Visible = false; gid_OtherDiagnosticName14.EditValue = ""; OtherDiagnosticCode14.EditValue = ""; } if (addCount == 14) { lbl_OtherDiagnosticCode15.Visible = false; OtherDiagnosticCode15.Visible = false; labelControl46.Visible = false; gid_OtherDiagnosticName15.Visible = false; gid_OtherDiagnosticName15.EditValue = ""; OtherDiagnosticCode15.EditValue = ""; } //if (addCount == 15) //{ // labelControl46.Visible = false; // textEdit_OtherDiagnosticName15.Visible = false; //} if (addCount < 1) { addCount = 1; } } private void simpleButton5_Click(object sender, EventArgs e) { Form_Diagnosis form_Diagnosis = new Form_Diagnosis(); form_Diagnosis.Show(); } private void radioGroup_Diagnosis_SelectedIndexChanged(object sender, EventArgs e) { if (radioGroup_Diagnosis.SelectedIndex > -1) txt_MainDiagnosticCode.Text = (string)radioGroup_Diagnosis.Properties.Items[radioGroup_Diagnosis.SelectedIndex].Tag; } /// /// 数据联动 /// /// /// /// public void DataLinkage(GridLookUpEdit grid1, GridLookUpEdit grid2) { if (!string.IsNullOrEmpty(grid1.EditValue.ToString())) { int index = nameList.FindIndex(x => x == grid1.EditValue.ToString()); string i = codeList[index].ToString(); grid2.EditValue = i; } } public void DataLinkage2(GridLookUpEdit grid1, GridLookUpEdit grid2) { if (!string.IsNullOrEmpty(grid1.EditValue.ToString())) { int index = codeList.FindIndex(x => x == grid1.EditValue.ToString()); string i = nameList[index].ToString(); grid2.EditValue = i; } } #region 诊断联动 private void gridLookUpEdit1_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName1, OtherDiagnosticCode1); } private void OtherDiagnosticCode1_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode1, gid_OtherDiagnosticName1); } private void gid_OtherDiagnosticName2_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName2, OtherDiagnosticCode2); } private void OtherDiagnosticCode2_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode2, gid_OtherDiagnosticName2); } private void gid_OtherDiagnosticName3_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName3, OtherDiagnosticCode3); } private void OtherDiagnosticCode3_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode3, gid_OtherDiagnosticName3); } private void gid_OtherDiagnosticName4_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName4, OtherDiagnosticCode4); } private void OtherDiagnosticCode4_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode4, gid_OtherDiagnosticName4); } private void gid_OtherDiagnosticName5_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName5, OtherDiagnosticCode5); } private void OtherDiagnosticCode5_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode5, gid_OtherDiagnosticName5); } private void gid_OtherDiagnosticName6_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName6, OtherDiagnosticCode6); } private void OtherDiagnosticCode6_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode6, gid_OtherDiagnosticName6); } private void gid_OtherDiagnosticName11_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName11, OtherDiagnosticCode11); } private void OtherDiagnosticCode11_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode11, gid_OtherDiagnosticName11); } private void gid_OtherDiagnosticName8_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName8, OtherDiagnosticCode8); } private void OtherDiagnosticCode8_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode8, gid_OtherDiagnosticName8); } private void gid_OtherDiagnosticName9_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName9, OtherDiagnosticCode9); } private void OtherDiagnosticCode9_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode9, gid_OtherDiagnosticName9); } private void gid_OtherDiagnosticName10_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName10, OtherDiagnosticCode10); } private void OtherDiagnosticCode10_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode10, gid_OtherDiagnosticName10); } private void gid_OtherDiagnosticName12_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName12, OtherDiagnosticCode12); } private void OtherDiagnosticCode12_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode12, gid_OtherDiagnosticName12); } private void gid_OtherDiagnosticName13_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName13, OtherDiagnosticCode13); } private void OtherDiagnosticCode13_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode13, gid_OtherDiagnosticName13); } private void gid_OtherDiagnosticName14_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName14, OtherDiagnosticCode14); } private void OtherDiagnosticCode14_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode14, gid_OtherDiagnosticName14); } private void gid_OtherDiagnosticName15_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName15, OtherDiagnosticCode15); } private void OtherDiagnosticCode15_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode15, gid_OtherDiagnosticName15); } private void gid_OtherDiagnosticName7_EditValueChanged(object sender, EventArgs e) { DataLinkage(gid_OtherDiagnosticName7, OtherDiagnosticCode7); } private void OtherDiagnosticCode7_EditValueChanged(object sender, EventArgs e) { DataLinkage2(OtherDiagnosticCode7, gid_OtherDiagnosticName7); } #endregion private void checked_CYDY_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) { if (checked_CYDY.SelectedIndex == 7) { string checkState = checked_CYDY.GetItemCheckState(7).ToString(); if (checkState == "Checked") { checked_CYDY.SetItemCheckState(0, CheckState.Unchecked); checked_CYDY.SetItemCheckState(1, CheckState.Unchecked); checked_CYDY.SetItemCheckState(2, CheckState.Unchecked); checked_CYDY.SetItemCheckState(3, CheckState.Unchecked); checked_CYDY.SetItemCheckState(4, CheckState.Unchecked); checked_CYDY.SetItemCheckState(5, CheckState.Unchecked); checked_CYDY.SetItemCheckState(6, CheckState.Unchecked); } } else { string checkState0 = checked_CYDY.GetItemCheckState(0).ToString(); string checkState1 = checked_CYDY.GetItemCheckState(1).ToString(); string checkState2 = checked_CYDY.GetItemCheckState(2).ToString(); string checkState3 = checked_CYDY.GetItemCheckState(3).ToString(); string checkState4 = checked_CYDY.GetItemCheckState(4).ToString(); string checkState5 = checked_CYDY.GetItemCheckState(5).ToString(); string checkState6 = checked_CYDY.GetItemCheckState(6).ToString(); if (checkState0 == "Checked" || checkState1 == "Checked" || checkState3 == "Checked" || checkState4 == "Checked" || checkState5 == "Checked" || checkState6 == "Checked" || checkState2 == "Checked") { checked_CYDY.SetItemCheckState(7, CheckState.Unchecked); } } } private void checked_KFPlace_ItemChecking(object sender, ItemCheckingEventArgs e) { string checkState = checked_KFPlace.GetItemCheckState(2).ToString(); if (checkState == "Checked") { cmb_HospitalUntil.Visible = true; } else { cmb_HospitalUntil.Visible = false; } } private void time_CYTime_TimeValueChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(time_CYTime.TimeValue.ToString()) && !string.IsNullOrEmpty(time_HospitalizationTime.TimeValue.ToString())) { TimeSpan duration = Convert.ToDateTime(time_CYTime.TimeValue) - Convert.ToDateTime(time_HospitalizationTime.TimeValue.ToString()); textEdit_HospitalDay.Text = ((int)duration.TotalDays).ToString(); } else { textEdit_HospitalDay.Text = ""; } } private void time_HospitalizationTime_TimeValueChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(time_CYTime.TimeValue.ToString()) && !string.IsNullOrEmpty(time_HospitalizationTime.TimeValue.ToString())) { TimeSpan duration = Convert.ToDateTime(time_CYTime.TimeValue) - Convert.ToDateTime(time_HospitalizationTime.TimeValue); textEdit_HospitalDay.Text = ((int)duration.TotalDays).ToString(); } else { textEdit_HospitalDay.Text = ""; } } } }