双击页面时间点加载用药记录

This commit is contained in:
leomon 2023-07-05 11:57:59 +08:00
parent e42d535d71
commit 61a24e9310
11 changed files with 107 additions and 60 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<AtuoUpdate> <AtuoUpdate>
<ConnectionString>Data Source=.;Initial Catalog=AIMSDB_FJZPTFYY;User ID=sa;Password=Test2020;</ConnectionString> <ConnectionString>Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;</ConnectionString>
<DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;</DataConnectionString> <DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;</DataConnectionString>
<HisConnectionStringOracel>Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;</HisConnectionStringOracel> <HisConnectionStringOracel>Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;</HisConnectionStringOracel>
<LastLoginNo></LastLoginNo> <LastLoginNo></LastLoginNo>

View File

@ -1105,11 +1105,12 @@ namespace AIMS.OperationAanesthesia
} }
private void _record_SpeedyDrugsParam(List<FactDrug> factDrugs) private void _record_SpeedyDrugsParam(List<FactDrug> factDrugs, DateTime clickTime)
{ {
frmFactSpeedyDrug frmFact = new frmFactSpeedyDrug(); frmFactSpeedyDrug frmFact = new frmFactSpeedyDrug();
frmFact._record = _record; frmFact._record = _record;
frmFact.factDrugs = factDrugs; frmFact.factDrugs = factDrugs;
frmFact.ClickTime = clickTime;
frmFact.zgcAnaesRecord = zgcAnaesRecord; frmFact.zgcAnaesRecord = zgcAnaesRecord;
frmFact.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单 frmFact.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
frmFact.DrugsParam += frmFactEventsNew_EventsParam; frmFact.DrugsParam += frmFactEventsNew_EventsParam;

View File

@ -1103,29 +1103,29 @@ namespace AIMS.OperationAanesthesia
LoadAnesRescue(); LoadAnesRescue();
} }
private System.Windows.Forms.Timer timerLoadAnesRescue; //private System.Windows.Forms.Timer timerLoadAnesRescue;
public void LoadAnesRescue() public void LoadAnesRescue()
{ {
circularProgress1.IsRunning = true; //circularProgress1.IsRunning = true;
circularProgress1.Visible = true; //circularProgress1.Visible = true;
circularProgress1.AnimationSpeed = 0; //circularProgress1.AnimationSpeed = 0;
circularProgress2.IsRunning = true; //circularProgress2.IsRunning = true;
circularProgress2.Visible = true; //circularProgress2.Visible = true;
zgcAnaesRecord.Visible = false; //zgcAnaesRecord.Visible = false;
zgcAnaesRecord2.Visible = false; //zgcAnaesRecord2.Visible = false;
timerLoadAnesRescue = new System.Windows.Forms.Timer(components); //timerLoadAnesRescue = new System.Windows.Forms.Timer(components);
timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE //timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE
timerLoadAnesRescue.Interval = 200; //timerLoadAnesRescue.Interval = 200;
timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick; //timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick;
timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick; //timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick;
timerLoadAnesRescue.Start(); //timerLoadAnesRescue.Start();
//TimerLoadAnesRescue_Tick(null, null); TimerLoadAnesRescue_Tick(null, null);
} }
private void TimerLoadAnesRescue_Tick(object sender, EventArgs e) private void TimerLoadAnesRescue_Tick(object sender, EventArgs e)
{ {
timerLoadAnesRescue.Dispose(); //timerLoadAnesRescue.Dispose();
try try
{ {
if (PatientId > 0 && State == AIMSExtension.EditState.ADD) if (PatientId > 0 && State == AIMSExtension.EditState.ADD)
@ -1137,7 +1137,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); //修改状态 SelectPatient.UpdateApplyState(PatientId, ApplyId); //修改状态
ClearTimeText(); ClearTimeText();
btnSelectPatient.Enabled = false; btnSelectPatient.Enabled = false;
btnCancelOperation.Enabled = true; btnCancelOperation.Enabled = true;
@ -1225,15 +1225,33 @@ namespace AIMS.OperationAanesthesia
PublicMethod.WriteLog(ex); PublicMethod.WriteLog(ex);
} }
} }
private void _record_SpeedyDrugsParam(List<FactDrug> factDrugs) private void _record_SpeedyDrugsParam(List<FactDrug> factDrugs, DateTime clickTime)
{ {
frmFactSpeedyDrug frmFact = new frmFactSpeedyDrug(); if (PatientId != 0)
frmFact._record = _record; {
frmFact.factDrugs = factDrugs; if (factDrugs != null && factDrugs.Count > 0)
frmFact.zgcAnaesRecord = zgcAnaesRecord; {
frmFact.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单 frmFactSpeedyDrug frmFact = new frmFactSpeedyDrug();
frmFact.DrugsParam += FrmFactDrug_DrugsParam; frmFact._record = _record;
frmFact.ShowDialog(); frmFact.factDrugs = factDrugs;
frmFact.ClickTime = clickTime;
frmFact.zgcAnaesRecord = zgcAnaesRecord;
frmFact.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
frmFact.DrugsParam += FrmFactDrug_DrugsParam;
frmFact.ShowDialog();
}
else
{
PublicUI.UI.frmFactDrugNew frmFactDrug = new PublicUI.UI.frmFactDrugNew();
frmFactDrug._record = _record;
frmFactDrug.zgcAnaesRecord = zgcAnaesRecord;
frmFactDrug.ClickTime = clickTime;
frmFactDrug.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
frmFactDrug.DrugsParam += FrmFactDrug_DrugsParam;
frmFactDrug.ShowDialog();
}
}
} }
private void btnOperationInfo_Click(object sender, EventArgs e) private void btnOperationInfo_Click(object sender, EventArgs e)

View File

@ -20,6 +20,7 @@ namespace AIMS.PublicUI.UI
public int currentTabIndex = 2; public int currentTabIndex = 2;
public bool isCVhageAllSapDose = false; public bool isCVhageAllSapDose = false;
public int DrugTypeId; public int DrugTypeId;
public DateTime? ClickTime;
#region #region
int x = 0; int x = 0;
@ -674,6 +675,9 @@ namespace AIMS.PublicUI.UI
VelocityUnit.DataSource = ControlExtension._VelocityUnit; VelocityUnit.DataSource = ControlExtension._VelocityUnit;
VelocityUnit.DisplayMember = "Name"; VelocityUnit.DisplayMember = "Name";
VelocityUnit.ValueMember = "Id"; VelocityUnit.ValueMember = "Id";
if (ClickTime != null)
_dataGridView.Rows[e.RowIndex].Cells[14].Value = ClickTime.Value.ToString("yyyy-MM-dd HH:mm");
} }
private void dgvDrugs_CellClick(object sender, DataGridViewCellEventArgs e) private void dgvDrugs_CellClick(object sender, DataGridViewCellEventArgs e)

View File

@ -432,12 +432,6 @@
// //
this.dataGridViewTextBoxColumn8.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.Nothing; this.dataGridViewTextBoxColumn8.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.Nothing;
this.dataGridViewTextBoxColumn8.HeaderText = "通路"; this.dataGridViewTextBoxColumn8.HeaderText = "通路";
this.dataGridViewTextBoxColumn8.Items.AddRange(new object[] {
"",
"1",
"2",
"3",
"4"});
this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
this.dataGridViewTextBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.dataGridViewTextBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;

View File

@ -20,6 +20,7 @@ namespace AIMS.PublicUI.UI
public int currentTabIndex = 1; public int currentTabIndex = 1;
public bool isCVhageAllSapDose = false; public bool isCVhageAllSapDose = false;
public int DrugTypeId; public int DrugTypeId;
public DateTime ClickTime;
#region #region
int x = 0; int x = 0;
@ -78,13 +79,21 @@ namespace AIMS.PublicUI.UI
private void frmFactDrugNew2_Load(object sender, EventArgs e) private void frmFactDrugNew2_Load(object sender, EventArgs e)
{ {
SetDGVNotSort(); try
Initial(); {
FullALLDGV(); if (factDrugs == null) factDrugs = new List<FactDrug>();
tabDrugs.SelectedTabIndex = currentTabIndex; SetDGVNotSort();
_dataGridView = dgvDrugsSZ; Initial();
dgvYP.Visible = false; FullALLDGV();
dgvYP.AutoGenerateColumns = false; tabDrugs.SelectedTabIndex = currentTabIndex;
_dataGridView = dgvDrugsSZ;
dgvYP.Visible = false;
dgvYP.AutoGenerateColumns = false;
}
catch (Exception ex)
{
PublicMethod.WriteLog(ex);
}
} }
@ -400,6 +409,8 @@ namespace AIMS.PublicUI.UI
VelocityUnit.DataSource = ControlExtension._VelocityUnit; VelocityUnit.DataSource = ControlExtension._VelocityUnit;
VelocityUnit.DisplayMember = "Name"; VelocityUnit.DisplayMember = "Name";
VelocityUnit.ValueMember = "Id"; VelocityUnit.ValueMember = "Id";
_dataGridView.Rows[e.RowIndex].Cells[14].Value = ClickTime.ToString("yyyy-MM-dd HH:mm");
} }
private void dgvDrugs_CellClick(object sender, DataGridViewCellEventArgs e) private void dgvDrugs_CellClick(object sender, DataGridViewCellEventArgs e)

View File

@ -66,10 +66,10 @@ namespace AIMSBLL
{ {
if (isEnOpe == false) if (isEnOpe == false)
{ {
string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.DeptName, of1.OperationType, of1.MdrecNo, of1.PatientName, " +
"of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," + "of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," +
"of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder " + "of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder " +
"FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' "; "FROM V_OperationRecordInfo of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' ";
if (isLoginPerson == true) if (isLoginPerson == true)
{ {
strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')"; strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')";
@ -78,10 +78,10 @@ namespace AIMSBLL
} }
else else
{ {
string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.DeptName, of1.OperationType, of1.MdrecNo, of1.PatientName, " +
"of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," + "of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," +
"of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder,InRoomTime " + "of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder,InRoomTime " +
"FROM [V_OperationRecordALL] of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' and SZstate =2 "; "FROM [V_OperationRecordInfo] of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' and State ='手术结束' ";
if (isLoginPerson == true) if (isLoginPerson == true)
{ {
strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')"; strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')";
@ -93,7 +93,7 @@ namespace AIMSBLL
public static DataTable GetSelectPatientChart() public static DataTable GetSelectPatientChart()
{ {
string strSql = "select * from (select CONVERT(nvarchar(7), InRoomTime,120) dat, SUM(ROUND((DATEDIFF(minute, InRoomTime, OutRoomTime)) / CONVERT(FLOAT, 60), 1)) AS DiffDate from OperationRecord where State=2 group by CONVERT(nvarchar(7),InRoomTime , 120) ) a order by dat Asc "; string strSql = "select * from (select CONVERT(nvarchar(7), InRoomTime,120) dat, SUM(ROUND((DATEDIFF(minute, InRoomTime, OutRoomTime)) / CONVERT(FLOAT, 60), 1)) AS DiffDate from OperationRecord where State=2 and InRoomTime>'"+ DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01 00:00:00")+ "' group by CONVERT(nvarchar(7),InRoomTime , 120) ) a order by dat Asc ";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
} }
public static DataTable GetSelectPatientChart2(DateTime dateTime) public static DataTable GetSelectPatientChart2(DateTime dateTime)

View File

@ -97,11 +97,12 @@ namespace DrawGraph
{ {
DateTime BeginTime = reDrugsTime(sender as ZedGraphControl, e); DateTime BeginTime = reDrugsTime(sender as ZedGraphControl, e);
double addDragRowHeight = (lines.RealEndY - lines.RealY) / RowsCount; double addDragRowHeight = (lines.RealEndY - lines.RealY) / RowsCount;
bool isDrug = false;
foreach (FactDrug dsr in myOpeRecord.FactDrugList) foreach (FactDrug dsr in myOpeRecord.FactDrugList)
{ {
if (dsr.isEqual(y, BeginTime, addDragRowHeight) || dsr.IsSelected) if (dsr.isEqual(y, BeginTime, addDragRowHeight) || dsr.IsSelected)
{ {
//isDrug = true; isDrug = true;
viewStr = dsr.DrugName + ":" + dsr.Dosage + dsr.DosageUnit; viewStr = dsr.DrugName + ":" + dsr.Dosage + dsr.DosageUnit;
if (dsr.DrugBeginTime != null) if (dsr.DrugBeginTime != null)
viewStr += "\n开始时间" + dsr.DrugBeginTime.ToString("yyyy-MM-dd HH:mm"); viewStr += "\n开始时间" + dsr.DrugBeginTime.ToString("yyyy-MM-dd HH:mm");
@ -129,6 +130,13 @@ namespace DrawGraph
break; break;
} }
} }
if (!isDrug)
{
viewStr = BeginTime.ToString("HH:mm");
aSyncTip.ViewStr = viewStr;
aSyncTip.Show(x, y + yP);
ZedControl.Refresh();
}
} }
//} //}
} }
@ -222,8 +230,10 @@ namespace DrawGraph
} }
} }
if (records.Count > 0) if (records.Count > 0)
myOpeRecord.SpeedyDrugsMethod(records); myOpeRecord.SpeedyDrugsMethod(records, BeginTime);
} }
else
myOpeRecord.SpeedyDrugsMethod(null, BeginTime);
} }
} }
} }
@ -646,7 +656,7 @@ namespace DrawGraph
double[] y2; double[] y2;
//double yTemp = ZedControl.Height * lines.RealEndY + 80; //double yTemp = ZedControl.Height * lines.RealEndY + 80;
PointF mousePt = new PointF(e.X, 1000); PointF mousePt = new PointF(e.X, 1300);
ZedGraphControl sender1 = sender as ZedGraphControl; ZedGraphControl sender1 = sender as ZedGraphControl;
GraphPane pane = sender1.MasterPane.FindChartRect(mousePt); GraphPane pane = sender1.MasterPane.FindChartRect(mousePt);

View File

@ -1254,14 +1254,14 @@ namespace DrawGraph
get { return SelectedAreaObj.GetInstance(); } get { return SelectedAreaObj.GetInstance(); }
} }
public delegate void SpeedyDrugs(List<FactDrug> factDrugs); public delegate void SpeedyDrugs(List<FactDrug> factDrugs, DateTime clickTime);
public event SpeedyDrugs SpeedyDrugsParam; public event SpeedyDrugs SpeedyDrugsParam;
public void SpeedyDrugsMethod(List<FactDrug> factDrugs) public void SpeedyDrugsMethod(List<FactDrug> factDrugs,DateTime clickTime)
{ {
if (SpeedyDrugsParam != null) if (SpeedyDrugsParam != null)
SpeedyDrugsParam(factDrugs); SpeedyDrugsParam(factDrugs,clickTime);
} }
[NoCreatControlAttributs] [NoCreatControlAttributs]
public List<FactEvents> FactEventsList public List<FactEvents> FactEventsList

View File

@ -902,7 +902,6 @@ namespace DrawGraph
double[] y2; double[] y2;
PointF mousePt = new PointF(e.X, e.Y); PointF mousePt = new PointF(e.X, e.Y);
GraphPane pane = ZedControl.MasterPane.FindChartRect(mousePt); GraphPane pane = ZedControl.MasterPane.FindChartRect(mousePt);
if (pane == null) return null; if (pane == null) return null;
pane.ReverseTransform(mousePt, out x, out x2, out y, out y2); pane.ReverseTransform(mousePt, out x, out x2, out y, out y2);

View File

@ -107,11 +107,12 @@ namespace DrawGraph
{ {
DateTime BeginTime = reDrugsTime(sender as ZedGraphControl, e); DateTime BeginTime = reDrugsTime(sender as ZedGraphControl, e);
double addDragRowHeight = (lines.RealEndY - lines.RealY) / RowsCount; double addDragRowHeight = (lines.RealEndY - lines.RealY) / RowsCount;
bool isDrug = false;
foreach (FactDrug dsr in myOpeRecord.FactDrugList) foreach (FactDrug dsr in myOpeRecord.FactDrugList)
{ {
if (dsr.isEqual(y, BeginTime, addDragRowHeight) || dsr.IsSelected) if (dsr.isEqual(y, BeginTime, addDragRowHeight) || dsr.IsSelected)
{ {
//isDrug = true; isDrug = true;
viewStr = dsr.DrugName + ":" + dsr.Dosage + dsr.DosageUnit; viewStr = dsr.DrugName + ":" + dsr.Dosage + dsr.DosageUnit;
if (dsr.DrugBeginTime != null) if (dsr.DrugBeginTime != null)
viewStr += "\n开始时间" + dsr.DrugBeginTime.ToString("yyyy-MM-dd HH:mm"); viewStr += "\n开始时间" + dsr.DrugBeginTime.ToString("yyyy-MM-dd HH:mm");
@ -139,6 +140,13 @@ namespace DrawGraph
break; break;
} }
} }
if (!isDrug)
{
viewStr = BeginTime.ToString("HH:mm");
aSyncTip.ViewStr = viewStr;
aSyncTip.Show(x, y + yP);
ZedControl.Refresh();
}
} }
//} //}
} }
@ -232,8 +240,10 @@ namespace DrawGraph
} }
} }
if (records.Count > 0) if (records.Count > 0)
myOpeRecord.SpeedyDrugsMethod(records); myOpeRecord.SpeedyDrugsMethod(records,BeginTime);
} }
else
myOpeRecord.SpeedyDrugsMethod(null, BeginTime);
} }
} }
} }
@ -522,7 +532,7 @@ namespace DrawGraph
double[] y2; double[] y2;
//double yTemp = ZedControl.Height * lines.RealEndY + 80; //double yTemp = ZedControl.Height * lines.RealEndY + 80;
PointF mousePt = new PointF(e.X, 1000); PointF mousePt = new PointF(e.X, 1300);
ZedGraphControl sender1 = sender as ZedGraphControl; ZedGraphControl sender1 = sender as ZedGraphControl;
GraphPane pane = sender1.MasterPane.FindChartRect(mousePt); GraphPane pane = sender1.MasterPane.FindChartRect(mousePt);
@ -537,7 +547,7 @@ namespace DrawGraph
return DateTime.Now; return DateTime.Now;
} }
} }
catch (Exception) catch (Exception ex)
{ {
return DateTime.Now; return DateTime.Now;
} }