241 lines
10 KiB
C#
241 lines
10 KiB
C#
using DevExpress.XtraEditors;
|
|
using HL_FristAidPlatform_DTO;
|
|
using HL_FristAidPlatform_Public;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Runtime.InteropServices;
|
|
using System.Windows.Forms;
|
|
|
|
namespace HL_FristAidPlatform_Apoplexy
|
|
{
|
|
public partial class Form_InformedConsent : Form
|
|
{
|
|
public string name;
|
|
public string gender;
|
|
public int age;
|
|
public string number;
|
|
public string patientGuid;
|
|
public string diagnose;
|
|
public string fileAddress;
|
|
|
|
private UserControl_CraniotomyInformedConsent craniotomy;
|
|
private UserControl_rt_PAInformedConsent Rt_PA;
|
|
private UserControl_AcuteIschemicStrokeInformedConsent acuteIschemicStroke;
|
|
private UserControl_CarotidAngioplastyInformedConsent carotidAngioplasty;
|
|
private UserControl_IntracranialAneurysm intracranialAneurysm;
|
|
|
|
public Form_InformedConsent(string _patientGuid, string _name, string _gender, int _age, string _number, string _diagnose)
|
|
{
|
|
InitializeComponent();
|
|
patientGuid = _patientGuid;
|
|
name = _name;
|
|
gender = _gender;
|
|
age = _age;
|
|
number = _number;
|
|
diagnose = _diagnose;
|
|
|
|
}
|
|
|
|
private void simpleButton_Save_Click(object sender, EventArgs e)
|
|
{
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
craniotomy.SaveInformedConsent(1);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 1)
|
|
{
|
|
Rt_PA.SaveInformedConsent(1);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 2)
|
|
{
|
|
acuteIschemicStroke.SaveInformedConsent(1);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
intracranialAneurysm.SaveInformedConsent(1);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
carotidAngioplasty.SaveInformedConsent(1);
|
|
}
|
|
}
|
|
|
|
private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
/**
|
|
0 脑出血开颅手术知情同意书
|
|
1 急性缺血性卒中rt - PA静脉溶栓知情同意书
|
|
2 急性缺血性卒中血管内治疗知情同意书
|
|
3 颅内动脉瘤介入栓塞术知情同意书
|
|
4 颈动脉血管成型支架植入术知情同意书 **/
|
|
panel1.Controls.Clear();
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
craniotomy = new UserControl_CraniotomyInformedConsent(patientGuid, name, gender, age, number, diagnose, fileAddress);
|
|
panel1.Controls.Add(craniotomy);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 1)
|
|
{
|
|
Rt_PA = new UserControl_rt_PAInformedConsent(patientGuid, name, gender, age, number,fileAddress);
|
|
panel1.Controls.Add(Rt_PA);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 2)
|
|
{
|
|
acuteIschemicStroke = new UserControl_AcuteIschemicStrokeInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(acuteIschemicStroke);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
intracranialAneurysm = new UserControl_IntracranialAneurysm(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(intracranialAneurysm);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
carotidAngioplasty = new UserControl_CarotidAngioplastyInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(carotidAngioplasty);
|
|
}
|
|
}
|
|
|
|
private void pictureBox_Print_Click(object sender, EventArgs e)
|
|
{
|
|
if (gender == "0")
|
|
gender = "未知";
|
|
if (gender == "1")
|
|
gender = "男";
|
|
if (gender == "2")
|
|
gender = "女";
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
Print.PrintRt_PAInformedConsent(patientGuid, 1, name, gender, age, number, "脑出血开颅手术知情同意书", "Craniotomy.grf");
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 1)
|
|
{
|
|
Print.PrintRt_PAInformedConsent(patientGuid, 2, name, gender, age, number, "急性缺血性卒中rt-PA静脉溶栓知情同意书", "rt_PAInformedConsent.grf");
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 2)
|
|
{
|
|
Print.PrintRt_PAInformedConsent(patientGuid, 3, name, gender, age, number, "急性缺血性卒中血管内治疗知情同意书", "AcuteIschemicStroke.grf");
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
intracranialAneurysm.PrintIntracranialAneurysm();
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
Print.PrintRt_PAInformedConsent(patientGuid, 7, name, gender, age, number, "颈动脉血管成型支架植入术知情同意书", "CarotidAngioplasty.grf");
|
|
}
|
|
}
|
|
|
|
|
|
private void Form_InformedConsent_Load(object sender, EventArgs e)
|
|
{
|
|
panel1.Controls.Clear();
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
craniotomy = new UserControl_CraniotomyInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(craniotomy);
|
|
}
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 2));
|
|
if (dto != null)
|
|
{
|
|
panel1.Controls.Clear();
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
craniotomy = new UserControl_CraniotomyInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(craniotomy);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 1)
|
|
{
|
|
Rt_PA = new UserControl_rt_PAInformedConsent(patientGuid, name, gender, age, number,fileAddress);
|
|
panel1.Controls.Add(Rt_PA);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 2)
|
|
{
|
|
acuteIschemicStroke = new UserControl_AcuteIschemicStrokeInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(acuteIschemicStroke);
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
carotidAngioplasty = new UserControl_CarotidAngioplastyInformedConsent(patientGuid, name, gender, age, number, diagnose,fileAddress);
|
|
panel1.Controls.Add(carotidAngioplasty);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
private void pictureBox_Record_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (comboBoxEdit1.SelectedIndex == 0)
|
|
{
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 1));
|
|
if (dto != null)
|
|
{
|
|
fileAddress = dto.FileAddress;
|
|
}
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 1)
|
|
{
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 2));
|
|
if (dto != null)
|
|
{
|
|
fileAddress = dto.FileAddress;
|
|
}
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 2)
|
|
{
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 3));
|
|
if (dto != null)
|
|
{
|
|
fileAddress = dto.FileAddress;
|
|
}
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 6));
|
|
if (dto != null)
|
|
{
|
|
fileAddress = dto.FileAddress;
|
|
}
|
|
}
|
|
if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
T_Service_InformedConsentDTO dto = DBHelpClass.GetDateModel<T_Service_InformedConsentDTO>(string.Format("api/service/T_Service_InformedConsent/GetnformedConsentByPatientGuid?patientGuid={0}&flag={1}", patientGuid, 7));
|
|
if (dto != null)
|
|
{
|
|
fileAddress = dto.FileAddress;
|
|
}
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(fileAddress))
|
|
{
|
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
{
|
|
Process.Start(new ProcessStartInfo("cmd", $"/c start { fileAddress}") { CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
|
|
}
|
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|
{
|
|
Process.Start("xdg-open", fileAddress);
|
|
}
|
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) //Mac环境
|
|
{
|
|
Process.Start("open", fileAddress);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
XtraMessageBox.Show("未上传录音文件");
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
}
|
|
} |