From c97980e0860089c792ab2b4758fee6d12f98950c Mon Sep 17 00:00:00 2001 From: leomon Date: Tue, 29 Nov 2022 22:07:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=BF=83=20?= =?UTF-8?q?=E5=8A=A0=E8=8D=AF=E6=8A=A5=E9=94=99=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIMS/DocManager/frmDocument3.cs | 25 +++++++-- .../AnasRecordBill/frmFactDrugNew.cs | 15 +++-- .../frmOperationSchedulePlan.cs | 6 +- AIMSEntity/BLL/Extension/BOperationRecord.cs | 53 ++++++++++-------- AIMSEntity/DAL/Extension/DApplyPersonDuty.cs | 2 +- AIMSEntity/Extensions/SelectPatient.cs | 28 ++++----- BeginScreen/PublicMethod.cs | 2 +- BeginScreen/Wait.aspx | 36 +++++++++++- BeginScreen/WaitingHandler.ashx.cs | 19 ++++++- BeginScreen/static/Record.wav | Bin 0 -> 154980 bytes DrawGraph/AreaManage/DrugsManage.cs | 2 +- DrawGraph/AreaManage/FactDrug.cs | 2 +- 12 files changed, 132 insertions(+), 58 deletions(-) create mode 100644 BeginScreen/static/Record.wav diff --git a/AIMS/DocManager/frmDocument3.cs b/AIMS/DocManager/frmDocument3.cs index 7e9ee6d..4d126af 100644 --- a/AIMS/DocManager/frmDocument3.cs +++ b/AIMS/DocManager/frmDocument3.cs @@ -21,6 +21,7 @@ namespace AIMS.OperationAfter.UI private ucClassify ucClassify; //患者基本信息 private PatientRecord Patient; + public List OperationRooms = BOperationRoom.Select(" Site='手术室' and IsValid=1 ", null); const int CLOSE_SIZE = 18; //关闭图标尺寸 public string PerortName; @@ -36,7 +37,7 @@ namespace AIMS.OperationAfter.UI public frmDocument3() { InitializeComponent(); - + //基本信息初始化 Patient = new PatientRecord(); } @@ -93,10 +94,16 @@ namespace AIMS.OperationAfter.UI vPlanedOpeList = AIMSExtension.PublicMethod.GetNewDataTable(vPlanedOpeList, "State not IN ('退回') ", ""); List list = new List(); - foreach (DataRow po in vPlanedOpeList.Rows) + foreach (var item in OperationRooms) { - if (po["OperationRoom"].ToString() != "" && !list.Contains(po["OperationRoom"].ToString())) - list.Add(po["OperationRoom"].ToString()); + foreach (DataRow po in vPlanedOpeList.Rows) + { + if (po["OperationRoom"].ToString() != "" && po["OperationRoom"].ToString() == item.Name) + { + list.Add(item.Name); + break; + } + } } foreach (var item in list) { @@ -113,7 +120,7 @@ namespace AIMS.OperationAfter.UI } } - } + } TreeNode roomnodenull = new TreeNode("未排程"); foreach (DataRow vpo in vPlanedOpeList.Rows) { @@ -264,6 +271,7 @@ namespace AIMS.OperationAfter.UI //判断是否选择患者 if (this.Patient.PatientId == 0) { + MessageBox.Show("请先选择患者!", "系统提示"); return; } TreeNode node = e.Node; @@ -352,6 +360,7 @@ namespace AIMS.OperationAfter.UI //判断是否选择患者 if (this.Patient.PatientId == 0) { + MessageBox.Show("请先选择患者!"); return; } @@ -417,6 +426,12 @@ namespace AIMS.OperationAfter.UI private void buttonX1_Click(object sender, EventArgs e) { + //判断是否选择患者 + if (this.Patient.PatientId == 0) + { + MessageBox.Show("请先选择患者!", "系统提示"); + return; + } if (PublicMethod.GetHospitalName().Contains("秦皇岛")) { if (Patient.HISPatientId != null && Patient.VisitTimes != null) diff --git a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs index 0c65d0e..bf27036 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs @@ -455,7 +455,7 @@ namespace AIMS.PublicUI.UI _dataGridView.Rows[index].Cells[2].Value = BDrugs.SelectSingle(item.DrugId).DrugKind;//药品编号 _dataGridView.Rows[index].Cells[3].Value = item.DrugName;//药品名称 _dataGridView.Rows[index].Cells[3].Tag = item.DrugId;//药品名称编号 - _dataGridView.Rows[index].Cells[5].Value = item.DrugChannel;//途径 + _dataGridView.Rows[index].Cells[5].Value = item.DrugChannel;//途径 _dataGridView.Rows[index].Cells[4].Value = item.Remark;//备注 if (item.Dosage != 0) _dataGridView.Rows[index].Cells[10].Value = (double)item.Dosage;//剂量 @@ -658,7 +658,7 @@ namespace AIMS.PublicUI.UI //点击开始时间时显示时间 if (_dataGridView.CurrentCell != null) { - _dataGridView.BeginEdit(true); + _dataGridView.BeginEdit(true); //点击Sign列时显示持续事件标记 if (_dataGridView.CurrentCell.ColumnIndex == 15) { @@ -778,7 +778,7 @@ namespace AIMS.PublicUI.UI { if (_dataGridView.CurrentRow != null) { - string objectName = _dataGridView.CurrentRow.Cells[3].EditedFormattedValue.ToString(); + string objectName = _dataGridView.CurrentRow.Cells[3].EditedFormattedValue.ToString(); if (_dataGridView.CurrentRow.Tag != null) { int id = Convert.ToInt32(_dataGridView.CurrentRow.Tag); @@ -810,7 +810,7 @@ namespace AIMS.PublicUI.UI _dataGridView.Rows.Remove(_dataGridView.CurrentRow); _lineNumber = 0; } - } + } } } catch (Exception ex) @@ -917,12 +917,14 @@ namespace AIMS.PublicUI.UI int second = 0; foreach (DataGridViewRow dr in _dataGridView.Rows) { - if (dr.Cells[3].Value == null)//药品名称 + if (dr.Cells[3].Value == null || dr.Cells[3].Value.ToString() == "")//药品名称 continue; //实例化FactDrug对象 FactDrug drugsR = new FactDrug(); drugsR.PatientId = _record.PatientId.Value; drugsR.DrugId = Convert.ToInt32(dr.Cells[3].Tag);//药品名称 + if (drugsR.DrugId == 0)//药品名称 + continue; if (dr.Cells[1].Value.ToString() == " ..." && dr.Cells[1].Tag != null) { drugsR.ParentId = Convert.ToInt32(_dataGridView.Rows[int.Parse(dr.Cells[1].Tag.ToString())].Tag); @@ -934,6 +936,7 @@ namespace AIMS.PublicUI.UI { drugsR.ParentId = 0; } + drugsR.DrugKind = dr.Cells[2].EditedFormattedValue.ToString();//药品名称 drugsR.DrugName = dr.Cells[3].EditedFormattedValue.ToString();//药品名称 drugsR.DrugChannel = dr.Cells[5].EditedFormattedValue.ToString();//途径 @@ -1044,7 +1047,7 @@ namespace AIMS.PublicUI.UI if (oldDrug.DensityUnit != newDrug.DensityUnit) b = false; if (oldDrug.BloodType != newDrug.BloodType) b = false; if (oldDrug.DrugChannel != newDrug.DrugChannel) b = false; - if (oldDrug.Access != newDrug.Access ) b = false; + if (oldDrug.Access != newDrug.Access) b = false; if (oldDrug.DrugBeginTime != null && newDrug.DrugBeginTime != null && oldDrug.DrugBeginTime.ToString("yyyy-MM-dd HH:mm") != newDrug.DrugBeginTime.ToString("yyyy-MM-dd HH:mm")) b = false; if (oldDrug.IsContinue != newDrug.IsContinue) b = false; if (oldDrug.DrugEndTime != newDrug.DrugEndTime && oldDrug.DrugEndTime.ToString("HH:mm") != newDrug.DrugEndTime.ToString("HH:mm")) b = false; diff --git a/AIMS/OperationFront/frmOperationSchedulePlan.cs b/AIMS/OperationFront/frmOperationSchedulePlan.cs index 2ac53d7..06cb51a 100644 --- a/AIMS/OperationFront/frmOperationSchedulePlan.cs +++ b/AIMS/OperationFront/frmOperationSchedulePlan.cs @@ -4849,7 +4849,11 @@ namespace AIMS.OperationFront.UI private void btnDataCente_Click(object sender, EventArgs e) { - if (selApply == null || selApply == "") return; + if (selApply == null || selApply == "") + { + MessageBox.Show("ѡߣ","ϵͳʾ"); + return; + } OperationApply opeapply = BOperationApply.SelectSingle(int.Parse(selApply), RecursiveType.None, 0); OrisPatient pat = BOrisPatient.SelectSingle(opeapply.OrisPatientId, RecursiveType.None, 0); if (PublicMethod.GetHospitalName().Contains("ػʵ")) diff --git a/AIMSEntity/BLL/Extension/BOperationRecord.cs b/AIMSEntity/BLL/Extension/BOperationRecord.cs index 0ac6021..ed43a59 100644 --- a/AIMSEntity/BLL/Extension/BOperationRecord.cs +++ b/AIMSEntity/BLL/Extension/BOperationRecord.cs @@ -29,30 +29,6 @@ namespace AIMSBLL } BOperationRecord.SelectSingle(PatientId, RecoverId, ref _record); - _record.OpeRecordInfo = BOperationRecordInfo.SelectSingle("OperationRecordId=" + _record.Id, null); - if (_record.OpeRecordInfo == null || _record.OpeRecordInfo.Id == null) - { - _record.OpeRecordInfo = new OperationRecordInfo(); - _record.OpeRecordInfo.OperationRecordId = _record.Id; - _record.OpeRecordInfo.PatientId = PatientId; - _record.OpeRecordInfo.ApplyId = _record.OperationApplyId; - _record.OpeRecordInfo.OperatorId = PublicMethod.OperatorName; - _record.OpeRecordInfo.OperatorTime = DateTime.Now; - _record.OpeRecordInfo.Id = BOperationRecordInfo.Insert(_record.OpeRecordInfo); - } - - _record.OpeRecoverInInfo = BOperationRecoverInInfo.SelectSingle("PatientId=" + _record.PatientId, null); - if (_record.OpeRecoverInInfo == null) _record.OpeRecoverInInfo = new OperationRecoverInInfo(); - - _record.OpeRecoverOutInfo = BOperationRecoverOutInfo.SelectSingle("PatientId=" + _record.PatientId, null); - if (_record.OpeRecoverOutInfo == null) _record.OpeRecoverOutInfo = new OperationRecoverOutInfo(); - - _record.FactBloodGasAnalysisList = BFactBloodGasAnalysis.Select("OperationRecordId=" + _record.Id, null); - foreach (var item in _record.FactBloodGasAnalysisList) - { - item.FactBloodGasAnalysisDataList = BFactBloodGasAnalysisData.Select("RecordId=" + item.Id, null); - } - _record.InstrumentList = BOperationRecordInstrumentList.SelectSingle(" OperationRecordId=" + Convert.ToInt32(_record.Id), null); if (_record.InstrumentList != null) { @@ -122,6 +98,34 @@ namespace AIMSBLL _record.OperationRoom = OperationDoingdt.Rows[0]["OperationRoom"].ToString().Trim(); } + _record.OpeRecordInfo = BOperationRecordInfo.SelectSingle("OperationRecordId=" + _record.Id, null); + if (_record.OpeRecordInfo == null || _record.OpeRecordInfo.Id == null) + { + _record.OpeRecordInfo = new OperationRecordInfo(); + _record.OpeRecordInfo.OperationRecordId = _record.Id; + _record.OpeRecordInfo.PatientId = PatientId; + _record.OpeRecordInfo.ApplyId = _record.OperationApplyId; + if (OperationFrontdt.Rows.Count > 0) + { + _record.OpeRecordInfo.OperationLevel = OperationFrontdt.Rows[0]["OperationLevelName"].ToString(); + } + _record.OpeRecordInfo.OperatorId = PublicMethod.OperatorName; + _record.OpeRecordInfo.OperatorTime = DateTime.Now; + _record.OpeRecordInfo.Id = BOperationRecordInfo.Insert(_record.OpeRecordInfo); + } + + _record.OpeRecoverInInfo = BOperationRecoverInInfo.SelectSingle("PatientId=" + _record.PatientId, null); + if (_record.OpeRecoverInInfo == null) _record.OpeRecoverInInfo = new OperationRecoverInInfo(); + + _record.OpeRecoverOutInfo = BOperationRecoverOutInfo.SelectSingle("PatientId=" + _record.PatientId, null); + if (_record.OpeRecoverOutInfo == null) _record.OpeRecoverOutInfo = new OperationRecoverOutInfo(); + + _record.FactBloodGasAnalysisList = BFactBloodGasAnalysis.Select("OperationRecordId=" + _record.Id, null); + foreach (var item in _record.FactBloodGasAnalysisList) + { + item.FactBloodGasAnalysisDataList = BFactBloodGasAnalysisData.Select("RecordId=" + item.Id, null); + } + FillEventsDataAll(PatientId, RecoverId, _record); FillDrugDataAll(PatientId, RecoverId, _record); @@ -226,6 +230,7 @@ namespace AIMSBLL DataTable DrugAllData = BOperationRecord.FillDrugData(PatientId, TypeId); for (int i = 0; i < DrugAllData.Rows.Count; i++) { + if (DrugAllData.Rows[i]["DrugsId"].ToString() == "" || DrugAllData.Rows[i]["DrugsId"].ToString() == "0") return; FactDrug FactDrug = new FactDrug(); FactDrug.Id = int.Parse(DrugAllData.Rows[i]["Id"].ToString()); ; FactDrug.DrugTypeId = TypeId; diff --git a/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs b/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs index f7b2c0d..046a35b 100644 --- a/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs +++ b/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs @@ -57,7 +57,7 @@ namespace AIMSDAL public static DataTable GetPersonDataTable(int OperationApplyId) { List PersonIdList = new List(); - string strSql = "SELECT PersonDutyId,PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + " and PersonDutyId in(1,2) "; + string strSql = "SELECT PersonDutyId,PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + " "; return HelperDB.DbHelperSQL.GetDataTable(strSql); } } diff --git a/AIMSEntity/Extensions/SelectPatient.cs b/AIMSEntity/Extensions/SelectPatient.cs index 0289c73..913f48f 100644 --- a/AIMSEntity/Extensions/SelectPatient.cs +++ b/AIMSEntity/Extensions/SelectPatient.cs @@ -15,7 +15,7 @@ namespace AIMSBLL { string strSql = "SELECT of1.ApplyId Id, of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + "of1.ApplyOperationInfoName, of1.OperationDoctor, " + - "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion,of1.OrderOperationTime " + + "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,Age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion,of1.OrderOperationTime " + "FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + BeginDate.AddDays(1) + "'"; if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; strSql += " order by OperationRoomId,PlanOrder"; @@ -26,39 +26,39 @@ namespace AIMSBLL { string strSql = "SELECT of1.ApplyId Id, of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + "of1.ApplyOperationInfoName, of1.OperationDoctor, " + - "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion,of1.OrderOperationTime " + - "FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and ( of1.MdrecNo like '%" + PatientName + "%' or of1.PatientName like '%" + PatientName + "%')"; + "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,Age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion,of1.OrderOperationTime " + + "FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and ( of1.MdrecNo like '%" + PatientName + "%' or of1.PatientName like '%" + PatientName + "%')"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate, string Room) { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束','停止手术') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1"; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束','停止手术') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1"; if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; strSql += " order by [StateId],of2.InRoomTime "; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } - public static DataTable GetRelieveLockingPatientDataTable( string PatientName) + public static DataTable GetRelieveLockingPatientDataTable(string PatientName) { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束','停止手术') and RecoverId=1 and ( of1.MdrecNo like '%" + PatientName + "%' or of1.PatientName like '%" + PatientName + "%')"; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束','停止手术') and RecoverId=1 and ( of1.MdrecNo like '%" + PatientName + "%' or of1.PatientName like '%" + PatientName + "%')"; strSql += " order by [StateId] asc"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetTodayDoOpePatientDataTable(DateTime BeginDate, string Room = "") { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中' ) and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 "; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime,of2.AnaesthesiaMethodName,of2.InRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中' ) and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 "; if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; strSql += " order by [StateId] asc"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetRecoverPatientDataTable(DateTime BeginDate) { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.OutRoomTime ,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,of2.Whereabouts FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术结束') and of2.Whereabouts='恢复室' and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 and of2.Id not in (select iD from OperationRecord where RecoverId<>1)"; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.OutRoomTime ,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,of2.Whereabouts FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术结束') and of2.Whereabouts='恢复室' and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 and of2.Id not in (select iD from OperationRecord where RecoverId<>1)"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetRecoverPatientOutDataTable(DateTime BeginDate) { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.OutRoomTime ,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '麻醉恢复结束') and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 order by OutRoomTime desc "; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.OutRoomTime ,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '麻醉恢复结束') and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 order by OutRoomTime desc "; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetSelectPatientDataTable(DateTime BeginDate, DateTime EndDate, bool isLoginPerson, string person, bool isEnOpe) @@ -104,7 +104,7 @@ namespace AIMSBLL public static DataTable GetRecoverLockingPatientDataTable(DateTime BeginDate) { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,(select OutRoomTime from OperationRecord where OperationRecord.RecoverId=1 and OperationRecord.PatientId=of2.PatientId) OutRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '麻醉恢复中') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 "; + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,Age,of2.InRoomTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,(select OutRoomTime from OperationRecord where OperationRecord.RecoverId=1 and OperationRecord.PatientId=of2.PatientId) OutRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '麻醉恢复中') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 "; strSql += " order by [StateId] asc"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } @@ -192,12 +192,12 @@ namespace AIMSBLL DataTable dt = BApplyPersonDuty.GetPersonDataTable(ApplyId); for (int i = 0; i < dt.Rows.Count; i++) { - if (int.Parse(dt.Rows[i]["PersonDutyId"].ToString()) == 1) + if (int.Parse(dt.Rows[i]["PersonDutyId"].ToString()) != 2) { FactPersonDuty FactPersonDutyObj = new FactPersonDuty(); FactPersonDutyObj.PatientId = PatientId; FactPersonDutyObj.ApplyId = ApplyId; - FactPersonDutyObj.PersonDutyId = 1; + FactPersonDutyObj.PersonDutyId = int.Parse(dt.Rows[i]["PersonDutyId"].ToString()) ; FactPersonDutyObj.PersonId = int.Parse(dt.Rows[i]["PersonId"].ToString()); FactPersonDutyObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; FactPersonDutyObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; @@ -207,7 +207,7 @@ namespace AIMSBLL } for (int i = 0; i < dt.Rows.Count; i++) { - if (int.Parse(dt.Rows[i]["PersonDutyId"].ToString()) != 1) + if (int.Parse(dt.Rows[i]["PersonDutyId"].ToString()) == 2) { FactPersonDuty FactPersonDutyObj = new FactPersonDuty(); FactPersonDutyObj.PatientId = PatientId; @@ -219,7 +219,7 @@ namespace AIMSBLL FactPersonDutyObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); BFactPersonDuty.Add(FactPersonDutyObj); } - } + } //增加入室事件 Events EventsObj = BEvents.GetModelByName("入室"); diff --git a/BeginScreen/PublicMethod.cs b/BeginScreen/PublicMethod.cs index 9fb7962..c49994c 100644 --- a/BeginScreen/PublicMethod.cs +++ b/BeginScreen/PublicMethod.cs @@ -25,7 +25,7 @@ namespace BeginScreen /// public static DataTable GetPlanNoticeNew(DateTime dtBegin, DateTime dtEnd, string OpeTime, string DeptId) { - string strSql = "select * from (select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'等待手术' [State],SQState,SZState,ApplyOperationInfoName OperationInfo,OperationBeginTime,ApplyOperationDoctor OperationDoctor,applyAnesthesiaDoctor AnesthesiaDoctor,TourNurse,InstrumentNurse from [dbo].[V_OperationRecordALL] where sqstate <6 and ((OrderOperationTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) union select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'手术中'[State],SQState,SZState,OperationInfoName OperationInfo,OperationBeginTime,OperationDoctorx OperationDoctor,AnesthesiaDoctor,TourNurse,InstrumentNurse from [V_OperationRecordALL] where SZstate in(1) and ((InRoomTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and InRoomTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) and OutRoomTime is null union select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'手术结束'[State],SQState,SZState,OperationInfoName OperationInfo,OperationBeginTime,OperationDoctorx OperationDoctor,AnesthesiaDoctor,TourNurse,InstrumentNurse from [V_OperationRecordALL] where datediff(minute,CONVERT(DATETIME,outRoomTime,120),GETDATE())<" + OpeTime + ") as a order by OperationRoomId,planorder "; + string strSql = "select * from (select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'等待手术' [State],SQState,SZState,ApplyOperationInfoName OperationInfo,OperationBeginTime,ApplyOperationDoctor OperationDoctor,applyAnesthesiaDoctor AnesthesiaDoctor,ApplyTourNurse TourNurse,ApplyInstrumentNurse InstrumentNurse from [dbo].[V_OperationRecordALL] where sqstate <6 and ((OrderOperationTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) union select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'手术中'[State],SQState,SZState,OperationInfoName OperationInfo,OperationBeginTime,OperationDoctorx OperationDoctor,AnesthesiaDoctor,TourNurse,InstrumentNurse from [V_OperationRecordALL] where SZstate in(1) and ((InRoomTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and InRoomTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) and OutRoomTime is null union select ApplyId ,OperationRoom,OperationRoomId,planorder,ApplyDepName,SickBed,PatientName,'手术结束'[State],SQState,SZState,OperationInfoName OperationInfo,OperationBeginTime,OperationDoctorx OperationDoctor,AnesthesiaDoctor,TourNurse,InstrumentNurse from [V_OperationRecordALL] where datediff(minute,CONVERT(DATETIME,outRoomTime,120),GETDATE())<" + OpeTime + ") as a order by OperationRoomId,planorder "; return DBHelper.GetDataTable(strSql); } diff --git a/BeginScreen/Wait.aspx b/BeginScreen/Wait.aspx index e625349..ee6617b 100644 --- a/BeginScreen/Wait.aspx +++ b/BeginScreen/Wait.aspx @@ -100,6 +100,8 @@ +<%--