207 lines
7.5 KiB
C#
207 lines
7.5 KiB
C#
using DevExpress.XtraEditors;
|
||
using HL_FristAidPlatform_DTO;
|
||
using System;
|
||
using System.Drawing;
|
||
using System.IO;
|
||
|
||
namespace HL_FristAidPlatform_Public
|
||
{
|
||
public partial class Form_DownwardReferral : XtraForm
|
||
{
|
||
public string PatientGuid;
|
||
public string HospitalGuid;
|
||
public PatientReferralDTO dto;
|
||
|
||
public Form_DownwardReferral(string patientGuid, string hospitalGuid)
|
||
{
|
||
InitializeComponent();
|
||
PatientGuid = patientGuid;
|
||
HospitalGuid = hospitalGuid;
|
||
}
|
||
|
||
private void Form_DownwardReferral_Load(object sender, EventArgs e)
|
||
{
|
||
dto = new PatientReferralDTO();
|
||
labelControl1.Text = Information.Hospital.Name;
|
||
GetPatientReferral();
|
||
}
|
||
|
||
public void GetPatientReferral()
|
||
{
|
||
string URL = string.Format("api/service/T_Service_DownwardReferral/GetPatientReferralOfChest?patientGuid={0}", PatientGuid);
|
||
PatientReferralModel model = new PatientReferralModel();
|
||
model = DBHelpClass.GetDateModel<PatientReferralModel>(URL);
|
||
if (model != null)
|
||
{
|
||
lbl_name.Text = model.Name;
|
||
if (model.Gender == 0)
|
||
lbl_gender.Text = "未知";
|
||
if (model.Gender == 1)
|
||
lbl_gender.Text = "男";
|
||
if (model.Gender == 0)
|
||
lbl_gender.Text = "女";
|
||
lbl_phone.Text = model.Phone;
|
||
if (model.Medical_Insurance_Type == "1")
|
||
lbl_medical_Insurance_Type.Text = "城镇职工基本医疗保险";
|
||
if (model.Medical_Insurance_Type == "2")
|
||
lbl_medical_Insurance_Type.Text = "新型农村合作医疗";
|
||
if (model.Medical_Insurance_Type == "3")
|
||
lbl_medical_Insurance_Type.Text = "城镇居民基本医疗保险";
|
||
if (model.Medical_Insurance_Type == "4")
|
||
lbl_medical_Insurance_Type.Text = "自费";
|
||
if (model.Medical_Insurance_Type == "5")
|
||
lbl_medical_Insurance_Type.Text = "军免";
|
||
lbl_inpatient_ID.Text = model.Inpatient_ID;
|
||
timeControl1.TimeValue = model.LeaveTime != null ? model.LeaveTime.ToString() : "";
|
||
memo_IllnessExplain.Text = model.IllnessExplain;
|
||
memo_HospitalSummary.Text = model.HospitalSummary;
|
||
memo_TreatmentPlan.Text = model.TreatmentPlan;
|
||
txt_LeaveHospital.Text = model.LeaveHospital;
|
||
txt_SendHospital.Text = model.SendHospital;
|
||
txt_DesignatedHospital.Text = model.DesignatedHospital;
|
||
if (model.PatientSignature != null)
|
||
{
|
||
dto.PatientSignature = model.PatientSignature;
|
||
string patientSignature = Convert.ToBase64String(model.PatientSignature);
|
||
if (!string.IsNullOrEmpty(patientSignature))
|
||
{
|
||
MemoryStream ms = new MemoryStream(Convert.FromBase64String(patientSignature));
|
||
Image img = Image.FromStream(ms);
|
||
pic_PatientSignature.Image = img;
|
||
}
|
||
}
|
||
if (model.ReferringDoctorSignature != null)
|
||
{
|
||
dto.ReferringDoctorSignature = model.ReferringDoctorSignature;
|
||
string referringDoctorSignature = Convert.ToBase64String(model.ReferringDoctorSignature);
|
||
if (!string.IsNullOrEmpty(referringDoctorSignature))
|
||
{
|
||
MemoryStream ms = new MemoryStream(Convert.FromBase64String(referringDoctorSignature));
|
||
Image img = Image.FromStream(ms);
|
||
pic_ReferringDoctorSignature.Image = img;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
private void simpleButton1_Click(object sender, EventArgs e)
|
||
{
|
||
dto.Name = lbl_name.Text;
|
||
dto.Gender = lbl_gender.Text;
|
||
dto.Phone = lbl_phone.Text;
|
||
dto.Medical_Insurance_Type = lbl_medical_Insurance_Type.Text;
|
||
dto.Inpatient_ID = lbl_inpatient_ID.Text;
|
||
if (!string.IsNullOrEmpty(timeControl1.TimeValue))
|
||
dto.LeaveTime = Convert.ToDateTime(timeControl1.TimeValue).ToString("yyyy-MM-dd HH:mm");
|
||
dto.IllnessExplain = memo_IllnessExplain.Text;
|
||
dto.HospitalSummary = memo_HospitalSummary.Text;
|
||
dto.TreatmentPlan = memo_TreatmentPlan.Text;
|
||
dto.LeaveHospital = txt_LeaveHospital.Text;
|
||
dto.SendHospital = txt_SendHospital.Text;
|
||
dto.DesignatedHospital = txt_DesignatedHospital.Text;
|
||
|
||
Print.PrintDownwardReferral(dto, true);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 患者转诊信息
|
||
/// </summary>
|
||
private class PatientReferralModel
|
||
{
|
||
/// <summary>
|
||
/// 创建人编号
|
||
/// </summary>
|
||
public long CreatorID { get; set; }
|
||
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public string PatientGuid { get; set; }
|
||
|
||
/// <summary>
|
||
/// 所属院区GUID
|
||
/// </summary>
|
||
public string HospitalGuid { get; set; }
|
||
|
||
/// <summary>
|
||
/// 真实姓名
|
||
/// </summary>
|
||
public string Name { get; set; }
|
||
|
||
/// <summary>
|
||
/// 性别
|
||
/// </summary>
|
||
public int Gender { get; set; }
|
||
|
||
/// <summary>
|
||
/// 年龄
|
||
/// </summary>
|
||
public int Age { get; set; }
|
||
|
||
/// <summary>
|
||
/// 移动电话
|
||
/// </summary>
|
||
public string Phone { get; set; }
|
||
|
||
/// <summary>
|
||
/// 住院ID
|
||
/// </summary>
|
||
public string Inpatient_ID { get; set; }
|
||
|
||
/// <summary>
|
||
/// 医保类型
|
||
/// 1:城镇职工基本医疗保险
|
||
/// 2:新型农村合作医疗
|
||
/// 3:城镇居民基本医疗保险
|
||
/// 4:自费
|
||
/// 5:军免
|
||
/// </summary>
|
||
public string Medical_Insurance_Type { get; set; }
|
||
|
||
/// <summary>
|
||
/// 转出时间
|
||
/// </summary>
|
||
public string LeaveTime { get; set; }
|
||
|
||
/// <summary>
|
||
/// 病情摘要及情况
|
||
/// </summary>
|
||
public string IllnessExplain { get; set; }
|
||
|
||
/// <summary>
|
||
/// 住院小结
|
||
/// </summary>
|
||
public string HospitalSummary { get; set; }
|
||
|
||
/// <summary>
|
||
/// 后期治疗方案及建议
|
||
/// </summary>
|
||
public string TreatmentPlan { get; set; }
|
||
|
||
/// <summary>
|
||
/// 转出医院
|
||
/// </summary>
|
||
public string LeaveHospital { get; set; }
|
||
|
||
/// <summary>
|
||
/// 送往医院
|
||
/// </summary>
|
||
public string SendHospital { get; set; }
|
||
|
||
/// <summary>
|
||
/// 患者/家属指定医院
|
||
/// </summary>
|
||
public string DesignatedHospital { get; set; }
|
||
|
||
/// <summary>
|
||
/// 患者知情同意签字
|
||
/// </summary>
|
||
public byte[] PatientSignature { get; set; }
|
||
|
||
/// <summary>
|
||
/// 转诊医生签字
|
||
/// </summary>
|
||
public byte[] ReferringDoctorSignature { get; set; }
|
||
}
|
||
}
|
||
} |