数据中心 加药报错逻辑修改
This commit is contained in:
parent
8701d2b758
commit
c97980e086
@ -21,6 +21,7 @@ namespace AIMS.OperationAfter.UI
|
||||
private ucClassify ucClassify;
|
||||
//患者基本信息
|
||||
private PatientRecord Patient;
|
||||
public List<OperationRoom> OperationRooms = BOperationRoom.Select(" Site='手术室' and IsValid=1 ", null);
|
||||
|
||||
const int CLOSE_SIZE = 18; //关闭图标尺寸
|
||||
public string PerortName;
|
||||
@ -93,10 +94,16 @@ namespace AIMS.OperationAfter.UI
|
||||
vPlanedOpeList = AIMSExtension.PublicMethod.GetNewDataTable(vPlanedOpeList, "State not IN ('退回') ", "");
|
||||
|
||||
List<string> list = new List<string>();
|
||||
foreach (var item in OperationRooms)
|
||||
{
|
||||
foreach (DataRow po in vPlanedOpeList.Rows)
|
||||
{
|
||||
if (po["OperationRoom"].ToString() != "" && !list.Contains(po["OperationRoom"].ToString()))
|
||||
list.Add(po["OperationRoom"].ToString());
|
||||
if (po["OperationRoom"].ToString() != "" && po["OperationRoom"].ToString() == item.Name)
|
||||
{
|
||||
list.Add(item.Name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in list)
|
||||
{
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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("ÇØ»Êµº"))
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -57,7 +57,7 @@ namespace AIMSDAL
|
||||
public static DataTable GetPersonDataTable(int OperationApplyId)
|
||||
{
|
||||
List<int> PersonIdList = new List<int>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 " +
|
||||
"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;
|
||||
|
||||
@ -25,7 +25,7 @@ namespace BeginScreen
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -100,6 +100,8 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<%-- <audio id="myaudio" src="/static/Record.wav" loop="loop" /><%-- muted="muted"--%> --%>
|
||||
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -129,7 +131,13 @@
|
||||
sendType = data.sendType;
|
||||
messId = data.messId;
|
||||
marqueeid.innerHTML = data.msg;
|
||||
|
||||
//if (data.msg != "") {
|
||||
// //var audio = document.getElementById("myaudio");
|
||||
// //var promise = audio.play();
|
||||
// let mp3 = new Audio('/static/Record.wav') // 创建音频对象
|
||||
// mp3.loop = true
|
||||
// mp3.play() // 播放
|
||||
//}
|
||||
countPage = data.countPage;
|
||||
$("#js").html('(第' + WorkerCurrentPage + '屏/共' + data.countPage + '屏)');
|
||||
}
|
||||
@ -137,6 +145,29 @@
|
||||
});
|
||||
WorkerCurrentPage = WorkerCurrentPage + 1
|
||||
}
|
||||
//function testAutoPlay() {
|
||||
// // 返回一个promise以告诉调用者检测结果
|
||||
// return new Promise(resolve => {
|
||||
// let audio = document.createElement('audio');
|
||||
// // require一个本地文件,会变成base64格式
|
||||
// audio.src = require('/static/Record.wav');
|
||||
// document.body.appendChild(audio);
|
||||
// let autoplay = true;
|
||||
// // play返回的是一个promise
|
||||
// audio.play().then(() => {
|
||||
// // 支持自动播放
|
||||
// autoplay = true;
|
||||
// }).catch(err => {
|
||||
// // 不支持自动播放
|
||||
// autoplay = false;
|
||||
// }).finally(() => {
|
||||
// audio.remove();
|
||||
// // 告诉调用者结果
|
||||
// resolve(autoplay);
|
||||
// });
|
||||
// });
|
||||
//}
|
||||
|
||||
Date.prototype.format = function (format) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //month
|
||||
@ -174,6 +205,7 @@
|
||||
|
||||
$(function () {
|
||||
var _timestamp
|
||||
getSoundAccess();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "RoomHandler.ashx?cmd=GetHtmlTime",
|
||||
|
||||
@ -4,7 +4,9 @@ using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Xml.Linq;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
using System.Speech.Synthesis;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeginScreen
|
||||
{
|
||||
@ -232,6 +234,19 @@ namespace BeginScreen
|
||||
{
|
||||
messId = Convert.ToInt32(dr["Id"].ToString().Trim());
|
||||
}
|
||||
//var task = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// using (var speechSyn = new SpeechSynthesizer())
|
||||
// {
|
||||
// //speechSyn.Volume = ;//语速
|
||||
// //speechSyn.Rate = -;//音量
|
||||
|
||||
// speechSyn.SetOutputToDefaultAudioDevice();
|
||||
// speechSyn.SetOutputToWaveFile("E:\\AIMS\\BeginScreen\\static\\Record.wav");//"D:\\Record.wav"
|
||||
// speechSyn.Speak(messageStr );
|
||||
// }
|
||||
//});
|
||||
//Task.WaitAll(task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
BeginScreen/static/Record.wav
Normal file
BIN
BeginScreen/static/Record.wav
Normal file
Binary file not shown.
@ -355,7 +355,7 @@ namespace DrawGraph
|
||||
try
|
||||
{
|
||||
myOpeRecord.ClearDrugsDose(ZedControl);
|
||||
double allDrugDose = 0; double allOutDose = 0;
|
||||
double allDrugDose = 0;
|
||||
myOpeRecord.FactDrugList.ForEach(drug =>
|
||||
{
|
||||
if (drug.DrugChannel == "ivgtt" || drug.DrugChannel == "iv")
|
||||
|
||||
@ -241,7 +241,7 @@ namespace DrawGraph
|
||||
//if (this.Remark != null && this.Remark != "") DrName += "(" + this.Remark + ")";
|
||||
if (this.DrugChannel != null && this.DrugChannel != "") DrName += "(" + this.DrugChannel + ")";
|
||||
if (this.DosageUnit != null && this.DosageUnit != "") DrName += "(" + this.DosageUnit + ")";
|
||||
if (DrugKind == "毒麻药品" || AnesType.Contains("麻醉") || AnesType.Contains("精神"))
|
||||
if (DrugKind.Contains("麻醉") || DrugKind.Contains("精神"))
|
||||
ZUtil.DrawText(DrName, x1, y, zgcAnas, TextPrefix.DN + this.DrugName + this.Id.ToString(), Color.Red, 5.75f);
|
||||
else
|
||||
ZUtil.DrawText(DrName, x1, y, zgcAnas, TextPrefix.DN + this.DrugName + this.Id.ToString(), Color.Black, 5.75f);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user