154 lines
5.9 KiB
C#
154 lines
5.9 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_FollowUp
|
|||
|
{
|
|||
|
public partial class Form_FollowUpDetail_FollowUpRisk : DevExpress.XtraEditors.XtraForm
|
|||
|
{
|
|||
|
private string patientguid;
|
|||
|
private string Guid;
|
|||
|
private PatientWaterSwallowDTO waterSwallow;
|
|||
|
|
|||
|
public Form_FollowUpDetail_FollowUpRisk(string guid)
|
|||
|
{
|
|||
|
patientguid = guid;
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void Form_FollowUpDetail_FollowUpRisk_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
string Url = string.Format("api/service/T_Service_Apoplexy_FollowUpAndHealthInfo/GetByPatientGuid1?PatientGuid={0}",patientguid);
|
|||
|
DataTable dt = DBHelpClass.Get(Url);
|
|||
|
if (dt != null && dt.Rows.Count > 0)
|
|||
|
{
|
|||
|
if (!string.IsNullOrEmpty(dt.Rows[0]["VTERisk"].ToString()))
|
|||
|
{
|
|||
|
radioGroup1.EditValue = int.Parse(dt.Rows[0]["VTERisk"].ToString());
|
|||
|
}
|
|||
|
if (!string.IsNullOrEmpty(dt.Rows[0]["FallRisk"].ToString()))
|
|||
|
{
|
|||
|
radioGroup2.EditValue = int.Parse(dt.Rows[0]["FallRisk"].ToString());
|
|||
|
}
|
|||
|
if (!string.IsNullOrEmpty(dt.Rows[0]["PressureInjuryRisk"].ToString()))
|
|||
|
{
|
|||
|
radioGroup3.EditValue =int.Parse( dt.Rows[0]["PressureInjuryRisk"].ToString());
|
|||
|
}
|
|||
|
if (!string.IsNullOrEmpty(dt.Rows[0]["Swallow"].ToString()))
|
|||
|
{
|
|||
|
radioGroup4.EditValue = int.Parse(dt.Rows[0]["Swallow"].ToString());
|
|||
|
}
|
|||
|
textBox1.Text =dt.Rows[0]["SwallowDegree"].ToString();
|
|||
|
if (!string.IsNullOrEmpty(dt.Rows[0]["NutritionalRisk"].ToString()))
|
|||
|
{
|
|||
|
radioGroup5.EditValue = int.Parse(dt.Rows[0]["NutritionalRisk"].ToString());
|
|||
|
}
|
|||
|
textBox2.Text = dt.Rows[0]["NutritionalRiskScore"].ToString();
|
|||
|
Guid = dt.Rows[0]["Guid"].ToString();
|
|||
|
}
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
PublicClass.WriteErrorLog(this.Text, "卒中健康与随访风险评估页面数据绑定:\r\n" + ex);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
string Url = "api/service/T_Service_Apoplexy_FollowUpAndHealthInfo/UpdateNotNullColumns";
|
|||
|
List<T_Service_Apoplexy_FollowUpAndHealthInfoDTO> list = new List<T_Service_Apoplexy_FollowUpAndHealthInfoDTO>();
|
|||
|
T_Service_Apoplexy_FollowUpAndHealthInfoDTO af = new T_Service_Apoplexy_FollowUpAndHealthInfoDTO();
|
|||
|
#region 保存信息
|
|||
|
af.PatientGuid = patientguid;
|
|||
|
if (radioGroup1.EditValue != null)
|
|||
|
{
|
|||
|
af.VTERisk = radioGroup1.EditValue.ToString();
|
|||
|
}
|
|||
|
if (radioGroup2.EditValue != null)
|
|||
|
{
|
|||
|
af.FallRisk = radioGroup2.EditValue.ToString();
|
|||
|
}
|
|||
|
if (radioGroup3.EditValue != null)
|
|||
|
{
|
|||
|
af.PressureInjuryRisk = radioGroup3.EditValue.ToString();
|
|||
|
}
|
|||
|
if (radioGroup4.EditValue != null)
|
|||
|
{
|
|||
|
af.Swallow = radioGroup4.EditValue.ToString();
|
|||
|
}
|
|||
|
if (radioGroup5.EditValue != null)
|
|||
|
{
|
|||
|
af.NutritionalRisk = radioGroup5.EditValue.ToString();
|
|||
|
}
|
|||
|
af.SwallowDegree = textBox1.Text;
|
|||
|
af.NutritionalRiskScore = textBox2.Text;
|
|||
|
af.DeleteFlag = 0;
|
|||
|
af.GUID = Guid;
|
|||
|
list.Add(af);
|
|||
|
#endregion
|
|||
|
ClientFactory<T_Service_Apoplexy_FollowUpAndHealthInfoDTO> httpClient = new HttpClientFactory<T_Service_Apoplexy_FollowUpAndHealthInfoDTO>();
|
|||
|
Client<T_Service_Apoplexy_FollowUpAndHealthInfoDTO> client = httpClient.VisitFactory();
|
|||
|
ListEntity<T_Service_Apoplexy_FollowUpAndHealthInfoDTO> s = client.Post(Url, list);
|
|||
|
if (s.Success)
|
|||
|
{
|
|||
|
MessageBox.Show("保存成功!");
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
MessageBox.Show("保存失败!");
|
|||
|
}
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
PublicClass.WriteErrorLog(this.Text, "卒中健康与随访风险评估页面数据保存:\r\n" + ex);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void simpleButton2_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
//Form_PatientWaterSwallow swallow = new Form_PatientWaterSwallow(patientguid, 0);
|
|||
|
//swallow.Owner = this;
|
|||
|
//swallow.Show();
|
|||
|
|
|||
|
string strText = string.Empty;
|
|||
|
|
|||
|
InputDialog_FollowUp.ShowForWaterSwallow(out strText, out waterSwallow, Guid, 1);
|
|||
|
if (!string.IsNullOrEmpty(strText))
|
|||
|
{
|
|||
|
textBox1.Text = strText;
|
|||
|
if (int.Parse(strText) > 1)
|
|||
|
{
|
|||
|
radioGroup4.SelectedIndex = 1;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
radioGroup4.SelectedIndex = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
textBox1.Text = strText;
|
|||
|
radioGroup4.SelectedIndex = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void Refresh(string text)
|
|||
|
{
|
|||
|
textBox1.Text = text;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|