264 lines
16 KiB
C#
264 lines
16 KiB
C#
using DevExpress.XtraEditors;
|
|
using HL_FristAidPlatform_DTO;
|
|
using HL_FristAidPlatform_Public;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Windows.Forms;
|
|
|
|
namespace HL_FristAidPlatform_EMRS
|
|
{
|
|
public partial class Form_HealthCheckupInfo : XtraForm
|
|
{
|
|
private string _patientGuid;
|
|
private string healthGuid;
|
|
public Form_HealthCheckupInfo(string patientGuid)
|
|
{
|
|
InitializeComponent();
|
|
_patientGuid = patientGuid;
|
|
}
|
|
|
|
public void QueryInfo(string guid)
|
|
{
|
|
string url = string.Format("/api/service/T_Service_FirstAid_HealthCheckup/GetHealthCheckupInfo?guid={0}", _patientGuid);
|
|
DataTable dt = DBHelpClass.GetDataRow(url);
|
|
if (dt != null)
|
|
{
|
|
if (dt.Rows.Count > 0)
|
|
{
|
|
txt_Pulse.Text = dt.Rows[0]["Pulse"].ToString();
|
|
txt_SystolicPressure.Text = dt.Rows[0]["SystolicPressure"].ToString();
|
|
txt_DiastolicPressure.Text = dt.Rows[0]["DiastolicPressure"].ToString();
|
|
txt_Temperature.Text = dt.Rows[0]["Temperature"].ToString();
|
|
txt_Breathing.Text = dt.Rows[0]["Breathing"].ToString();
|
|
cmb_SkinColor.Text = dt.Rows[0]["SkinColor"].ToString();
|
|
txt_SkinOther.Text = dt.Rows[0]["SkinOther"].ToString();
|
|
txt_PupilL.Text = dt.Rows[0]["PupilL"].ToString();
|
|
txt_PupilR.Text = dt.Rows[0]["PupilR"].ToString();
|
|
cmb_ReflexL.Text = dt.Rows[0]["ReflexL"].ToString();
|
|
cmb_ReflexR.Text = dt.Rows[0]["ReflexR"].ToString();
|
|
text_HeartRate.Text = dt.Rows[0]["HeartRate"].ToString();
|
|
cmb_Waist.Text = dt.Rows[0]["Waist"].ToString();
|
|
txt_PainOther.Text = dt.Rows[0]["PainOther"].ToString();
|
|
check_IsBackPain.Checked = bool.Parse(dt.Rows[0]["IsBackPain"].ToString());
|
|
check_IsWaistPian.Checked = bool.Parse(dt.Rows[0]["IsWaistPian"].ToString());
|
|
cmb_Spleen.Text = dt.Rows[0]["Spleen"].ToString();
|
|
cmb_BowelSound.Text = dt.Rows[0]["BowelSound"].ToString();
|
|
cmb_MRC.Text = dt.Rows[0]["MRC"].ToString();
|
|
cmb_MRSLT.Text = dt.Rows[0]["MRSLT"].ToString();
|
|
cmb_MRSLD.Text = dt.Rows[0]["MRSLD"].ToString();
|
|
check_IsEdema.Checked = bool.Parse(dt.Rows[0]["IsEdema"].ToString());
|
|
cmb_MRSRT.Text = dt.Rows[0]["MRSRT"].ToString();
|
|
cmb_MRSRD.Text = dt.Rows[0]["MRSRD"].ToString();
|
|
txt_MRSOther.Text = dt.Rows[0]["MRSOther"].ToString();
|
|
cmb_Liver.Text = dt.Rows[0]["Liver"].ToString();
|
|
cmb_Spine.Text = dt.Rows[0]["Spine"].ToString();
|
|
check_BreathStop.Checked = bool.Parse(dt.Rows[0]["IsBreathStop"].ToString());
|
|
check_IsBreathSoundsL.Checked = bool.Parse(dt.Rows[0]["IsBreathSoundsL"].ToString());
|
|
check_IsMoistRalesL.Checked = bool.Parse(dt.Rows[0]["IsMoistRalesL"].ToString());
|
|
check_IsDryRalesL.Checked = bool.Parse(dt.Rows[0]["IsDryRalesL"].ToString());
|
|
cmb_BreathSoundsL.Text = dt.Rows[0]["BreathSoundsL"].ToString();
|
|
check_IsBreathSoundsR.Checked = bool.Parse(dt.Rows[0]["IsBreathSoundsR"].ToString());
|
|
check_IsMoistRalesR.Checked = bool.Parse(dt.Rows[0]["IsMoistRalesR"].ToString());
|
|
check_IsDryRalesR.Checked = bool.Parse(dt.Rows[0]["IsDryRalesR"].ToString());
|
|
cmb_BreathSoundsR.Text = dt.Rows[0]["BreathSoundsR"].ToString();
|
|
check_NeckRigidity.Checked = bool.Parse(dt.Rows[0]["IsNeckRigidity"].ToString());
|
|
check_JugularFilling.Checked = bool.Parse(dt.Rows[0]["IsJugularFilling"].ToString());
|
|
check_CarotidPulsation.Checked = bool.Parse(dt.Rows[0]["IsCarotidPulsation"].ToString());
|
|
radioGroup_Babinskisign.SelectedIndex = PublicClass.ToInt32(dt.Rows[0]["Babinskisign"], -1);
|
|
radioGroup_NervousPosition.SelectedIndex = PublicClass.ToInt32(dt.Rows[0]["NervousPosition"], -1);
|
|
cmb_PhysiologicalReflex.Text = dt.Rows[0]["PhysiologicalReflex"].ToString();
|
|
txt_HealthCheckUpOther.Text = dt.Rows[0]["HealthCheckUpOther"].ToString();
|
|
radio_HeadAbnormal.SelectedIndex = int.Parse(dt.Rows[0]["HeadAbnormal"].ToString());
|
|
txt_HeadAbnormalInfo.Text = dt.Rows[0]["HeadAbnormalInfo"].ToString();
|
|
radio_ChestAbnormal.SelectedIndex = int.Parse(dt.Rows[0]["ChestAbnormal"].ToString());
|
|
txt_ChestAbnormalInfo.Text = dt.Rows[0]["ChestAbnormalInfo"].ToString();
|
|
radio_AirwayOpen.SelectedIndex = int.Parse(dt.Rows[0]["AirwayOpen"].ToString());
|
|
txt_AirwayAbnormal.Text = dt.Rows[0]["AirwayAbnormal"].ToString();
|
|
healthGuid = dt.Rows[0]["GUID"].ToString();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
private void Form_HealthCheckupInfo_Load(object sender, EventArgs e)
|
|
{
|
|
QueryInfo(_patientGuid);
|
|
}
|
|
|
|
|
|
public void SaveHealthCheckup()
|
|
{
|
|
try
|
|
{
|
|
HealthCheckupDTO dto = new HealthCheckupDTO();
|
|
List<HealthCheckupDTO> list = new List<HealthCheckupDTO>();
|
|
dto.PatientGUID = _patientGuid;
|
|
dto.HealthCheckup = new HealthCheckup();
|
|
dto.HealthCheckup.GUID = healthGuid;
|
|
dto.PatientGUID = dto.PatientGUID;
|
|
dto.HealthCheckup.Pulse = txt_Pulse.Text;
|
|
dto.HealthCheckup.HeartRate = text_HeartRate.Text;
|
|
dto.HealthCheckup.SystolicPressure = txt_SystolicPressure.Text;
|
|
dto.HealthCheckup.DiastolicPressure = txt_DiastolicPressure.Text;
|
|
dto.HealthCheckup.Temperature = txt_Temperature.Text;
|
|
dto.HealthCheckup.Breathing = txt_Breathing.Text;
|
|
dto.HealthCheckup.Conscious = cmb_Sonscious.Text.ToString();
|
|
dto.HealthCheckup.SkinColor = cmb_SkinColor.Text.ToString();
|
|
dto.HealthCheckup.SkinOther = txt_SkinOther.Text.ToString();
|
|
dto.HealthCheckup.PupilL = txt_PupilL.Text.ToString();
|
|
dto.HealthCheckup.PupilR = txt_PupilR.Text.ToString();
|
|
dto.HealthCheckup.Reflex = cmb_ReflexL.Text.ToString();
|
|
dto.HealthCheckup.HeadAbnormalInfo = txt_HeadAbnormalInfo.Text.ToString();
|
|
dto.HealthCheckup.IsNeckRigidity = check_NeckRigidity.Checked ? true : false;
|
|
dto.HealthCheckup.IsJugularFilling = check_JugularFilling.Checked ? true : false;
|
|
dto.HealthCheckup.IsCarotidPulsation = check_CarotidPulsation.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathStop = check_BreathStop.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathSoundsL = check_IsBreathSoundsL.Checked ? true : false;
|
|
dto.HealthCheckup.BreathSoundsL = cmb_BreathSoundsL.Text.ToString();
|
|
dto.HealthCheckup.IsMoistRalesL = check_IsMoistRalesL.Checked ? true : false;
|
|
dto.HealthCheckup.IsDryRalesL = check_IsDryRalesL.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathSoundsR = check_IsBreathSoundsR.Checked ? true : false;
|
|
dto.HealthCheckup.BreathSoundsR = cmb_BreathSoundsR.Text.ToString();
|
|
dto.HealthCheckup.IsMoistRalesR = check_IsMoistRalesR.Checked ? true : false;
|
|
dto.HealthCheckup.IsDryRalesR = check_IsDryRalesR.Checked ? true : false;
|
|
dto.HealthCheckup.Rhythm = text_HeartRate.Text.ToString();
|
|
dto.HealthCheckup.Waist = cmb_Waist.Text.ToString();
|
|
dto.HealthCheckup.Liver = cmb_Liver.Text.ToString();
|
|
dto.HealthCheckup.IsBackPain = check_IsBackPain.Checked ? true : false;
|
|
dto.HealthCheckup.IsWaistPian = check_IsWaistPian.Checked ? true : false;
|
|
dto.HealthCheckup.PainOther = txt_PainOther.Text.ToString();
|
|
dto.HealthCheckup.Spleen = cmb_Spleen.Text.ToString();
|
|
dto.HealthCheckup.BowelSound = cmb_BowelSound.Text.ToString();
|
|
dto.HealthCheckup.Spine = cmb_Spine.Text.ToString();
|
|
dto.HealthCheckup.MRC = cmb_MRC.Text.ToString();
|
|
dto.HealthCheckup.MRSRT = cmb_MRSRT.Text.ToString();
|
|
dto.HealthCheckup.MRSRD = cmb_MRSRD.Text.ToString();
|
|
dto.HealthCheckup.IsEdema = check_IsEdema.Checked ? true : false;
|
|
dto.HealthCheckup.MRSOther = txt_MRSOther.Text.ToString();
|
|
dto.HealthCheckup.PhysiologicalReflex = cmb_PhysiologicalReflex.Text.ToString();
|
|
dto.HealthCheckup.Babinskisign = radioGroup_Babinskisign.SelectedIndex;
|
|
dto.HealthCheckup.NervousPosition = radioGroup_NervousPosition.SelectedIndex;
|
|
dto.HealthCheckup.HealthCheckUpOther = txt_HealthCheckUpOther.Text.ToString();
|
|
dto.HealthCheckup.HeadAbnormal = radio_HeadAbnormal.SelectedIndex;
|
|
dto.HealthCheckup.HeadAbnormalInfo = txt_HeadAbnormalInfo.Text;
|
|
dto.HealthCheckup.ChestAbnormal = radio_ChestAbnormal.SelectedIndex;
|
|
dto.HealthCheckup.ChestAbnormalInfo = txt_ChestAbnormalInfo.Text;
|
|
dto.HealthCheckup.AirwayOpen = radio_AirwayOpen.SelectedIndex;
|
|
dto.HealthCheckup.AirwayAbnormal = txt_AirwayAbnormal.Text;
|
|
dto.HealthCheckup.BreathingState = ck_BreathingState.SelectedIndex;
|
|
|
|
list.Add(dto);
|
|
string Url = string.Empty;
|
|
|
|
Url = "api/service/T_Service_FirstAid_HealthCheckup/UpdateOrInsert";
|
|
|
|
|
|
//初始化两个工厂
|
|
ClientFactory<HealthCheckupDTO> httpClient = new HttpClientFactory<HealthCheckupDTO>();
|
|
Client<HealthCheckupDTO> client = httpClient.VisitFactory();
|
|
|
|
if (client.Post(Url, list).Success)
|
|
{
|
|
MessageBox.Show("保存成功");
|
|
Form_EMRInfo info;
|
|
info = (Form_EMRInfo)this.Owner;
|
|
info.ParentInfo(_patientGuid);
|
|
this.Close();
|
|
}
|
|
}
|
|
catch (Exception)
|
|
{
|
|
|
|
throw;
|
|
}
|
|
}
|
|
private void simpleButton2_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
HealthCheckupDTO dto = new HealthCheckupDTO();
|
|
List<HealthCheckupDTO> list = new List<HealthCheckupDTO>();
|
|
dto.PatientGUID = _patientGuid;
|
|
dto.HealthCheckup = new HealthCheckup();
|
|
dto.HealthCheckup.GUID = healthGuid;
|
|
dto.PatientGUID = dto.PatientGUID;
|
|
dto.HealthCheckup.Pulse = txt_Pulse.Text;
|
|
dto.HealthCheckup.HeartRate = text_HeartRate.Text;
|
|
dto.HealthCheckup.SystolicPressure = txt_SystolicPressure.Text;
|
|
dto.HealthCheckup.DiastolicPressure = txt_DiastolicPressure.Text;
|
|
dto.HealthCheckup.Temperature = txt_Temperature.Text;
|
|
dto.HealthCheckup.Breathing = txt_Breathing.Text;
|
|
dto.HealthCheckup.Conscious = cmb_Sonscious.Text.ToString();
|
|
dto.HealthCheckup.SkinColor = cmb_SkinColor.Text.ToString();
|
|
dto.HealthCheckup.SkinOther = txt_SkinOther.Text.ToString();
|
|
dto.HealthCheckup.PupilL = txt_PupilL.Text.ToString();
|
|
dto.HealthCheckup.PupilR = txt_PupilR.Text.ToString();
|
|
dto.HealthCheckup.Reflex = cmb_ReflexL.Text.ToString();
|
|
dto.HealthCheckup.HeadAbnormalInfo = txt_HeadAbnormalInfo.Text.ToString();
|
|
dto.HealthCheckup.IsNeckRigidity = check_NeckRigidity.Checked ? true : false;
|
|
dto.HealthCheckup.IsJugularFilling = check_JugularFilling.Checked ? true : false;
|
|
dto.HealthCheckup.IsCarotidPulsation = check_CarotidPulsation.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathStop = check_BreathStop.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathSoundsL = check_IsBreathSoundsL.Checked ? true : false;
|
|
dto.HealthCheckup.BreathSoundsL = cmb_BreathSoundsL.Text.ToString();
|
|
dto.HealthCheckup.IsMoistRalesL = check_IsMoistRalesL.Checked ? true : false;
|
|
dto.HealthCheckup.IsDryRalesL = check_IsDryRalesL.Checked ? true : false;
|
|
dto.HealthCheckup.IsBreathSoundsR = check_IsBreathSoundsR.Checked ? true : false;
|
|
dto.HealthCheckup.BreathSoundsR = cmb_BreathSoundsR.Text.ToString();
|
|
dto.HealthCheckup.IsMoistRalesR = check_IsMoistRalesR.Checked ? true : false;
|
|
dto.HealthCheckup.IsDryRalesR = check_IsDryRalesR.Checked ? true : false;
|
|
dto.HealthCheckup.Rhythm = text_HeartRate.Text.ToString();
|
|
dto.HealthCheckup.Waist = cmb_Waist.Text.ToString();
|
|
dto.HealthCheckup.Liver = cmb_Liver.Text.ToString();
|
|
dto.HealthCheckup.IsBackPain = check_IsBackPain.Checked ? true : false;
|
|
dto.HealthCheckup.IsWaistPian = check_IsWaistPian.Checked ? true : false;
|
|
dto.HealthCheckup.PainOther = txt_PainOther.Text.ToString();
|
|
dto.HealthCheckup.Spleen = cmb_Spleen.Text.ToString();
|
|
dto.HealthCheckup.BowelSound = cmb_BowelSound.Text.ToString();
|
|
dto.HealthCheckup.Spine = cmb_Spine.Text.ToString();
|
|
dto.HealthCheckup.MRC = cmb_MRC.Text.ToString();
|
|
dto.HealthCheckup.MRSRT = cmb_MRSRT.Text.ToString();
|
|
dto.HealthCheckup.MRSRD = cmb_MRSRD.Text.ToString();
|
|
dto.HealthCheckup.IsEdema = check_IsEdema.Checked ? true : false;
|
|
dto.HealthCheckup.MRSOther = txt_MRSOther.Text.ToString();
|
|
dto.HealthCheckup.PhysiologicalReflex = cmb_PhysiologicalReflex.Text.ToString();
|
|
dto.HealthCheckup.Babinskisign = radioGroup_Babinskisign.SelectedIndex;
|
|
dto.HealthCheckup.NervousPosition = radioGroup_NervousPosition.SelectedIndex;
|
|
dto.HealthCheckup.HealthCheckUpOther = txt_HealthCheckUpOther.Text.ToString();
|
|
dto.HealthCheckup.HeadAbnormal = radio_HeadAbnormal.SelectedIndex;
|
|
dto.HealthCheckup.HeadAbnormalInfo = txt_HeadAbnormalInfo.Text;
|
|
dto.HealthCheckup.ChestAbnormal = radio_ChestAbnormal.SelectedIndex;
|
|
dto.HealthCheckup.ChestAbnormalInfo = txt_ChestAbnormalInfo.Text;
|
|
dto.HealthCheckup.AirwayOpen = radio_AirwayOpen.SelectedIndex;
|
|
dto.HealthCheckup.AirwayAbnormal = txt_AirwayAbnormal.Text;
|
|
dto.HealthCheckup.BreathingState = ck_BreathingState.SelectedIndex;
|
|
|
|
list.Add(dto);
|
|
string Url = string.Empty;
|
|
|
|
Url = "api/service/T_Service_FirstAid_HealthCheckup/UpdateOrInsert";
|
|
|
|
|
|
//初始化两个工厂
|
|
ClientFactory<HealthCheckupDTO> httpClient = new HttpClientFactory<HealthCheckupDTO>();
|
|
Client<HealthCheckupDTO> client = httpClient.VisitFactory();
|
|
|
|
if (client.Post(Url, list).Success)
|
|
{
|
|
MessageBox.Show("保存成功");
|
|
Form_EMRInfo info;
|
|
info = (Form_EMRInfo)this.Owner;
|
|
info.ParentInfo(_patientGuid);
|
|
this.Close();
|
|
}
|
|
}
|
|
catch (Exception)
|
|
{
|
|
|
|
throw;
|
|
}
|
|
}
|
|
}
|
|
}
|