445 lines
15 KiB
C#
445 lines
15 KiB
C#
using DevExpress.XtraEditors;
|
||
using HL_FristAidPlatform_DTO;
|
||
using HL_FristAidPlatform_Public;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel;
|
||
using System.Data;
|
||
using System.Drawing;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using System.Windows.Forms;
|
||
|
||
namespace HL_FristAidPlatform_Trauma.Page
|
||
{
|
||
public partial class UCScore : UserControl
|
||
{
|
||
string _guid = "";
|
||
string _name = "";
|
||
string _gender = "";
|
||
string _age = "";
|
||
public string Issguid1;
|
||
public string Issguid2;
|
||
public string Issguid3;
|
||
public string Issguid4;
|
||
public string Issguid5;
|
||
public UCScore()
|
||
{
|
||
InitializeComponent();
|
||
}
|
||
public UCScore(string patientGUID,string name="",string gender="",string age="")
|
||
{
|
||
InitializeComponent();
|
||
_guid = patientGUID;
|
||
_name = name;
|
||
_gender = gender;
|
||
_age = age;
|
||
}
|
||
|
||
private void hyperlinkLabelControl2_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_GCSScore frm = new Form_GCSScore(_guid);
|
||
frm.Show();
|
||
//if (!ShowChildrenForm("Form_GCSScore"))
|
||
//{
|
||
// GCSScore = new Form_GCSScore(_guid);
|
||
// GCSScore.WindowState = FormWindowState.Maximized;
|
||
// GCSScore.TopLevel = false;// 将子窗体设置为非顶级控件
|
||
// GCSScore.FormBorderStyle = FormBorderStyle.None;//设置无边框
|
||
// GCSScore.Dock = DockStyle.Fill; //容器大小随着调整窗体大小自动变化
|
||
// GCSScore.Show();
|
||
//}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开GCS界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl1_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_TIScore frm = new Form_TIScore(_guid);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开TI评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl3_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_ISSAISScore frm = new Form_ISSAISScore(_guid, Issguid1);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开ISSAIS评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void UCScore_Load(object sender, EventArgs e)
|
||
{
|
||
TIload();
|
||
GCSload();
|
||
ISSASSInfoLoad();
|
||
}
|
||
|
||
|
||
public void TIload()
|
||
{
|
||
try
|
||
{
|
||
DataTable dt = DBHelpClass.GetDataRow(string.Format("api/service/T_Service_Trauma_TIScore/GetTIScoreByPatientGuid?PatientGuid={0}", _guid));
|
||
if (dt != null && dt.Rows.Count > 0)
|
||
{
|
||
labelControl8.Text = dt.Rows[0]["TISum"].ToString();
|
||
|
||
string level = dt.Rows[0]["TILevel"].ToString();
|
||
if (level == "1")
|
||
{
|
||
labelControl7.Text = "轻伤";
|
||
}
|
||
if (level == "2")
|
||
{
|
||
labelControl7.Text = "重伤";
|
||
labelControl7.ForeColor = Color.FromArgb(255, 153, 0);
|
||
}
|
||
if (level == "3")
|
||
{
|
||
labelControl7.Text = "严重伤";
|
||
labelControl7.ForeColor = Color.Red;
|
||
}
|
||
|
||
labelControl9.Text = dt.Rows[0]["CreationDate"].ToString();
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "加载TI评分信息:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
public void GCSload()
|
||
{
|
||
try
|
||
{
|
||
DataTable dt = DBHelpClass.GetDataRow(string.Format("api/service/T_Service_Patient/GetGCS?patientGuid={0}&flag={1}", _guid, 0));
|
||
if (dt != null && dt.Rows.Count > 0)
|
||
{
|
||
labelControl10.Text = dt.Rows[0]["TotalScore"].ToString();
|
||
|
||
string level = dt.Rows[0]["GCSLevel"].ToString();
|
||
if (level == "0")
|
||
{
|
||
labelControl11.Text = "正常";
|
||
}
|
||
if (level == "1")
|
||
{
|
||
labelControl11.Text = "轻度昏迷";
|
||
labelControl11.ForeColor = Color.FromArgb(255, 153, 0);
|
||
}
|
||
if (level == "2")
|
||
{
|
||
labelControl11.Text = "重度昏迷";
|
||
labelControl11.ForeColor = Color.FromArgb(213, 25, 52);
|
||
}
|
||
if (level == "3")
|
||
{
|
||
labelControl11.Text = "严重昏迷";
|
||
labelControl11.ForeColor = Color.Red;
|
||
}
|
||
|
||
labelControl13.Text = dt.Rows[0]["CreateTime"].ToString();
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "加载GCS信息:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
public void ISSASSInfoLoad()
|
||
{
|
||
|
||
try
|
||
{
|
||
//tablePanel1
|
||
List<T_Service_Trauma_ISSAISDTO> list = DBHelpClass.GetList<T_Service_Trauma_ISSAISDTO>(string.Format("api/service/T_Service_Trauma_Assessment/GetISSAISListByPatientGuid?PatientGuid={0}", _guid));
|
||
if (list != null && list.Count > 0)
|
||
{
|
||
if (list.Count == 5)
|
||
simpleButton1.Enabled = false;
|
||
for (int i = 0; i < list.Count; i++)
|
||
{
|
||
if (i == 0)
|
||
{
|
||
lbl_Score1.Text = list[i].ISS;
|
||
lbl_Max1.Text = list[i].AIS;
|
||
lbl_Grave1.Text = list[i].Grave == 0 ? "非严重创伤病人" : "严重创伤病人";
|
||
lbl_Time1.Text = list[i].CreationDate.ToString().Replace("/", "-");
|
||
Issguid1 = list[i].GUID;
|
||
}
|
||
|
||
if (i == 1)
|
||
{
|
||
panel_ISS2.Visible = true;
|
||
lbl_Score2.Text = list[i].ISS;
|
||
lbl_Max2.Text = list[i].AIS;
|
||
lbl_Grave2.Text = list[i].Grave == 0 ? "非严重创伤病人" : "严重创伤病人";
|
||
lbl_Time2.Text = list[i].CreationDate.ToString().Replace("/", "-");
|
||
Issguid2 = list[i].GUID;
|
||
}
|
||
|
||
if (i == 2)
|
||
{
|
||
panel_ISS3.Visible = true;
|
||
lbl_Score3.Text = list[i].ISS;
|
||
lbl_Max3.Text = list[i].AIS;
|
||
lbl_Grave3.Text = list[i].Grave == 0 ? "非严重创伤病人" : "严重创伤病人";
|
||
lbl_Time3.Text = list[i].CreationDate.ToString().Replace("/", "-");
|
||
Issguid3 = list[i].GUID;
|
||
}
|
||
|
||
if (i == 3)
|
||
{
|
||
panel_ISS4.Visible = true;
|
||
lbl_Score4.Text = list[i].ISS;
|
||
lbl_Max4.Text = list[i].AIS;
|
||
lbl_Grave4.Text = list[i].Grave == 0 ? "非严重创伤病人" : "严重创伤病人";
|
||
lbl_Time4.Text = list[i].CreationDate.ToString().Replace("/","-");
|
||
Issguid4 = list[i].GUID;
|
||
}
|
||
|
||
if (i == 4)
|
||
{
|
||
panel_ISS5.Visible = true;
|
||
lbl_Score5.Text = list[i].ISS;
|
||
lbl_Max5.Text = list[i].AIS;
|
||
lbl_Grave5.Text = list[i].Grave == 0 ? "非严重创伤病人" : "严重创伤病人";
|
||
lbl_Time5.Text = list[i].CreationDate.ToString().Replace("/", "-");
|
||
Issguid5 = list[i].GUID;
|
||
}
|
||
}
|
||
}
|
||
//DataTable dt = DBHelpClass.GetDataRow(string.Format("api/service/T_Service_Trauma_Assessment/GetISSAISListByPatientGuid?PatientGuid={0}", _guid));
|
||
//if (dt != null && dt.Rows.Count > 0)
|
||
//{
|
||
// if (!string.IsNullOrEmpty(dt.Rows[0]["ISS"].ToString()))
|
||
// {
|
||
// lbl_Score1.Text = dt.Rows[0]["ISS"].ToString();
|
||
// }
|
||
// if (!string.IsNullOrEmpty(dt.Rows[0]["AIS"].ToString()))
|
||
// {
|
||
// lbl_Max1.Text = dt.Rows[0]["AIS"].ToString();
|
||
// }
|
||
// if (int.Parse(dt.Rows[0]["Grave"].ToString()) == 0)
|
||
// {
|
||
// lbl_Grave1.Text = "创伤病人";
|
||
// lbl_Grave1.ForeColor = Color.FromArgb(255, 153, 0);
|
||
// }
|
||
// if (int.Parse(dt.Rows[0]["Grave"].ToString()) == 1)
|
||
// {
|
||
// lbl_Grave1.Text = "严重创伤病人";
|
||
// lbl_Grave1.ForeColor = Color.Red;
|
||
// }
|
||
// lbl_Time1.Text = dt.Rows[0]["CreationDate"].ToString();
|
||
//}
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "加载ISSAIS信息:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl4_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_ISSAISScore frm = new Form_ISSAISScore(_guid, Issguid2);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开ISSAIS评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl5_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_ISSAISScore frm = new Form_ISSAISScore(_guid, Issguid3);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开ISSAIS评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl6_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_ISSAISScore frm = new Form_ISSAISScore(_guid, Issguid4);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开ISSAIS评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl7_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Form_ISSAISScore frm = new Form_ISSAISScore(_guid, Issguid5);
|
||
frm.Show();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
PublicClass.WriteErrorLog(this.Text, "打开ISSAIS评分界面:\r\n" + ex);
|
||
}
|
||
}
|
||
|
||
private void simpleButton1_Click(object sender, EventArgs e)
|
||
{
|
||
if (panel_ISS2.Visible == false)
|
||
{ panel_ISS2.Visible = true; }
|
||
else if (panel_ISS3.Visible == false)
|
||
{ panel_ISS3.Visible = true; }
|
||
else if (panel_ISS4.Visible == false)
|
||
{ panel_ISS4.Visible = true; }
|
||
else if (panel_ISS5.Visible == false)
|
||
{ panel_ISS5.Visible = true; }
|
||
}
|
||
|
||
private void simpleButton2_Click(object sender, EventArgs e)
|
||
{
|
||
TIload();
|
||
GCSload();
|
||
ISSASSInfoLoad();
|
||
XtraMessageBox.Show("刷新数据成功!!");
|
||
}
|
||
|
||
private void hyperlinkLabelControl3_Click_1(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Print.PrintTIScore(_guid, _name);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
|
||
throw;
|
||
}
|
||
|
||
}
|
||
|
||
private void hyperlinkLabelControl8_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
Print.PrintGCS(_guid, 0, false);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
|
||
throw;
|
||
}
|
||
|
||
}
|
||
|
||
private void simpleButton3_Click(object sender, EventArgs e)
|
||
{
|
||
try
|
||
{
|
||
DialogResult result = XtraMessageBox.Show("是否打印创伤病情评估记录报告单?","提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||
if(result == DialogResult.OK)
|
||
{
|
||
Print.PrintReportRecordSheet(_guid, _name, _gender, _age);
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl9_Click(object sender, EventArgs e)
|
||
{
|
||
//Form_ISSAISScore(_guid, Issguid1);
|
||
try
|
||
{
|
||
Print.PrintISSAISScoreReport(_guid, Issguid1, _name, _gender, _age);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl10_Click(object sender, EventArgs e)
|
||
{
|
||
//Form_ISSAISScore(_guid, Issguid2);
|
||
try
|
||
{
|
||
Print.PrintISSAISScoreReport(_guid, Issguid2, _name, _gender, _age);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl11_Click(object sender, EventArgs e)
|
||
{
|
||
//Form_ISSAISScore(_guid, Issguid3);
|
||
try
|
||
{
|
||
Print.PrintISSAISScoreReport(_guid, Issguid3, _name, _gender, _age);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl12_Click(object sender, EventArgs e)
|
||
{
|
||
//Form_ISSAISScore(_guid, Issguid4);
|
||
try
|
||
{
|
||
Print.PrintISSAISScoreReport(_guid, Issguid4, _name, _gender, _age);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
|
||
private void hyperlinkLabelControl13_Click(object sender, EventArgs e)
|
||
{
|
||
//Form_ISSAISScore(_guid, Issguid5);
|
||
try
|
||
{
|
||
Print.PrintISSAISScoreReport(_guid, Issguid5, _name, _gender, _age);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw;
|
||
}
|
||
}
|
||
}
|
||
}
|