护士转入可能状态不对修改

This commit is contained in:
leomon 2023-07-27 12:04:44 +08:00
parent a695c33b24
commit 87c4482341
3 changed files with 21 additions and 13 deletions

View File

@ -1137,8 +1137,10 @@ namespace AIMS.OperationAanesthesia
_record.OperationApplyId = ApplyId; _record.OperationApplyId = ApplyId;
_record.PatientId = PatientId; _record.PatientId = PatientId;
_record.RecoverId = RecoverId; _record.RecoverId = RecoverId;
HelperDB.DbHelperSQL.BeginTrans();
_record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value);
SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态 SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态
HelperDB.DbHelperSQL.CommitTrans();
ClearTimeText(); ClearTimeText();
btnSelectPatient.Enabled = false; btnSelectPatient.Enabled = false;
btnCancelOperation.Enabled = true; btnCancelOperation.Enabled = true;
@ -1151,6 +1153,7 @@ namespace AIMS.OperationAanesthesia
catch catch
{ {
HelperDB.DbHelperSQL.RollbackTrans(); HelperDB.DbHelperSQL.RollbackTrans();
this.Close();
} }
} }
else if (PatientId > 0 && State == AIMSExtension.EditState.EDIT) else if (PatientId > 0 && State == AIMSExtension.EditState.EDIT)

View File

@ -442,20 +442,21 @@ namespace AIMS.OperationAanesthesia
LoadAnesRescue(); LoadAnesRescue();
} }
private System.Windows.Forms.Timer timerLoadAnesRescue; //private System.Windows.Forms.Timer timerLoadAnesRescue;
public void LoadAnesRescue() public void LoadAnesRescue()
{ {
timerLoadAnesRescue = new System.Windows.Forms.Timer(components); //timerLoadAnesRescue = new System.Windows.Forms.Timer(components);
timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE //timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE
timerLoadAnesRescue.Interval = 300; //timerLoadAnesRescue.Interval = 300;
timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick; //timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick;
timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick; //timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick;
timerLoadAnesRescue.Start(); //timerLoadAnesRescue.Start();
TimerLoadAnesRescue_Tick(null, null);
} }
private void TimerLoadAnesRescue_Tick(object sender, EventArgs e) private void TimerLoadAnesRescue_Tick(object sender, EventArgs e)
{ {
timerLoadAnesRescue.Dispose(); //timerLoadAnesRescue.Dispose();
if (PatientId > 0 && State == AIMSExtension.EditState.ADD) if (PatientId > 0 && State == AIMSExtension.EditState.ADD)
{ {
try try
@ -466,6 +467,7 @@ namespace AIMS.OperationAanesthesia
_record.PatientId = PatientId; _record.PatientId = PatientId;
_record.RecoverId = RecoverId; _record.RecoverId = RecoverId;
_record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value);
SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态
HelperDB.DbHelperSQL.CommitTrans(); HelperDB.DbHelperSQL.CommitTrans();
ClearTimeText(); ClearTimeText();
btnSelectPatient.Enabled = false; btnSelectPatient.Enabled = false;
@ -938,7 +940,7 @@ namespace AIMS.OperationAanesthesia
var value = dr[i].ItemArray[1].ToString(); var value = dr[i].ItemArray[1].ToString();
XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault(); XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault();
PropertyInfo info = p.Where(px => px.Name == name).FirstOrDefault(); PropertyInfo info = p.Where(px => px.Name == name).FirstOrDefault();
if (value == "KB20180604142714558" && element.Text!="") continue; if (value == "KB20180604142714558" && element.Text != "") continue;
if (element != null && info != null) if (element != null && info != null)
{ {
element.Text = info.GetValue(Patient, null).ToString(); element.Text = info.GetValue(Patient, null).ToString();
@ -1928,7 +1930,7 @@ namespace AIMS.OperationAanesthesia
if (_record != null) if (_record != null)
{ {
EMRExtension.OpenFeesRecord(_record, "护士"); EMRExtension.OpenFeesRecord(_record, "护士");
} }
} }
private void button10_Click(object sender, EventArgs e) private void button10_Click(object sender, EventArgs e)

View File

@ -281,6 +281,7 @@ namespace AIMS.OperationAanesthesia
if (operA.State == 11) if (operA.State == 11)
{ {
MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示"); MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示");
FillDgv();
return; return;
} }
@ -322,7 +323,6 @@ namespace AIMS.OperationAanesthesia
frmAnasRecord.ApplyId = applyId; frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
frmAnasRecord.State = AIMSExtension.EditState.ADD; frmAnasRecord.State = AIMSExtension.EditState.ADD;
SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态
uc.label2.Text = "手术中"; uc.label2.Text = "手术中";
uc.label2.ForeColor = Color.Red; uc.label2.ForeColor = Color.Red;
@ -334,7 +334,8 @@ namespace AIMS.OperationAanesthesia
if (isMainOpen == false) if (isMainOpen == false)
{ {
frmAnasRecord.Show(); frmAnasRecord.Show(this);
frmAnasRecord.Focus();
FillDgv(); FillDgv();
} }
else else
@ -364,7 +365,9 @@ namespace AIMS.OperationAanesthesia
if (isMainOpen == false) if (isMainOpen == false)
{ {
frmAnasRecord.ShowDialog(); frmAnasRecord.Show(this);
frmAnasRecord.Focus();
FillDgv(); FillDgv();
} }
else else