238 lines
7.8 KiB
C#
238 lines
7.8 KiB
C#
|
using DevExpress.XtraEditors;
|
|||
|
using HL_FristAidPlatform_DTO;
|
|||
|
using HL_FristAidPlatform_Public;
|
|||
|
using Newtonsoft.Json;
|
|||
|
using Newtonsoft.Json.Linq;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace HL_FristAidPlatform_EmergencyTriage
|
|||
|
{
|
|||
|
public partial class Form_RTS : XtraForm
|
|||
|
{
|
|||
|
private string _patientGUID;
|
|||
|
private int flag;
|
|||
|
|
|||
|
private float gcs;
|
|||
|
|
|||
|
private float systolicPressureScore;
|
|||
|
|
|||
|
private float breathingScore;
|
|||
|
public Form_RTS(string patientGUID,int _flag)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
_patientGUID = patientGUID;
|
|||
|
flag = _flag;
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup1.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
gcs = 0;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
gcs = 1;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
gcs = 2;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
gcs = 3;
|
|||
|
break;
|
|||
|
case 4:
|
|||
|
gcs = 4;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotalScore.Text = (float.Parse((gcs * 0.9368).ToString())+ float.Parse((systolicPressureScore * 0.7326).ToString())+ float.Parse((breathingScore * 0.2908).ToString())).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup2_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup2.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
systolicPressureScore = 0;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
systolicPressureScore = 1;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
systolicPressureScore = 2;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
systolicPressureScore = 3;
|
|||
|
break;
|
|||
|
case 4:
|
|||
|
systolicPressureScore = 4;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotalScore.Text = (float.Parse((gcs * 0.9368).ToString()) + float.Parse((systolicPressureScore * 0.7326).ToString()) + float.Parse((breathingScore * 0.2908).ToString())).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup3_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup3.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
breathingScore = 0;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
breathingScore = 1;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
breathingScore = 2;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
breathingScore = 3;
|
|||
|
break;
|
|||
|
case 4:
|
|||
|
breathingScore = 4;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotalScore.Text = (float.Parse((gcs * 0.9368).ToString()) + float.Parse((systolicPressureScore * 0.7326).ToString()) + float.Parse((breathingScore * 0.2908).ToString())).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (radioGroup1.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("GCS选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup1.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup2.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("收缩压选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup2.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup3.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("呼吸频率选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup3.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
List<FirstAid_PatientRTSDTO> list = new List<FirstAid_PatientRTSDTO>();
|
|||
|
FirstAid_PatientRTSDTO dto = new FirstAid_PatientRTSDTO();
|
|||
|
dto.PatientGUID = _patientGUID;
|
|||
|
dto.CreateUser = Information.User.ID;
|
|||
|
dto.GCS = gcs;
|
|||
|
dto.SystolicPressureScore = systolicPressureScore;
|
|||
|
dto.BreathingScore = breathingScore;
|
|||
|
dto.TotalScore = float.Parse(lbl_TotalScore.Text);
|
|||
|
//院前rts flag=0
|
|||
|
dto.Flag = flag;
|
|||
|
if (dto.TotalScore > 11)
|
|||
|
{
|
|||
|
dto.RTSLevel = 1;
|
|||
|
}
|
|||
|
else {
|
|||
|
dto.RTSLevel = 2;
|
|||
|
}
|
|||
|
list.Add(dto);
|
|||
|
string Url = string.Empty;
|
|||
|
Url = "api/service/FirstAid_PatientScore/AddRTS";
|
|||
|
|
|||
|
//初始化两个工厂
|
|||
|
ClientFactory<FirstAid_PatientRTSDTO> httpClient = new HttpClientFactory<FirstAid_PatientRTSDTO>();
|
|||
|
Client<FirstAid_PatientRTSDTO> client = httpClient.VisitFactory();
|
|||
|
|
|||
|
ListEntity<FirstAid_PatientRTSDTO> t = client.Post(Url, list);
|
|||
|
if (t.Success)
|
|||
|
{
|
|||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(t.DataString);
|
|||
|
string msg = jo["Msg"].ToString();
|
|||
|
|
|||
|
if (!string.IsNullOrEmpty(msg))
|
|||
|
{
|
|||
|
XtraMessageBox.Show(msg);
|
|||
|
}
|
|||
|
this.Close();
|
|||
|
Form_PatientScore Patient;
|
|||
|
Patient = (Form_PatientScore)this.Owner;
|
|||
|
Patient.GetPatientTriageScoreList();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
XtraMessageBox.Show("保存失败");
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void Form_PatientInfoRTS_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
radioGroup1.SelectedIndex = -1;
|
|||
|
radioGroup2.SelectedIndex = -1;
|
|||
|
radioGroup3.SelectedIndex = -1;
|
|||
|
|
|||
|
string url = string.Format("api/service/FirstAid_PatientScore/GetRTSByPaitentGuid?patientGuid={0}&flag={1}", _patientGUID, flag);
|
|||
|
PatientRTSDTO dto = DBHelpClass.GetDateModel<PatientRTSDTO>(url);
|
|||
|
if (dto != null)
|
|||
|
{
|
|||
|
radioGroup1.SelectedIndex =int.Parse(dto.GCS.ToString());
|
|||
|
radioGroup2.SelectedIndex = int.Parse(dto.SystolicPressureScore.ToString());
|
|||
|
radioGroup3.SelectedIndex = int.Parse(dto.BreathingScore.ToString());
|
|||
|
lbl_TotalScore.Text = dto.TotalScore.ToString();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private class PatientRTSDTO
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 0:<=3 ;
|
|||
|
/// 1: 4-5 ;
|
|||
|
/// 2:6-8;
|
|||
|
/// 3:9-12;
|
|||
|
/// 4:13-15
|
|||
|
/// GCS 权重 GCS乘以 0.9368
|
|||
|
/// </summary>
|
|||
|
public float GCS { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 0:0
|
|||
|
/// 1:1-49
|
|||
|
/// 2:50-75
|
|||
|
/// 3:76-78
|
|||
|
/// 4:>89
|
|||
|
/// 乘以0.7326
|
|||
|
/// </summary>
|
|||
|
public float SystolicPressureScore { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 0:0
|
|||
|
/// 1:1-5
|
|||
|
/// 2:6-9
|
|||
|
/// 3:10-29
|
|||
|
/// 4:>29
|
|||
|
/// 乘以0.2908
|
|||
|
/// </summary>
|
|||
|
public float BreathingScore { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 总分
|
|||
|
/// </summary>
|
|||
|
public float TotalScore { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 1:0-12
|
|||
|
/// 2:>11 轻伤
|
|||
|
/// 3:<11 重伤
|
|||
|
/// </summary>
|
|||
|
public int RTSLevel { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 评分时间
|
|||
|
/// </summary>
|
|||
|
public DateTime ScoreTime { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 创建人
|
|||
|
/// </summary>
|
|||
|
public string CreateUser { get; set; }
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|