744 lines
33 KiB
C#
744 lines
33 KiB
C#
using DevExpress.XtraEditors;
|
||
using HL_FristAidPlatform_DTO;
|
||
using HL_FristAidPlatform_Public;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Data;
|
||
using System.Drawing;
|
||
using System.IO;
|
||
using System.Windows.Forms;
|
||
|
||
namespace HL_FristAidPlatform_Apoplexy
|
||
{
|
||
public partial class UserControl_Thrombolysis : UserControl
|
||
{
|
||
public string Cur_PatientGuid;
|
||
|
||
private DataTable Cur_PatientsTimeAxisDT = new DataTable();
|
||
private PatientNIHSSDTO nihss = new PatientNIHSSDTO();
|
||
|
||
public string TimeOfOnset;
|
||
public string ArrivalHospitalTime;
|
||
public string CTExaminationCompletionTime;
|
||
|
||
public string imageFile;
|
||
public UserControl_Thrombolysis(string _PatientGuid)
|
||
{
|
||
InitializeComponent();
|
||
//InitValidateRoles();
|
||
Cur_PatientGuid = _PatientGuid;
|
||
}
|
||
|
||
private void UserControl_Thrombolysis_Load(object sender, EventArgs e)
|
||
{
|
||
BindDataThrombolysis();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 加载时间
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
private void BindTime(string patientGuid)
|
||
{
|
||
try
|
||
{
|
||
#region 加载时间
|
||
|
||
Cur_PatientsTimeAxisDT = DBHelpClass.GetJsonText("api/service/T_Service_Apoplexy_PatientsTimeAxis/GetPatientDetailTime?PatientGuid=" + patientGuid + "");
|
||
foreach (DataRow item in Cur_PatientsTimeAxisDT.Rows)
|
||
{
|
||
|
||
if (item["ID"].ToString() == PublicClassForDataBase.Config1051)
|
||
{
|
||
time_Consultation.TimeValue = item["RecordingTime"] + "";
|
||
}
|
||
|
||
if (item["ID"].ToString() == PublicClassForDataBase.Config30)
|
||
{
|
||
dateEdit_RSRongShuanTime.TimeValue = item["RecordingTime"] + "";
|
||
}
|
||
}
|
||
|
||
#endregion 加载时间
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "加载时间:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 计算各间隔
|
||
/// </summary>
|
||
private void CountingPeriod()
|
||
{
|
||
try
|
||
{
|
||
#region 计算 DNT、ONT、DPT、DRT
|
||
|
||
//DateTime PatientServiceHospitalTime = new DateTime(1990 - 01 - 01);
|
||
//DateTime CompletionArterialPunctureTime = new DateTime(1990 - 01 - 01);
|
||
//DateTime FirstRecanalizationTime = new DateTime(1990 - 01 - 01);
|
||
//TimeSpan timeSpanDPT = new TimeSpan();
|
||
//TimeSpan timeSpanDRT = new TimeSpan();
|
||
//DateTime FirstDoseAdministrationTime = new DateTime(1990 - 01 - 01);
|
||
//DateTime timeOfOnset = new DateTime(1990 - 01 - 01);
|
||
//TimeSpan timeSpanDNT = new TimeSpan();
|
||
//TimeSpan timeSpanONT = new TimeSpan();
|
||
//for (int i = 0; i < Cur_PatientsTimeAxisDT.Rows.Count; i++)
|
||
//{
|
||
// string id = Cur_PatientsTimeAxisDT.Rows[i]["ID"] + "";//时间ID
|
||
// if (PublicClassForDataBase.Config6 == id)
|
||
// {
|
||
// timeOfOnset = Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "" == "" ? timeOfOnset : Convert.ToDateTime(Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "");
|
||
// }
|
||
// if (PublicClassForDataBase.Config13 == id)
|
||
// {
|
||
// PatientServiceHospitalTime = Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "" == "" ? PatientServiceHospitalTime : Convert.ToDateTime(Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "");
|
||
// }
|
||
// if (PublicClassForDataBase.Config30 == id)
|
||
// {
|
||
// FirstDoseAdministrationTime = Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "" == "" ? FirstDoseAdministrationTime : Convert.ToDateTime(Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "");
|
||
|
||
// if (!string.IsNullOrEmpty(dateEdit_RSRongShuanTime.TimeValue + ""))
|
||
// {
|
||
// FirstDoseAdministrationTime = Convert.ToDateTime(dateEdit_RSRongShuanTime.TimeValue + "");
|
||
// }
|
||
// if (!PatientServiceHospitalTime.Equals("1990-01-01"))
|
||
// {
|
||
// timeSpanDNT = PublicClass.DiffMinutes(PatientServiceHospitalTime, FirstDoseAdministrationTime);
|
||
// }
|
||
// if (!timeOfOnset.Equals("1990-01-01"))
|
||
// {
|
||
// timeSpanONT = PublicClass.DiffMinutes(timeOfOnset, FirstDoseAdministrationTime);
|
||
// }
|
||
// }
|
||
// if (PublicClassForDataBase.Config34 == id)
|
||
// {
|
||
// CompletionArterialPunctureTime = Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "" == "" ? CompletionArterialPunctureTime : Convert.ToDateTime(Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "");
|
||
// }
|
||
// if (PublicClassForDataBase.Config36 == id)
|
||
// {
|
||
// FirstRecanalizationTime = Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "" == "" ? FirstRecanalizationTime : Convert.ToDateTime(Cur_PatientsTimeAxisDT.Rows[i]["RecordingTime"] + "");
|
||
// timeSpanDPT = PublicClass.DiffMinutes(PatientServiceHospitalTime, CompletionArterialPunctureTime);
|
||
// timeSpanDRT = PublicClass.DiffMinutes(PatientServiceHospitalTime, FirstRecanalizationTime);
|
||
// }
|
||
//}
|
||
//if (PatientServiceHospitalTime.ToString() == "0001/1/1 0:00:00")
|
||
//{
|
||
// textEdit_RSDNT.Text = "";
|
||
//}
|
||
//else
|
||
//{
|
||
// if (!string.IsNullOrEmpty(timeSpanDNT + ""))
|
||
// {
|
||
// textEdit_RSDNT.Text = Convert.ToInt32(Convert.ToDouble(timeSpanDNT.TotalMinutes.ToString())).ToString();
|
||
// }
|
||
// else
|
||
// {
|
||
// textEdit_RSDNT.Text = "";
|
||
// }
|
||
//}
|
||
//if (PatientServiceHospitalTime.ToString() == "0001/1/1 0:00:00")
|
||
//{
|
||
// textEdit_RSONT.Text = "";
|
||
//}
|
||
//else
|
||
//{
|
||
// if (!string.IsNullOrEmpty(timeSpanONT + ""))
|
||
// {
|
||
// textEdit_RSONT.Text = Convert.ToInt32(Convert.ToDouble(timeSpanONT.TotalMinutes.ToString())).ToString();
|
||
// }
|
||
// else
|
||
// {
|
||
// textEdit_RSONT.Text = "";
|
||
// }
|
||
//}
|
||
|
||
#endregion 计算 DNT、ONT、DPT、DRT
|
||
|
||
if (!string.IsNullOrEmpty(TimeOfOnset) && !string.IsNullOrEmpty(dateEdit_RSRongShuanTime.TimeValue.ToString()))
|
||
{
|
||
TimeSpan duration = Convert.ToDateTime(dateEdit_RSRongShuanTime.TimeValue) - Convert.ToDateTime(TimeOfOnset);
|
||
textEdit_RSDNT.Text = ((int)duration.TotalMinutes).ToString();
|
||
|
||
}
|
||
|
||
if (!string.IsNullOrEmpty(ArrivalHospitalTime) && !string.IsNullOrEmpty(dateEdit_RSRongShuanTime.TimeValue.ToString()))
|
||
{
|
||
TimeSpan duration = Convert.ToDateTime(dateEdit_RSRongShuanTime.TimeValue) - Convert.ToDateTime(ArrivalHospitalTime);
|
||
textEdit_RSONT.Text = ((int)duration.TotalMinutes).ToString();
|
||
|
||
}
|
||
if (!string.IsNullOrEmpty(CTExaminationCompletionTime) && !string.IsNullOrEmpty(dateEdit_RSRongShuanTime.TimeValue.ToString()))
|
||
{
|
||
TimeSpan duration = Convert.ToDateTime(dateEdit_RSRongShuanTime.TimeValue) - Convert.ToDateTime(CTExaminationCompletionTime);
|
||
txt_CTToNT.Text = ((int)duration.TotalMinutes).ToString();
|
||
|
||
}
|
||
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "计算各间隔:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定静脉溶栓
|
||
/// </summary>
|
||
/// <param name="_patientGuid"></param>
|
||
/// <param name="entity"></param>
|
||
private void BindDataThrombolysis()
|
||
{
|
||
try
|
||
{
|
||
DataTable dt = DBHelpClass.Get(string.Format("api/service/T_Service_Patient/GetModelByIdOrGuid?guid={0}", Cur_PatientGuid));
|
||
if (dt != null && dt.Rows.Count > 0)
|
||
{
|
||
string acZLType = dt.Rows[0]["acZLType"].ToString().Trim();
|
||
|
||
if (!acZLType.Contains("01"))
|
||
{
|
||
xtraScrollableControl_4.Visible = false;
|
||
panelControl1.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
xtraScrollableControl_4.Visible = true;
|
||
panelControl1.Visible = false;
|
||
|
||
#region 溶栓绑定
|
||
|
||
DataTable dataTable = DBHelpClass.GetDataRow(string.Format("api/service/T_Service_Apoplexy_RSZL/GetRSZLByPatientGuid?PatientGuid={0}", Cur_PatientGuid));
|
||
if (dataTable != null)
|
||
{
|
||
if (dataTable.Rows.Count > 0)
|
||
{
|
||
#region 新增字段
|
||
//溶栓护士加载(补)
|
||
txt_ThrombolyticNurse.Text = dataTable.Rows[0]["ThrombolyticNurse"] + "";
|
||
|
||
txt_ConsultationVenue.Text = dataTable.Rows[0]["ConsultationVenue"] + "";
|
||
cmb_IndicationResult.SelectedIndex = dataTable.Rows[0]["IndicationResult"] + "" == "" ? -1 : int.Parse(dataTable.Rows[0]["IndicationResult"] + "") - 1;
|
||
//EstimateTime评估时间
|
||
|
||
time_EstimateTime.TimeValue = dataTable.Rows[0]["EstimateTime"] + "";
|
||
//禁忌症评估结果
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["ContraindicationResult"].ToString()))
|
||
cmb_ContraindicationResult.SelectedIndex = int.Parse(dataTable.Rows[0]["ContraindicationResult"].ToString()) - 1;
|
||
cmb_SurgicalWarning.SelectedIndex = dataTable.Rows[0]["SurgicalWarning"] + "" == "" ? -1 : int.Parse(dataTable.Rows[0]["SurgicalWarning"] + "") - 1;
|
||
txt_TalkingDoctor.Text = dataTable.Rows[0]["TalkingDoctor"] + "";
|
||
radio_FamilyOpinions.EditValue = dataTable.Rows[0]["FamilyOpinions"] + "";
|
||
txt_CTToNT.Text = dataTable.Rows[0]["CTToNT"] + "";
|
||
radio_VascularRecanalization.EditValue = dataTable.Rows[0]["VascularRecanalization"] + "";
|
||
radio_Delay.EditValue = dataTable.Rows[0]["Delay"] + "";
|
||
time_Consultation.TimeValue = dataTable.Rows[0]["Consultation"] + "";
|
||
time_TalkTime.TimeValue = dataTable.Rows[0]["TalkTime"] + "";
|
||
time_SigningTime.TimeValue = dataTable.Rows[0]["SigningTime"] + "";
|
||
|
||
#endregion
|
||
TimeOfOnset = dataTable.Rows[0]["SigningTime"] + "";
|
||
ArrivalHospitalTime = dataTable.Rows[0]["ArrivalHospitalTime"] + "";
|
||
CTExaminationCompletionTime = dataTable.Rows[0]["CTExaminationCompletionTime"] + "";
|
||
|
||
//综合评估
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RSStartNIHSSYN"].ToString()))
|
||
{
|
||
radioGroup_RSStartNIHSSYN.SelectedIndex = int.Parse(dataTable.Rows[0]["RSStartNIHSSYN"] + "") - 1;
|
||
}
|
||
textEdit_RSStartNIHSS.Text = dataTable.Rows[0]["RSStartNIHSS"] + "";
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RSRongShuanPlace"].ToString()))
|
||
{
|
||
radioGroup_RSRongShuanPlace.SelectedIndex = int.Parse(dataTable.Rows[0]["RSRongShuanPlace"] + "") - 1;
|
||
}
|
||
//确定溶栓治疗者立即启动溶栓治疗
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RSRongShuanYW"].ToString()))
|
||
{
|
||
radioGroup_RSRongShuanYW.SelectedIndex = int.Parse(dataTable.Rows[0]["RSRongShuanYW"] + "") - 1;
|
||
}
|
||
textEdit_RSYWOther.Text = dataTable.Rows[0]["RSYWOther"] + "";
|
||
textEdit_RSrtPA.Text = dataTable.Rows[0]["RSrtPA"] + "";
|
||
textEdit_RSUrokinase.Text = dataTable.Rows[0]["RSUrokinase"] + "";
|
||
PublicClass.SetItemChecked(checkedListBoxControl_RSBFZNR, PublicClass.ToString(dataTable.Rows[0]["RSBFZNR"], ""), ';');
|
||
if (dataTable.Rows[0]["RSBFZNR"].ToString().Contains("99"))
|
||
{
|
||
labelControl7.Visible = true;
|
||
textEdit_RSBFZOther.Visible = true;
|
||
}
|
||
textEdit_RSBFZOther.Text = dataTable.Rows[0]["RSBFZOther"] + "";
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RSEndNIHSSYN"].ToString()))
|
||
{
|
||
radioGroup_RSEndNIHSSYN.SelectedIndex = int.Parse(dataTable.Rows[0]["RSEndNIHSSYN"] + "") - 1;
|
||
}
|
||
textEdit_RSEndNIHSS.Text = dataTable.Rows[0]["RSEndNIHSS"] + "";
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RS24hNIHSSYN"].ToString()))
|
||
{
|
||
radioGroup_RS24hNIHSSYN.SelectedIndex = int.Parse(dataTable.Rows[0]["RS24hNIHSSYN"] + "") - 1;
|
||
}
|
||
textEdit_RS24hNIHSS.Text = dataTable.Rows[0]["RS24hNIHSS"] + "";
|
||
if (!string.IsNullOrEmpty(dataTable.Rows[0]["RS7dNIHSSYN"].ToString()))
|
||
{
|
||
radioGroup_RS7dNIHSSYN.SelectedIndex = int.Parse(dataTable.Rows[0]["RS7dNIHSSYN"] + "") - 1;
|
||
}
|
||
textEdit_RS7dNIHSS.Text = dataTable.Rows[0]["RS7dNIHSS"] + "";
|
||
PublicClass.SetItemChecked(checkedListBoxControl_XGZLReason, PublicClass.ToString(dataTable.Rows[0]["XGZLReason"], ""), ';');
|
||
//lookUpEdit_ThrombolysisDoctor.Text = dataTable.Rows[0]["ThrombolysisDoctor"] + "";
|
||
imageFile = PublicClass.ToString(dataTable.Rows[0]["InformedConsent"], "");
|
||
if (!string.IsNullOrEmpty(imageFile))
|
||
{
|
||
lbl_imageMessage.Visible = false;
|
||
hyperlinklbl_Image.Visible = true;
|
||
}
|
||
|
||
string ThrombolysisDoctorImageFiles = dataTable.Rows[0]["ThrombolysisDoctorImageFiles"] + "";
|
||
if (!string.IsNullOrEmpty(ThrombolysisDoctorImageFiles))
|
||
{
|
||
MemoryStream ms = new MemoryStream(Convert.FromBase64String(ThrombolysisDoctorImageFiles));
|
||
Image img = Image.FromStream(ms);
|
||
p_ThrombolysisDoctorImageFiles.Image = img;
|
||
labelControl2.Visible = true;
|
||
p_ThrombolysisDoctorImageFiles.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
p_ThrombolysisDoctorImageFiles.Visible = false;
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
#endregion 溶栓绑定
|
||
|
||
BindTime(Cur_PatientGuid);
|
||
CountingPeriod();
|
||
}
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "溶栓绑定:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存静脉溶栓
|
||
/// </summary>
|
||
public void SaveThrombolysis()
|
||
{
|
||
if (!InitValidateRoles())
|
||
{
|
||
return;
|
||
}
|
||
|
||
try
|
||
{
|
||
#region 4、完成治疗前检查至溶栓治疗开始
|
||
|
||
#region 保存时间节点信息
|
||
|
||
PublicClassForDataBase.UpdateTime(Cur_PatientGuid, dateEdit_RSRongShuanTime.TimeValue, PublicClassForDataBase.Config30);
|
||
//溶栓医生会诊时间
|
||
PublicClassForDataBase.UpdateTime(Cur_PatientGuid, time_Consultation.TimeValue, PublicClassForDataBase.Config1051);
|
||
|
||
#endregion 保存时间节点信息
|
||
|
||
List<T_Service_Apoplexy_RSZLDTO> dtoList = new List<T_Service_Apoplexy_RSZLDTO>();
|
||
T_Service_Apoplexy_RSZLDTO dto = new T_Service_Apoplexy_RSZLDTO();
|
||
string Url = string.Empty;
|
||
ClientFactory<T_Service_Apoplexy_RSZLDTO> httpClient = new HttpClientFactory<T_Service_Apoplexy_RSZLDTO>();
|
||
Client<T_Service_Apoplexy_RSZLDTO> client = httpClient.VisitFactory();
|
||
|
||
Url = "api/service/T_Service_Apoplexy_RSZL/Update";
|
||
|
||
#region 新增字段-对比内乡系统
|
||
|
||
dto.ConsultationVenue = txt_ConsultationVenue.Text;
|
||
dto.IndicationResult = cmb_IndicationResult.SelectedIndex > -1 ? (cmb_IndicationResult.SelectedIndex + 1).ToString() : "";
|
||
dto.ContraindicationResult = cmb_ContraindicationResult.SelectedIndex > -1 ? (cmb_ContraindicationResult.SelectedIndex + 1).ToString() : "";
|
||
dto.SurgicalWarning = cmb_SurgicalWarning.SelectedIndex > -1 ? (cmb_SurgicalWarning.SelectedIndex + 1).ToString() : "";
|
||
dto.TalkingDoctor = txt_TalkingDoctor.Text;
|
||
dto.FamilyOpinions = radio_FamilyOpinions.EditValue.ToString();
|
||
dto.CTToNT = txt_CTToNT.Text;
|
||
dto.VascularRecanalization = radio_VascularRecanalization.EditValue.ToString();
|
||
dto.Delay = radio_Delay.EditValue.ToString();
|
||
//dto.EstimateTime = time_EstimateTime.TimeValue.ToString() != "" ? Convert.ToDateTime(time_EstimateTime.TimeValue).ToString("yyyy-MM-dd HH:ss:mm") : "";
|
||
//评估时间
|
||
dto.EstimateTime = time_EstimateTime.TimeValue.ToString();
|
||
|
||
dto.Consultation = time_Consultation.TimeValue.ToString();
|
||
dto.TalkTime = time_TalkTime.TimeValue.ToString();
|
||
dto.SigningTime = time_SigningTime.TimeValue.ToString();
|
||
dto.InformedConsent = imageFile;
|
||
if (!string.IsNullOrEmpty(imageFile))
|
||
{
|
||
lbl_imageMessage.Visible = false;
|
||
hyperlinklbl_Image.Visible = true;
|
||
}
|
||
#endregion
|
||
|
||
dto.PatientGuid = Cur_PatientGuid;
|
||
//综合评估
|
||
dto.RSStartNIHSSYN = radioGroup_RSStartNIHSSYN.EditValue + "";
|
||
dto.RSStartNIHSS = textEdit_RSStartNIHSS.Text + "";
|
||
dto.RSRongShuanPlace = radioGroup_RSRongShuanPlace.EditValue + "";
|
||
//确定溶栓治疗者立即启动溶栓治疗
|
||
dto.RSRongShuanYW = radioGroup_RSRongShuanYW.EditValue + "";
|
||
dto.RSYWOther = textEdit_RSYWOther.Text + "";
|
||
dto.RSrtPA = textEdit_RSrtPA.Text + "";
|
||
dto.RSUrokinase = textEdit_RSUrokinase.Text + "";
|
||
dto.RSBFZOther = textEdit_RSBFZOther.Text + "";
|
||
dto.RSEndNIHSSYN = radioGroup_RSEndNIHSSYN.EditValue + "";
|
||
dto.RSEndNIHSS = textEdit_RSEndNIHSS.Text + "";
|
||
dto.RS24hNIHSSYN = radioGroup_RS24hNIHSSYN.EditValue + "";
|
||
dto.RS24hNIHSS = textEdit_RS24hNIHSS.Text + "";
|
||
dto.RS7dNIHSSYN = radioGroup_RS7dNIHSSYN.Text + "";
|
||
dto.RS7dNIHSS = textEdit_RS7dNIHSS.Text + "";
|
||
|
||
//开始静脉溶栓时间
|
||
dto.RSRongShuanTime = dateEdit_RSRongShuanTime.TimeValue + "";
|
||
dto.RSDNT = textEdit_RSDNT.Text + "";
|
||
dto.RSONT = textEdit_RSONT.Text + "";
|
||
|
||
string SyndromeNumber;
|
||
string Syndrome;
|
||
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_RSBFZNR, ";", out SyndromeNumber, out Syndrome);
|
||
dto.RSBFZNR = ";" + SyndromeNumber + ";";
|
||
string SyndromeNumber1;
|
||
string Syndrome1;
|
||
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_XGZLReason, ";", out SyndromeNumber1, out Syndrome1);
|
||
dto.XGZLReason = ";" + SyndromeNumber1 + ";";
|
||
|
||
//溶栓护士(补)
|
||
dto.ThrombolyticNurse = txt_ThrombolyticNurse.Text;
|
||
dtoList.Add(dto);
|
||
//访问
|
||
ListEntity<T_Service_Apoplexy_RSZLDTO> t = client.Post(Url, dtoList);
|
||
if (t.Success)
|
||
{
|
||
XtraMessageBox.Show("保存系统信息成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||
}
|
||
else
|
||
{
|
||
XtraMessageBox.Show("保存失败,请稍后重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
}
|
||
|
||
#endregion 4、完成治疗前检查至溶栓治疗开始
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "4、完成治疗前检查至溶栓治疗开始:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void simpleButton2_Click(object sender, EventArgs e)
|
||
{
|
||
//溶栓前NIHSS评分分数
|
||
string strText = string.Empty;
|
||
InputDialog_trans.Show(out strText, out nihss, 7);
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{
|
||
textEdit_RSStartNIHSS.Text = strText;
|
||
radioGroup_RSStartNIHSSYN.SelectedIndex = 0;
|
||
saveNIHSS(nihss);
|
||
}
|
||
}
|
||
|
||
private void simpleButton1_Click(object sender, EventArgs e)
|
||
{
|
||
//溶栓结束后即刻NIHSS评分分数
|
||
string strText = string.Empty;
|
||
InputDialog_trans.Show(out strText, out nihss, 8);
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{
|
||
textEdit_RSEndNIHSS.Text = strText;
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{ radioGroup_RSEndNIHSSYN.SelectedIndex = 0; }
|
||
saveNIHSS(nihss);
|
||
}
|
||
}
|
||
|
||
private void simpleButton3_Click(object sender, EventArgs e)
|
||
{
|
||
//溶栓后24h NIHSS评分分数
|
||
string strText = string.Empty;
|
||
InputDialog_trans.Show(out strText, out nihss, 9);
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{
|
||
textEdit_RS24hNIHSS.Text = strText;
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{ radioGroup_RS24hNIHSSYN.SelectedIndex = 0; }
|
||
saveNIHSS(nihss);
|
||
}
|
||
}
|
||
|
||
private void simpleButton4_Click(object sender, EventArgs e)
|
||
{
|
||
//溶栓后7±2 天NIHSS评分分数
|
||
string strText = string.Empty;
|
||
InputDialog_trans.Show(out strText, out nihss, 10);
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{
|
||
textEdit_RS7dNIHSS.Text = strText;
|
||
if (!string.IsNullOrEmpty(strText))
|
||
{ radioGroup_RS7dNIHSSYN.SelectedIndex = 0; }
|
||
saveNIHSS(nihss);
|
||
}
|
||
}
|
||
|
||
private void dateEdit_RSRongShuanTime_TimeValueChanged(object sender, EventArgs e)
|
||
{
|
||
CountingPeriod();
|
||
}
|
||
|
||
public void saveNIHSS(PatientNIHSSDTO patientNIHSSDTO)
|
||
{
|
||
List<PatientNIHSSDTO> PrehospitalDTOs = new List<PatientNIHSSDTO>();
|
||
string Url = string.Format("api/service/T_Service_Patient/SaveNIHSS");
|
||
ClientFactory<PatientNIHSSDTO> httpClient = new HttpClientFactory<PatientNIHSSDTO>();
|
||
Client<PatientNIHSSDTO> client = httpClient.VisitFactory();
|
||
patientNIHSSDTO.PatientGUID = Cur_PatientGuid;
|
||
patientNIHSSDTO.Flag = 1;
|
||
PrehospitalDTOs.Add(patientNIHSSDTO);
|
||
//访问
|
||
ListEntity<PatientNIHSSDTO> t = client.Post(Url, PrehospitalDTOs);
|
||
}
|
||
|
||
private void radioGroup_RSEndNIHSSYN_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (radioGroup_RSEndNIHSSYN.SelectedIndex == 1)
|
||
{
|
||
panel_RSEndNIHSS.Visible = false;
|
||
textEdit_RSEndNIHSS.Text = "";
|
||
}
|
||
else
|
||
{
|
||
panel_RSEndNIHSS.Visible = true;
|
||
}
|
||
}
|
||
|
||
private void radioGroup_RS24hNIHSSYN_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (radioGroup_RS24hNIHSSYN.SelectedIndex > 0)
|
||
{
|
||
panel_RS24hNIHSS.Visible = false;
|
||
textEdit_RS24hNIHSS.Text = "";
|
||
}
|
||
else
|
||
{
|
||
panel_RS24hNIHSS.Visible = true;
|
||
}
|
||
}
|
||
|
||
private void radioGroup_RS7dNIHSSYN_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (radioGroup_RS7dNIHSSYN.SelectedIndex > 0)
|
||
{
|
||
panel_RS7dNIHSS.Visible = false;
|
||
textEdit_RS7dNIHSS.Text = "";
|
||
}
|
||
else
|
||
{
|
||
panel_RS7dNIHSS.Visible = true;
|
||
}
|
||
}
|
||
|
||
private void radioGroup_RSStartNIHSSYN_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (radioGroup_RSStartNIHSSYN.SelectedIndex == 1)
|
||
textEdit_RSStartNIHSS.Text = "";
|
||
}
|
||
|
||
private void textEdit_RSDNT_EditValueChanged(object sender, EventArgs e)
|
||
{
|
||
string xx = textEdit_RSDNT.Text;
|
||
|
||
if (!string.IsNullOrEmpty(xx))
|
||
{
|
||
if (int.Parse(xx) < (-100000000))
|
||
{
|
||
textEdit_RSDNT.Text = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
private void textEdit_RSONT_EditValueChanged(object sender, EventArgs e)
|
||
{
|
||
string yy = textEdit_RSONT.Text;
|
||
|
||
if (!string.IsNullOrEmpty(yy))
|
||
{
|
||
if (int.Parse(yy) < (-100000000))
|
||
{
|
||
textEdit_RSONT.Text = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
private Boolean InitValidateRoles()
|
||
{
|
||
if (!string.IsNullOrEmpty(textEdit_RSStartNIHSS.Text + ""))
|
||
{
|
||
if (Convert.ToInt32(textEdit_RSStartNIHSS.Text) < 0 || Convert.ToInt32(textEdit_RSStartNIHSS.Text) > 42)
|
||
{
|
||
XtraMessageBox.Show("保存失败!请输入0-42的值");
|
||
textEdit_RSStartNIHSS.Focus();
|
||
return false;
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(textEdit_RSEndNIHSS.Text + ""))
|
||
{
|
||
if (Convert.ToInt32(textEdit_RSEndNIHSS.Text) < 0 || Convert.ToInt32(textEdit_RSEndNIHSS.Text) > 42)
|
||
{
|
||
XtraMessageBox.Show("保存失败!请输入0-42的值");
|
||
textEdit_RSEndNIHSS.Focus();
|
||
return false;
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(textEdit_RS24hNIHSS.Text + ""))
|
||
{
|
||
if (Convert.ToInt32(textEdit_RS24hNIHSS.Text) < 0 || Convert.ToInt32(textEdit_RS24hNIHSS.Text) > 42)
|
||
{
|
||
XtraMessageBox.Show("保存失败!请输入0-42的值");
|
||
textEdit_RS24hNIHSS.Focus();
|
||
return false;
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(textEdit_RS7dNIHSS.Text + ""))
|
||
{
|
||
if (Convert.ToInt32(textEdit_RS7dNIHSS.Text) < 0 || Convert.ToInt32(textEdit_RS7dNIHSS.Text) > 42)
|
||
{
|
||
XtraMessageBox.Show("保存失败!请输入0-42的值");
|
||
textEdit_RS7dNIHSS.Focus();
|
||
return false;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
|
||
|
||
}
|
||
|
||
private void radioGroup_RSRongShuanYW_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
RSRongShuanYWRefrsh();
|
||
}
|
||
|
||
public void RSRongShuanYWRefrsh()
|
||
{
|
||
if (radioGroup_RSRongShuanYW.EditValue == "9")
|
||
{
|
||
panel_RSYWOther.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
panel_RSYWOther.Visible = false;
|
||
textEdit_RSYWOther.Text = "";
|
||
}
|
||
if (radioGroup_RSRongShuanYW.EditValue == "1")
|
||
{
|
||
panel_RSrtPA.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
panel_RSrtPA.Visible = false;
|
||
textEdit_RSrtPA.Text = "";
|
||
}
|
||
|
||
if (radioGroup_RSRongShuanYW.EditValue == "2")
|
||
{
|
||
panel_RSUrokinase.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
panel_RSUrokinase.Visible = false;
|
||
textEdit_RSUrokinase.Text = "";
|
||
}
|
||
}
|
||
private void checkedListBoxControl_RSBFZNR_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
|
||
{
|
||
if (checkedListBoxControl_RSBFZNR.Text == "无")
|
||
{
|
||
if (e.State == CheckState.Checked)
|
||
{
|
||
//清空本窗体
|
||
for (int i = 0; i < checkedListBoxControl_RSBFZNR.Items.Count - 1; i++)
|
||
checkedListBoxControl_RSBFZNR.SetItemChecked(i, false);
|
||
labelControl7.Visible = false;
|
||
textEdit_RSBFZOther.Visible = false;
|
||
textEdit_RSBFZOther.Text = "";
|
||
}
|
||
}
|
||
if (checkedListBoxControl_RSBFZNR.Text == "其他")
|
||
{
|
||
if (e.State == CheckState.Checked)
|
||
{
|
||
labelControl7.Visible = true;
|
||
textEdit_RSBFZOther.Visible = true;
|
||
}
|
||
else
|
||
{
|
||
labelControl7.Visible = false;
|
||
textEdit_RSBFZOther.Visible = false;
|
||
textEdit_RSBFZOther.Text = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
private void simpleButton5_Click(object sender, EventArgs e)
|
||
{
|
||
#region
|
||
|
||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||
openFileDialog.Filter = "Image Files(*.JPG;*.PNG;*.JPEG;;*.BMP)|*.JPG;*.PNG;;*.BMP;*.JPEG";
|
||
openFileDialog.RestoreDirectory = true;
|
||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||
{
|
||
try
|
||
{
|
||
int Config109 = PublicClass.ToInt32(PublicClassForDataBase.Config109, 5);
|
||
string FileName = openFileDialog.FileName;
|
||
if (PublicClass.GetFileSize(FileName) <= Config109)
|
||
{
|
||
FileInfo file = new FileInfo(FileName);
|
||
Bitmap bitmap = new Bitmap(FileName);
|
||
imageFile = file.Extension;
|
||
if (imageFile.ToLower() == ".png")
|
||
{
|
||
imageFile = PublicClass.Png2String(bitmap);
|
||
}
|
||
else
|
||
{
|
||
imageFile = PublicClass.Jpeg2String(bitmap);
|
||
}
|
||
XtraMessageBox.Show("上传成功");
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "上传心电图:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
#endregion
|
||
}
|
||
|
||
private void hyperlinklbl_Image_Click(object sender, EventArgs e)
|
||
{
|
||
byte[] image = Convert.FromBase64String(imageFile);
|
||
HL_FristAidPlatform_MultiSystemPublic.Form_ImageShow frm = new HL_FristAidPlatform_MultiSystemPublic.Form_ImageShow(image);
|
||
frm.ShowDialog();
|
||
}
|
||
|
||
private void hyperlinklbl_View_Click(object sender, EventArgs e)
|
||
{
|
||
//string _number = "";
|
||
//Form_InformedConsent form_InformedConsent = new Form_InformedConsent(Cur_PatientGuid, _name, _gender, _age, _number, diagnose);
|
||
//form_InformedConsent.Show();
|
||
}
|
||
|
||
|
||
}
|
||
} |