203 lines
7.4 KiB
C#
203 lines
7.4 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_Trauma
|
|||
|
{
|
|||
|
public partial class Form_PatientInfoMEWS : XtraForm
|
|||
|
{
|
|||
|
private string _patientGUID;
|
|||
|
private int heartRateScore;
|
|||
|
private int systolicPressureScore;
|
|||
|
private int breathingScore;
|
|||
|
private int temperatureScore;
|
|||
|
private int sonsciousScore;
|
|||
|
private int mewsLevel;
|
|||
|
public Form_PatientInfoMEWS(string patientGUID)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
_patientGUID = patientGUID;
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup1.SelectedIndex)
|
|||
|
{
|
|||
|
case 2:
|
|||
|
heartRateScore = 2;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
heartRateScore = 1;
|
|||
|
break;
|
|||
|
case 4:
|
|||
|
heartRateScore = 0;
|
|||
|
break;
|
|||
|
case 5:
|
|||
|
heartRateScore = 1;
|
|||
|
break;
|
|||
|
case 6:
|
|||
|
heartRateScore = 2;
|
|||
|
break;
|
|||
|
case 7:
|
|||
|
heartRateScore = 3;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotaoSocre.Text = (heartRateScore + systolicPressureScore + breathingScore + temperatureScore + sonsciousScore).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup2_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup2.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
systolicPressureScore = 3;
|
|||
|
radioGroup6.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
systolicPressureScore = 2;
|
|||
|
radioGroup6.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
systolicPressureScore = 1;
|
|||
|
radioGroup6.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
systolicPressureScore = 0;
|
|||
|
radioGroup6.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotaoSocre.Text = (heartRateScore + systolicPressureScore + breathingScore + temperatureScore + sonsciousScore).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup6_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup6.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
systolicPressureScore = 2;
|
|||
|
radioGroup2.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotaoSocre.Text = (heartRateScore + systolicPressureScore + breathingScore + temperatureScore + sonsciousScore).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup7_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup7.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
breathingScore = 2;
|
|||
|
radioGroup3.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotaoSocre.Text = (heartRateScore + systolicPressureScore + breathingScore + temperatureScore + sonsciousScore).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void radioGroup3_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (radioGroup3.SelectedIndex)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
breathingScore = 0;
|
|||
|
radioGroup7.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
breathingScore = 1;
|
|||
|
radioGroup7.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
breathingScore = 2;
|
|||
|
radioGroup7.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
breathingScore = 3;
|
|||
|
radioGroup7.SelectedIndex = -1;
|
|||
|
break;
|
|||
|
}
|
|||
|
lbl_TotaoSocre.Text = (heartRateScore + systolicPressureScore + breathingScore + temperatureScore + sonsciousScore).ToString();
|
|||
|
}
|
|||
|
|
|||
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (radioGroup1.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("心率选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup1.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup2.SelectedIndex == -1 && radioGroup6.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("收缩压选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup2.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup7.SelectedIndex == -1 && radioGroup3.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("呼吸频率选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup7.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup4.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("体温选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup4.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
if (radioGroup5.SelectedIndex == -1)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("意识选择项为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|||
|
radioGroup5.Focus();
|
|||
|
return;
|
|||
|
}
|
|||
|
List<FirstAid_PatientMEWSDTO> list = new List<FirstAid_PatientMEWSDTO>();
|
|||
|
FirstAid_PatientMEWSDTO dto = new FirstAid_PatientMEWSDTO();
|
|||
|
dto.PatientGUID = _patientGUID;
|
|||
|
dto.CreateUser = Information.User.ID;
|
|||
|
dto.HeartRateScore = heartRateScore;
|
|||
|
dto.SystolicPressureScore = systolicPressureScore;
|
|||
|
dto.BreathingScore = breathingScore;
|
|||
|
dto.TemperatureScore = temperatureScore;
|
|||
|
dto.SonsciousScore = sonsciousScore;
|
|||
|
dto.TotalScore = int.Parse(lbl_TotaoSocre.Text);
|
|||
|
|
|||
|
|
|||
|
list.Add(dto);
|
|||
|
string Url = string.Empty;
|
|||
|
Url = "api/service/FirstAid_PatientScore/AddMEWS";
|
|||
|
|
|||
|
//初始化两个工厂
|
|||
|
ClientFactory<FirstAid_PatientMEWSDTO> httpClient = new HttpClientFactory<FirstAid_PatientMEWSDTO>();
|
|||
|
Client<FirstAid_PatientMEWSDTO> client = httpClient.VisitFactory();
|
|||
|
|
|||
|
if (client.Post(Url, list).Success)
|
|||
|
{
|
|||
|
XtraMessageBox.Show("保存成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|||
|
Form_PatientFristAidInfo info;
|
|||
|
info = (Form_PatientFristAidInfo)this.Owner;
|
|||
|
info.FirstAidScore(_patientGUID);
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void Form_PatientInfoMEWS_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
radioGroup1.SelectedIndex = -1;
|
|||
|
radioGroup2.SelectedIndex = -1;
|
|||
|
radioGroup3.SelectedIndex = -1;
|
|||
|
radioGroup4.SelectedIndex = -1;
|
|||
|
radioGroup5.SelectedIndex = -1;
|
|||
|
radioGroup6.SelectedIndex = -1;
|
|||
|
radioGroup7.SelectedIndex = -1;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|