StableVersion4.3/HL_FristAidPlatform_Apoplexy/Page/UserControl_TreatmentExamin...

744 lines
36 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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_TreatmentExamination : UserControl
{
private string Cur_PatientGuid;
private DataTable Cur_PatientsTimeAxisDT;
public int DTCT;
public string acltype;
public string ctImage;
T_Service_PatientDTO model = new T_Service_PatientDTO();
List<T_Service_PatientDTO> list = new List<T_Service_PatientDTO>();
public UserControl_TreatmentExamination(string _Cur_PatientGuid)
{
InitializeComponent();
Cur_PatientGuid = _Cur_PatientGuid;
}
private void UserControl_TreatmentExamination_Load(object sender, EventArgs e)
{
string Url1 = string.Format("api/service/T_Service_Patient/GetBypatientguid?guid={0}", Cur_PatientGuid);
model = DBHelpClass.GetDateModel<T_Service_PatientDTO>(Url1);
//BindTime();
//PatientLoad();
BindDataT_Service_Apoplexy_EmergencyRoom();
//BindDataT_Service_Apoplexy_Prehospital();
BindDataT_Service_Apoplexy_NCXZYJC();
string url = string.Format("api/base/T_Base_InpatientDepartment/GetListBySystemModuleID?systemId={0}", Information.SystemModuleInfo.ID);
var dep = DBHelpClass.GetList<InpatientDepartmentDTO>(url);
DataTable hdt = DBHelpClass.ListToDataTable(dep);
PublicClass.SetLookUpList(ref look_InpatientDepartment, hdt, 0, 1, true, "");
if (!string.IsNullOrEmpty(Cur_PatientGuid))
{
DataTable Cur_PatientDetailDT = DBHelpClass.Get(string.Format("api/service/T_Service_Patient/GetModelByIdOrGuid?guid={0}", Cur_PatientGuid));
if (Cur_PatientDetailDT != null && Cur_PatientDetailDT.Rows.Count > 0)
{
textEdit_AD.EditValue = Cur_PatientDetailDT.Rows[0]["AdmissionNumber"].ToString();//住院号
timeControl_Departments.TimeValue = Cur_PatientDetailDT.Rows[0]["HospitalizationTime"].ToString();//住院时间
}
}
}
/// <summary>
/// 加载时间
/// </summary>
/// <param name="patientGuid"></param>
/*private void BindTime()
{
try
{
#region 加载时间
Cur_PatientsTimeAxisDT = DBHelpClass.GetJsonText("api/service/T_Service_Apoplexy_PatientsTimeAxis/GetPatientDetailTime?PatientGuid=" + Cur_PatientGuid + "");
foreach (DataRow item in Cur_PatientsTimeAxisDT.Rows)
{
if (item["ID"].ToString() == PublicClassForDataBase.Config20)
{
ArrivalCTRoomTime.TimeValue = item["RecordingTime"] + "";
}
if (item["ID"].ToString() == PublicClassForDataBase.Config21)
{
CTExaminationCompletionTime.TimeValue = item["RecordingTime"] + "";
}
if (item["ID"].ToString() == PublicClassForDataBase.Config22)
{
CTReportTime.TimeValue = item["RecordingTime"] + "";
}
if (item["ID"].ToString() == PublicClassForDataBase.Config23)
{
BloodRoutineReportTime.TimeValue = item["RecordingTime"] + "";
}
if (item["ID"].ToString() == PublicClassForDataBase.Config24)
{
CoagulationRoutineReportTime.TimeValue = item["RecordingTime"] + "";
}
//到达彩超室时间
if (item["ID"].ToString() == PublicClassForDataBase.Config1048)
{
BloodCollectionTime.TimeValue = item["RecordingTime"] + "";
}
//if (item["ID"].ToString() == PublicClassForDataBase.Config25)
//{
// dateEdit_KidneyFunctionAndElectrolytes.TimeValue = item["RecordingTime"] + "";
//}
#endregion 加载时间
}
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "加载时间:\r\n" + ex);
}
}*/
/// <summary>
/// 保存
/// </summary>
public void SaveTreatmentExamination()
{
try
{
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, ArrivalCTRoomTime.TimeValue, PublicClassForDataBase.Config20);
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, CTExaminationCompletionTime.TimeValue, PublicClassForDataBase.Config21);
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, CTReportTime.TimeValue, PublicClassForDataBase.Config22);
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, BloodRoutineReportTime.TimeValue, PublicClassForDataBase.Config23);
////到达彩超室时间
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, BloodCollectionTime.TimeValue, PublicClassForDataBase.Config1048);
//PublicClassForDataBase.UpdateTime(Cur_PatientGuid, CoagulationRoutineReportTime.TimeValue, PublicClassForDataBase.Config24);
////PublicClassForDataBase.UpdateTime(Cur_PatientGuid, dateEdit_KidneyFunctionAndElectrolytes.TimeValue, PublicClassForDataBase.Config25);
SaveT_Service_Apoplexy_EmergencyRoom();
//SaveT_Service_Apoplexy_Prehospital();
SaveT_Service_Apoplexy_NCXZYJC();
SavePatient();
XtraMessageBox.Show("保存所填写信息成功");
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "3、完成初步诊断至完成治疗前检查\r\n" + ex);
}
}
private void SavePatient()
{
try
{
string Url = string.Empty;
if (model == null)
model = new T_Service_PatientDTO();
Url = "api/service/T_Service_Patient/UpdateNotNullColumns";
model.GUID = Cur_PatientGuid;
model.AdmissionNumber = textEdit_AD.Text.ToString().Trim();
model.HospitalizationTime = PublicClass.ToString(timeControl_Departments.TimeValue, "");
list.Add(model);
ClientFactory<T_Service_PatientDTO> httpClient = new HttpClientFactory<T_Service_PatientDTO>();
Client<T_Service_PatientDTO> client = httpClient.VisitFactory();
//访问
ListEntity<T_Service_PatientDTO> t = client.Post(Url, list);
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "保存住院号和住院时间:\r\n" + ex);
}
}
/// <summary>
/// 保存用药信息
/// </summary>
private void SaveT_Service_Apoplexy_EmergencyRoom()
{
try
{
List<T_Service_Apoplexy_EmergencyRoomDTO> EmergencyRoomList = new List<T_Service_Apoplexy_EmergencyRoomDTO>();
T_Service_Apoplexy_EmergencyRoomDTO EmergencyRoomdto = new T_Service_Apoplexy_EmergencyRoomDTO();
string EmergencyRoomUrl = string.Empty;
ClientFactory<T_Service_Apoplexy_EmergencyRoomDTO> EmergencyRoomHttpClient = new HttpClientFactory<T_Service_Apoplexy_EmergencyRoomDTO>();
Client<T_Service_Apoplexy_EmergencyRoomDTO> EmergencyRoomClient = EmergencyRoomHttpClient.VisitFactory();
DataTable EmergencyRoomDataTable = new DataTable();
EmergencyRoomDataTable = DBHelpClass.Get("api/service/T_Service_Apoplexy_EmergencyRoom/GetByPatientGuid?patientGuid=" + Cur_PatientGuid + "");
if (EmergencyRoomDataTable != null && EmergencyRoomDataTable.Rows.Count > 0)
{
EmergencyRoomUrl = "api/service/T_Service_Apoplexy_EmergencyRoom/Update";
EmergencyRoomdto.ID = int.Parse(EmergencyRoomDataTable.Rows[0]["ID"].ToString());
EmergencyRoomdto.GUID = EmergencyRoomDataTable.Rows[0]["GUID"].ToString();
}
else
{
EmergencyRoomUrl = "api/service/T_Service_Apoplexy_EmergencyRoom";
EmergencyRoomdto.GUID = Guid.NewGuid().ToString();
}
EmergencyRoomdto.PatientGuid = Cur_PatientGuid;
//EmergencyRoomdto.Aspirin = textEdit_Aspirin.Text;
//EmergencyRoomdto.Clopidogrel = textEdit_Clopidogrel.Text;
//EmergencyRoomdto.Warfarin = textEdit_Warfarin.Text;
//EmergencyRoomdto.Rivaroxaban = textEdit_Rivaroxaban.Text;
//EmergencyRoomdto.Other = textEdit_Other.Text;
EmergencyRoomdto.ECGExaminationTime = ECGExaminationTime.TimeValue + "";
EmergencyRoomdto.ECGReportTime = ECGReportTime.TimeValue + "";
EmergencyRoomdto.BloodCollectionTime = BloodCollectionTime.TimeValue + "";
EmergencyRoomdto.BloodRoutineReportTime = BloodRoutineReportTime.TimeValue + "";
EmergencyRoomdto.CoagulationRoutineReportTime = CoagulationRoutineReportTime.TimeValue + "";
EmergencyRoomdto.ArrivalCTRoomTime = ArrivalCTRoomTime.TimeValue + "";
EmergencyRoomdto.CTExaminationCompletionTime = CTExaminationCompletionTime.TimeValue + "";
EmergencyRoomdto.LeaveCTRoomTime = LeaveCTRoomTime.TimeValue + "";
EmergencyRoomdto.CTReportTime = CTReportTime.TimeValue + "";
//EmergencyRoomdto.StartCatheterRoomTime = StartCatheterRoomTime.TimeValue + "";
{
EmergencyRoomdto.Antiplatelet = "";
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_Antiplatelet, ";", out values, out texts);
if (!string.IsNullOrEmpty(values))
EmergencyRoomdto.Antiplatelet = ";" + values + ";";
}
{
EmergencyRoomdto.Anticoagulation = "";
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_Anticoagulation, ";", out values, out texts);
if (!string.IsNullOrEmpty(values))
EmergencyRoomdto.Anticoagulation = ";" + values + ";";
}
{
EmergencyRoomdto.Depressor = "";
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_Depressor, ";", out values, out texts);
if (!string.IsNullOrEmpty(values))
EmergencyRoomdto.Depressor = ";" + values + ";";
}
{
EmergencyRoomdto.Hypoglycemic = "";
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_Hypoglycemic, ";", out values, out texts);
if (!string.IsNullOrEmpty(values))
EmergencyRoomdto.Hypoglycemic = ";" + values + ";";
}
{
EmergencyRoomdto.LipidLowering = "";
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_LipidLowering, ";", out values, out texts);
if (!string.IsNullOrEmpty(values))
EmergencyRoomdto.LipidLowering = ";" + values + ";";
}
//既往史
EmergencyRoomdto.Hypertension = radioGroup_Hypertension.EditValue + "";
EmergencyRoomdto.Diabetes = radioGroup_Diabetes.EditValue + "";
EmergencyRoomdto.Smoke = radioGroup_Smoke.EditValue + "";
EmergencyRoomdto.Hyperlipidemia = radioGroup_Hyperlipidemia.EditValue + "";
EmergencyRoomdto.CoronaryHeartDisease = radioGroup_CoronaryHeartDisease.EditValue + "";
EmergencyRoomdto.AtrialFibrillation = radioGroup_AtrialFibrillation.EditValue + "";
EmergencyRoomdto.Gastrohelcoma = radioGroup_Gastrohelcoma.EditValue + "";
EmergencyRoomdto.HemorrhagicDisorders = radioGroup_HemorrhagicDisorders.EditValue + "";
EmergencyRoomdto.Tumour = radioGroup_Tumour.EditValue + "";
EmergencyRoomdto.Aneurysm = radioGroup_Aneurysm.EditValue + "";
EmergencyRoomdto.AneurysmOther = memoEdit_AneurysmOther.Text + "";
EmergencyRoomdto.ArteryDissection = radioGroup_ArteryDissection.EditValue + "";
//过敏史
EmergencyRoomdto.AllergicHistory = textEdit_AllergicHistory.Text + "";
EmergencyRoomdto.PatientLocation = radioGroup_PatientLocation.EditValue + "";
EmergencyRoomdto.InpatientDepartment = look_InpatientDepartment.EditValue + "";
EmergencyRoomdto.LeaveEmergencyTime = timeControl_LeaveEmergencyTime.TimeValue + "";
EmergencyRoomdto.DeathTime = timeControl_DeathTime.TimeValue + "";
EmergencyRoomdto.ObservationTime = timeControl_ObservationTime.TimeValue + "";
EmergencyRoomdto.EmergencyRemark = memoEdit_EmergencyRemark.Text + "";
EmergencyRoomdto.Residentphysician = textEdit_Residentphysician.Text + "";
EmergencyRoomdto.PresentIllness = memo_PresentIllness.Text + "";
EmergencyRoomdto.Remarks = memo_Remarks.Text + "";
EmergencyRoomdto.AllergicDrugs = memo_AneurysmDrugs.Text + "";
//诊断
//EmergencyRoomdto.Diagnose = PublicClass.ToString(radioGroup_Diagnosis.EditValue, "");// textEdit_Diagnose.Text;
//EmergencyRoomdto.Remark = textEdit_Remark.Text;
//EmergencyRoomdto.StrokeTeam = lookUpEdit_StrokeTeam.Text;
EmergencyRoomList.Add(EmergencyRoomdto);
//访问
ListEntity<T_Service_Apoplexy_EmergencyRoomDTO> EmergencyRoomT = EmergencyRoomClient.Post(EmergencyRoomUrl, EmergencyRoomList);
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "保存用药信息:\r\n" + ex);
}
}
/// <summary>
/// 保存CT检查信息
/// </summary>
private void SaveT_Service_Apoplexy_NCXZYJC()
{
try
{
List<T_Service_Apoplexy_NCXZYJCDTO> PatientList = new List<T_Service_Apoplexy_NCXZYJCDTO>();
T_Service_Apoplexy_NCXZYJCDTO Patientdto = new T_Service_Apoplexy_NCXZYJCDTO();
string PatientUrl = string.Empty;
ClientFactory<T_Service_Apoplexy_NCXZYJCDTO> PatientHttpClient = new HttpClientFactory<T_Service_Apoplexy_NCXZYJCDTO>();
Client<T_Service_Apoplexy_NCXZYJCDTO> PatientClient = PatientHttpClient.VisitFactory();
DataTable PatientDataTable = DBHelpClass.Get(string.Format("api/service/T_Service_Apoplexy_NCXZYJC/GetByPatientGuidAndReportType?patientGuid={0}", Cur_PatientGuid));
if (PatientDataTable != null && PatientDataTable.Rows.Count > 0)
{
PatientUrl = "api/service/T_Service_Apoplexy_NCXZYJC/Update";
}
else
{
PatientUrl = "api/service/T_Service_Apoplexy_NCXZYJC/ADD";
}
Patientdto.PatientGuid = Cur_PatientGuid;
Patientdto.CTImage = ctImage;
Patientdto.DToCT = txt_DToCT.Text;
Patientdto.CTDoctor = txt_CTDoctor.Text;
Patientdto.CTResults = memo_CTResults.Text;
//检验科/CT检查
string SyndromeNumber;
string Syndrome;
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_NCXLSite, ";", out SyndromeNumber, out Syndrome);
if (!string.IsNullOrEmpty(SyndromeNumber))
{
Patientdto.NCXLSite = ";" + SyndromeNumber + ";";
}
string SyndromeNumber1;
string Syndrome1;
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_NCXRSite, ";", out SyndromeNumber1, out Syndrome1);
if (!string.IsNullOrEmpty(SyndromeNumber1))
{
Patientdto.NCXRSite = ";" + SyndromeNumber1 + ";";
}
string SyndromeNumber2;
string Syndrome2;
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_NCXCause, ";", out SyndromeNumber2, out Syndrome2);
if (!string.IsNullOrEmpty(SyndromeNumber2))
{
Patientdto.NCXCause = ";" + SyndromeNumber2 + ";";
}
string SyndromeNumber3;
string Syndrome3;
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YXLNXGCheck, ";", out SyndromeNumber3, out Syndrome3);
Patientdto.YXLNXGCheck = "";
if (!string.IsNullOrEmpty(SyndromeNumber3))
{
Patientdto.YXLNXGCheck = ";" + SyndromeNumber3 + ";";
}
Patientdto.YXCheckOther = textEdit1.Text + "";
Patientdto.NCXArea = textEdit_NCXArea.Text + "";
Patientdto.DTCT = DTCT;
PatientList.Add(Patientdto);
//访问
ListEntity<T_Service_Apoplexy_NCXZYJCDTO> PatientT = PatientClient.Post(PatientUrl, PatientList);
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "保存既往史信息:\r\n" + ex);
}
}
/// <summary>
/// 绑定院前用药信息
/// </summary>
private void BindDataT_Service_Apoplexy_EmergencyRoom()
{
DataTable dataTable = DBHelpClass.Get(string.Format("api/service/T_Service_Apoplexy_EmergencyRoom/GetByPatientGuid?patientGuid={0}", Cur_PatientGuid));
if (dataTable != null && dataTable.Rows.Count > 0)
{
//textEdit_Aspirin.Text = dataTable.Rows[0]["Aspirin"] + "";
//textEdit_Clopidogrel.Text = dataTable.Rows[0]["Clopidogrel"] + "";
//textEdit_Warfarin.Text = dataTable.Rows[0]["Warfarin"] + "";
//textEdit_Rivaroxaban.Text = dataTable.Rows[0]["Rivaroxaban"] + "";
//textEdit_Other.Text = dataTable.Rows[0]["Other"] + "";
//textEdit_Remark.Text = dataTable.Rows[0]["Remark"] + "";
//lookUpEdit_StrokeTeam.Text = dataTable.Rows[0]["StrokeTeam"] + "";
//诊断
//radioGroup_Diagnosis.EditValue = dataTable.Rows[0]["Diagnose"] + "";
//textEdit_Remark.Text = dataTable.Rows[0]["Remark"] + "";
//lookUpEdit_StrokeTeam.Text = dataTable.Rows[0]["StrokeTeam"] + "";
ECGExaminationTime.TimeValue = dataTable.Rows[0]["ECGExaminationTime"] + "";
ECGReportTime.TimeValue = dataTable.Rows[0]["ECGReportTime"] + "";
BloodCollectionTime.TimeValue = dataTable.Rows[0]["BloodCollectionTime"] + "";
BloodRoutineReportTime.TimeValue = dataTable.Rows[0]["BloodRoutineReportTime"] + "";
CoagulationRoutineReportTime.TimeValue = dataTable.Rows[0]["CoagulationRoutineReportTime"] + "";
ArrivalCTRoomTime.TimeValue = dataTable.Rows[0]["ArrivalCTRoomTime"] + "";
CTExaminationCompletionTime.TimeValue = dataTable.Rows[0]["CTExaminationCompletionTime"] + "";
LeaveCTRoomTime.TimeValue = dataTable.Rows[0]["LeaveCTRoomTime"] + "";
CTReportTime.TimeValue = dataTable.Rows[0]["CTReportTime"] + "";
//StartCatheterRoomTime.TimeValue = dataTable.Rows[0]["StartCatheterRoomTime"] + "";
//既往史
radioGroup_Hypertension.EditValue = dataTable.Rows[0]["Hypertension"] + "";
radioGroup_Diabetes.EditValue = dataTable.Rows[0]["Diabetes"] + "";
radioGroup_Smoke.EditValue = dataTable.Rows[0]["Smoke"] + "";
radioGroup_Hyperlipidemia.EditValue = dataTable.Rows[0]["Hyperlipidemia"] + "";
radioGroup_CoronaryHeartDisease.EditValue = dataTable.Rows[0]["CoronaryHeartDisease"] + "";
radioGroup_AtrialFibrillation.EditValue = dataTable.Rows[0]["AtrialFibrillation"] + "";
radioGroup_Gastrohelcoma.EditValue = dataTable.Rows[0]["Gastrohelcoma"] + "";
radioGroup_HemorrhagicDisorders.EditValue = dataTable.Rows[0]["HemorrhagicDisorders"] + "";
radioGroup_Tumour.EditValue = dataTable.Rows[0]["tumour"] + "";
radioGroup_ArteryDissection.EditValue = dataTable.Rows[0]["ArteryDissection"] + "";
radioGroup_Aneurysm.EditValue = dataTable.Rows[0]["Aneurysm"] + "";
memoEdit_AneurysmOther.EditValue = dataTable.Rows[0]["AneurysmOther"] + "";
PublicClass.SetItemChecked(checkedListBoxControl_Antiplatelet, PublicClass.ToString(dataTable.Rows[0]["Antiplatelet"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_Anticoagulation, PublicClass.ToString(dataTable.Rows[0]["Anticoagulation"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_Depressor, PublicClass.ToString(dataTable.Rows[0]["Depressor"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_Hypoglycemic, PublicClass.ToString(dataTable.Rows[0]["Hypoglycemic"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_LipidLowering, PublicClass.ToString(dataTable.Rows[0]["LipidLowering"], ""), ';');
textEdit_AllergicHistory.Text = dataTable.Rows[0]["AllergicHistory"] + "";
if (!string.IsNullOrEmpty(dataTable.Rows[0]["PatientLocation"] + ""))
{
radioGroup_PatientLocation.EditValue = dataTable.Rows[0]["PatientLocation"] + "";
}
look_InpatientDepartment.Text = dataTable.Rows[0]["InpatientDepartment"] + "";
timeControl_LeaveEmergencyTime.TimeValue = dataTable.Rows[0]["LeaveEmergencyTime"] + "";
timeControl_DeathTime.TimeValue = dataTable.Rows[0]["DeathTime"] + "";
timeControl_ObservationTime.TimeValue = dataTable.Rows[0]["ObservationTime"] + "";
memoEdit_EmergencyRemark.Text = dataTable.Rows[0]["EmergencyRemark"] + "";
textEdit_Residentphysician.Text = dataTable.Rows[0]["Residentphysician"] + "";
memo_PresentIllness.Text = dataTable.Rows[0]["PresentIllness"] + "";
memo_Remarks.Text = dataTable.Rows[0]["Remarks"] + "";
memo_AneurysmDrugs.Text = dataTable.Rows[0]["AllergicDrugs"] + "";
}
}
/// <summary>
/// 绑定既往史
/// </summary>
/// <param name="_patientGuid"></param>
/// <param name="entity"></param>
/* private void BindDataT_Service_Apoplexy_Prehospital()
{
DataTable dataTable = DBHelpClass.Get(string.Format("api/service/T_Service_Apoplexy_EmergencyRoom/GetByPatientGuid?patientGuid={0}", Cur_PatientGuid));
if (dataTable != null && dataTable.Rows.Count > 0)
{
//既往史
radioGroup_Hypertension.EditValue = dataTable.Rows[0]["Hypertension"] + "";
radioGroup_Diabetes.EditValue = dataTable.Rows[0]["Diabetes"] + "";
radioGroup_Smoke.EditValue = dataTable.Rows[0]["Smoke"] + "";
radioGroup_Hyperlipidemia.EditValue = dataTable.Rows[0]["Hyperlipidemia"] + "";
radioGroup_CoronaryHeartDisease.EditValue = dataTable.Rows[0]["CoronaryHeartDisease"] + "";
radioGroup_AtrialFibrillation.EditValue = dataTable.Rows[0]["AtrialFibrillation"] + "";
radioGroup_Gastrohelcoma.EditValue = dataTable.Rows[0]["Gastrohelcoma"] + "";
radioGroup_HemorrhagicDisorders.EditValue = dataTable.Rows[0]["HemorrhagicDisorders"] + "";
radioGroup_Tumour.EditValue = dataTable.Rows[0]["tumour"] + "";
radioGroup_Aneurysm.EditValue = dataTable.Rows[0]["Aneurysm"] + "";
memoEdit_AneurysmOther.EditValue = dataTable.Rows[0]["AneurysmOther"] + "";
radioGroup_ArteryDissection.EditValue = dataTable.Rows[0]["ArteryDissection"] + "";
//过敏史
textEdit_AllergicHistory.Text = dataTable.Rows[0]["AllergicHistory"] + "";
if (!string.IsNullOrEmpty(dataTable.Rows[0]["PatientLocation"] + ""))
{
radioGroup_PatientLocation.SelectedIndex = int.Parse(dataTable.Rows[0]["PatientLocation"] + "");
}
look_InpatientDepartment.Text = dataTable.Rows[0]["InpatientDepartment"] + "";
timeControl_LeaveEmergencyTime.TimeValue = dataTable.Rows[0]["LeaveEmergencyTime"] + "";
timeControl_DeathTime.TimeValue = dataTable.Rows[0]["DeathTime"] + "";
timeControl_ObservationTime.TimeValue = dataTable.Rows[0]["ObservationTime"] + "";
memoEdit_EmergencyRemark.Text = dataTable.Rows[0]["EmergencyRemark"] + "";
textEdit_Residentphysician.Text = dataTable.Rows[0]["Residentphysician"] + "";
}
}*/
/// <summary>
/// 绑定CT检察
/// </summary>
private void BindDataT_Service_Apoplexy_NCXZYJC()
{
DataTable dataTable = DBHelpClass.Get(string.Format("api/service/T_Service_Apoplexy_NCXZYJC/GetByPatientGuidAndReportType?patientGuid={0}", Cur_PatientGuid));
if (dataTable != null && dataTable.Rows.Count > 0)
{
#region 新增字段-对比内乡
ctImage = dataTable.Rows[0]["CTImage"] + "";
if (!string.IsNullOrEmpty(ctImage))
{
lbl_image.Visible = false;
hyperlinklbl_Image.Visible = true;
}
txt_DToCT.Text = dataTable.Rows[0]["DToCT"] + "";
txt_CTDoctor.Text = dataTable.Rows[0]["CTDoctor"] + "";
memo_CTResults.Text = dataTable.Rows[0]["CTResults"] + "";
#endregion
//检验科/CT检查
PublicClass.SetItemChecked(checkedListBoxControl_NCXLSite, PublicClass.ToString(dataTable.Rows[0]["NCXLSite"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_NCXRSite, PublicClass.ToString(dataTable.Rows[0]["NCXRSite"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_NCXCause, PublicClass.ToString(dataTable.Rows[0]["NCXCause"], ""), ';');
PublicClass.SetItemChecked(checkedListBoxControl_YXLNXGCheck, PublicClass.ToString(dataTable.Rows[0]["YXLNXGCheck"], ""), ';');
if (!string.IsNullOrEmpty(dataTable.Rows[0]["YXLNXGCheck"] + "") && dataTable.Rows[0]["YXLNXGCheck"].ToString().Contains("99"))
{
textEdit1.Visible = true;
textEdit1.Text = dataTable.Rows[0]["YXCheckOther"] + "";
}
textEdit_NCXArea.Text = dataTable.Rows[0]["NCXArea"] + "";
string ThrombolysisDoctorImageFiles = dataTable.Rows[0]["StrokeTeamImageFiles"] + "";
if (!string.IsNullOrEmpty(ThrombolysisDoctorImageFiles))
{
MemoryStream ms = new MemoryStream(Convert.FromBase64String(ThrombolysisDoctorImageFiles));
Image img = Image.FromStream(ms);
p_StrokeTeamImageFiles.Image = img;
labelControl1.Visible = true;
p_StrokeTeamImageFiles.Visible = true;
}
else
{
p_StrokeTeamImageFiles.Visible = false;
}
}
}
/// <summary>
/// 影像检查条件隐藏
/// </summary>
private void PatientLoad()
{
try
{
if (!string.IsNullOrEmpty(Cur_PatientGuid))
{
DataTable Cur_PatientDetailDT = DBHelpClass.Get(string.Format("api/service/T_Service_Patient/GetModelByIdOrGuid?guid={0}", Cur_PatientGuid));
if (Cur_PatientDetailDT != null && Cur_PatientDetailDT.Rows.Count > 0)
{
acltype = Cur_PatientDetailDT.Rows[0]["acZLType"].ToString();
if (!string.IsNullOrEmpty(acltype))
{
if (acltype.Contains("01") || acltype.Contains("02") || acltype.Contains("05"))
{
panelControl3.Visible = true;
//panelControl4.Visible = true;
panelControl3.Visible = false;
//panelControl4.Visible = false;
}
if (acltype.Contains("04"))
{
panelControl3.Visible = true;
//panelControl4.Visible = true;
panelControl3.Visible = false;
//panelControl4.Visible = false;
}
if (acltype.Contains("03"))
{
panelControl3.Visible = true;
//panelControl4.Visible = true;
}
}
}
}
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "档案信息 \r\n" + ex);
}
}
private void dateEdit_arriveCTTime_TimeValueChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(ArrivalCTRoomTime.TimeValue))
{
DateTime dt;
if (Cur_PatientsTimeAxisDT != null)
{
//获取到达大门时间
foreach (DataRow item in Cur_PatientsTimeAxisDT.Rows)
{
if (item["ID"].ToString() == PublicClassForDataBase.Config13)
{
if (!string.IsNullOrEmpty(item["RecordingTime"].ToString()))
{
dt = Convert.ToDateTime(item["RecordingTime"].ToString());
TimeSpan timeSpan = Convert.ToDateTime(ArrivalCTRoomTime.TimeValue).Subtract(dt);
DTCT = timeSpan.Days * 1440 + timeSpan.Hours * 60 + timeSpan.Minutes;
}
}
}
}
}
}
private void checkedListBoxControl_YXLNXGCheck_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
{
if (checkedListBoxControl_YXLNXGCheck.Text == "其他")
{
if (e.State == CheckState.Checked)
{
textEdit1.Visible = true;
}
else
{
textEdit1.Visible = false;
textEdit1.Text = "";
}
}
}
private void radioGroup_Aneurysm_SelectedIndexChanged(object sender, EventArgs e)
{
if (radioGroup_Aneurysm.EditValue + "" == "是")
{
memoEdit_AneurysmOther.Visible = true;
}
else
{
memoEdit_AneurysmOther.Visible = false;
}
}
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);
ctImage = file.Extension;
if (ctImage.ToLower() == ".png")
{
ctImage = PublicClass.Png2String(bitmap);
}
else
{
ctImage = PublicClass.Jpeg2String(bitmap);
}
lbl_image.Text = "已上传一份报告,点击保存后可存电子档";
}
else
{
XtraMessageBox.Show("上传图片不符合要求!");
}
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "上传心电图:\r\n" + ex);
}
}
#endregion
}
private void radioGroup_PatientLocation_SelectedIndexChanged(object sender, EventArgs e)
{
if (radioGroup_PatientLocation.SelectedIndex == 0)
{
panelControl6.Visible = true;
}
else
{
panelControl6.Visible = false;
}
if (radioGroup_PatientLocation.SelectedIndex == 1)
{
labelControl33.Visible = true;
timeControl_ObservationTime.Visible = true;
}
else
{
labelControl33.Visible = false;
timeControl_ObservationTime.Visible = false;
}
if (radioGroup_PatientLocation.SelectedIndex == 3)
{
labelControl31.Visible = true;
timeControl_DeathTime.Visible = true;
}
else
{
labelControl31.Visible = false;
timeControl_DeathTime.Visible = false;
}
}
private void CTExaminationCompletionTime_TimeValueChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(model.ArrivalHospitalTime + "") && !string.IsNullOrEmpty(CTExaminationCompletionTime.TimeValue + ""))
{
txt_DToCT.Text = (Convert.ToDateTime(CTExaminationCompletionTime.TimeValue) - Convert.ToDateTime(model.ArrivalHospitalTime)).TotalMinutes + "";
}
}
private void hyperlinklbl_Image_Click(object sender, EventArgs e)
{
byte[] image = Convert.FromBase64String(ctImage);
HL_FristAidPlatform_MultiSystemPublic.Form_ImageShow frm = new HL_FristAidPlatform_MultiSystemPublic.Form_ImageShow(image);
frm.ShowDialog();
}
private void simpleButtonselect_Click(object sender, EventArgs e)
{
checkedListBoxControl1.Visible = true;
simpleButtonEnsure.Visible = true;
}
private void simpleButtonEnsure_Click(object sender, EventArgs e)
{
{
string values = "";
string texts = "";
PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl1, "", out values, out texts);
memo_PresentIllness.Text = texts + "";
}
for (int i = 0; i < checkedListBoxControl1.Items.Count; i++)
{
checkedListBoxControl1.SetItemChecked(i, false);
}
checkedListBoxControl1.Visible = false;
simpleButtonEnsure.Visible = false;
}
}
}