138 lines
5.1 KiB
C#
138 lines
5.1 KiB
C#
|
using DevExpress.XtraEditors;
|
|||
|
using HL_FristAidPlatform_DTO;
|
|||
|
using HL_FristAidPlatform_Public;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.Linq;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace HL_FristAidPlatform_EMRS
|
|||
|
{
|
|||
|
public partial class Form_AssistantExaminationInfo : XtraForm
|
|||
|
{
|
|||
|
private string _patientGuid;
|
|||
|
private string guid2;
|
|||
|
private string str;
|
|||
|
|
|||
|
public Form_AssistantExaminationInfo(string patientGuid)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
_patientGuid = patientGuid;
|
|||
|
}
|
|||
|
|
|||
|
private void Form_AssistantExaminationInfo_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
QueryInfo(_patientGuid);
|
|||
|
}
|
|||
|
|
|||
|
public void QueryInfo(string guid)
|
|||
|
{
|
|||
|
string url = string.Format("/api/service/T_Service_FirstAid_AssistantExamination/GetAssistantExaminationInfo?guid={0}", _patientGuid);
|
|||
|
DataTable dt = DBHelpClass.GetDataRow(url);
|
|||
|
if (dt != null)
|
|||
|
{
|
|||
|
if (dt.Rows.Count > 0)
|
|||
|
{
|
|||
|
guid2 = dt.Rows[0]["GUID"].ToString();
|
|||
|
|
|||
|
#region 辅助检查
|
|||
|
|
|||
|
txt_GLU.Text = dt.Rows[0]["GLU"].ToString() == "-1" ? "" : dt.Rows[0]["GLU"].ToString();
|
|||
|
txt_SPO2.Text = dt.Rows[0]["SPO2"].ToString();
|
|||
|
memo_Other.Text = dt.Rows[0]["Other"].ToString();
|
|||
|
cmb_Illness.Text = dt.Rows[0]["Illness"].ToString();
|
|||
|
checkedcmb_Measures.Text = dt.Rows[0]["Measures"].ToString();
|
|||
|
memo_WayChange.Text = dt.Rows[0]["ChangeOnTheWay"].ToString();
|
|||
|
cmb_FirstAidEffect.Text = dt.Rows[0]["FirstAidEffect"].ToString();
|
|||
|
cmb_DeathCertificate.Text = dt.Rows[0]["DeathCertificate"].ToString();
|
|||
|
|
|||
|
time_CDateTime.TimeValue = dt.Rows[0]["CDateTime"].ToString();
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void treeList1_AfterCheckNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e)
|
|||
|
{
|
|||
|
if (e.Node.CheckState == CheckState.Checked)
|
|||
|
{
|
|||
|
if (!string.IsNullOrEmpty(str))
|
|||
|
{
|
|||
|
str += ",";
|
|||
|
}
|
|||
|
str += e.Node.GetDisplayText(this.treeListColumn1);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if (!string.IsNullOrEmpty(str))
|
|||
|
{
|
|||
|
List<string> strArr = str.Split(',').ToList();
|
|||
|
strArr.Remove(e.Node.GetDisplayText(this.treeListColumn1));
|
|||
|
str = string.Join(",", strArr.ToArray());
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
|
|||
|
List<AssistantExaminationDTO> list = new List<AssistantExaminationDTO>();
|
|||
|
AssistantExaminationDTO dto = new AssistantExaminationDTO();
|
|||
|
dto.PatientGUID = _patientGuid;
|
|||
|
dto.AssistantExamination = new AssistantExamination();
|
|||
|
dto.AssistantExamination.GUID = guid2;
|
|||
|
if (string.IsNullOrEmpty(dto.AssistantExamination.GUID))
|
|||
|
{
|
|||
|
dto.AssistantExamination.CreateUser = Information.User.ID;
|
|||
|
}
|
|||
|
#region 5.辅助检查信息
|
|||
|
dto.AssistantExamination.GLU = decimal.Parse(txt_GLU.Text == "" ? "0" : txt_GLU.Text);
|
|||
|
dto.AssistantExamination.SPO2 = txt_SPO2.Text;
|
|||
|
dto.AssistantExamination.Other = memo_Other.Text.ToString();
|
|||
|
dto.AssistantExamination.Illness = cmb_Illness.Text;
|
|||
|
dto.AssistantExamination.Measures = checkedcmb_Measures.Text;
|
|||
|
dto.AssistantExamination.ChangeOnTheWay = memo_WayChange.Text.ToString();
|
|||
|
dto.AssistantExamination.FirstAidEffect = cmb_FirstAidEffect.Text;
|
|||
|
dto.AssistantExamination.DeathCertificate = cmb_DeathCertificate.Text;
|
|||
|
|
|||
|
if (!string.IsNullOrEmpty(time_CDateTime.TimeValue.ToString()))
|
|||
|
{
|
|||
|
dto.AssistantExamination.CDatetime = Convert.ToDateTime(time_CDateTime.TimeValue.ToString());
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
list.Add(dto);
|
|||
|
string Url = string.Empty;
|
|||
|
|
|||
|
Url = "api/service/T_Service_FirstAid_AssistantExamination/UpdateOrInsert";
|
|||
|
|
|||
|
|
|||
|
//初始化两个工厂
|
|||
|
ClientFactory<AssistantExaminationDTO> httpClient = new HttpClientFactory<AssistantExaminationDTO>();
|
|||
|
Client<AssistantExaminationDTO> client = httpClient.VisitFactory();
|
|||
|
|
|||
|
if (client.Post(Url, list).Success)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("保存成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|||
|
Form_EMRInfo info;
|
|||
|
info = (Form_EMRInfo)this.Owner;
|
|||
|
info.ParentInfo(_patientGuid);
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
}
|
|||
|
catch (Exception)
|
|||
|
{
|
|||
|
|
|||
|
throw;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|