器械清点生命体征不显示
数千访视添加了Ada分级,术中麻醉记录单应该同步过来 4间9:54血压显示的不对 点击获取数据的时候才会把有创血压加载出来 不自动画点血压
This commit is contained in:
parent
fe22b3bc55
commit
82591fb825
@ -1731,7 +1731,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
|
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value, myOpeRecord.RecoverId.Value);
|
||||||
DateTime nowDate = DateTime.Now;
|
DateTime nowDate = DateTime.Now;
|
||||||
TimeSpan tsp = nowDate - dts;
|
TimeSpan tsp = nowDate - dts;
|
||||||
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
||||||
|
|||||||
@ -656,11 +656,11 @@
|
|||||||
this.lblDia.AutoSize = true;
|
this.lblDia.AutoSize = true;
|
||||||
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
|
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
|
||||||
this.lblDia.ForeColor = System.Drawing.Color.Red;
|
this.lblDia.ForeColor = System.Drawing.Color.Red;
|
||||||
this.lblDia.Location = new System.Drawing.Point(43, 217);
|
this.lblDia.Location = new System.Drawing.Point(30, 217);
|
||||||
this.lblDia.Name = "lblDia";
|
this.lblDia.Name = "lblDia";
|
||||||
this.lblDia.Size = new System.Drawing.Size(82, 40);
|
this.lblDia.Size = new System.Drawing.Size(108, 40);
|
||||||
this.lblDia.TabIndex = 5;
|
this.lblDia.TabIndex = 5;
|
||||||
this.lblDia.Text = "--/--";
|
this.lblDia.Text = "---/---";
|
||||||
//
|
//
|
||||||
// lblPR
|
// lblPR
|
||||||
//
|
//
|
||||||
@ -1968,6 +1968,7 @@
|
|||||||
this.Text = "麻醉记录单";
|
this.Text = "麻醉记录单";
|
||||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
this.Load += new System.EventHandler(this.frmAnasRecordBill2_Load);
|
this.Load += new System.EventHandler(this.frmAnasRecordBill2_Load);
|
||||||
|
this.VisibleChanged += new System.EventHandler(this.frmAnasRecordBill2_VisibleChanged);
|
||||||
this.panel3.ResumeLayout(false);
|
this.panel3.ResumeLayout(false);
|
||||||
this.panel14.ResumeLayout(false);
|
this.panel14.ResumeLayout(false);
|
||||||
this.panel4.ResumeLayout(false);
|
this.panel4.ResumeLayout(false);
|
||||||
|
|||||||
@ -758,7 +758,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
foreach (var addPP in _record.addPhysioList)
|
foreach (var addPP in _record.addPhysioList)
|
||||||
{
|
{
|
||||||
addPP.clearAddObj(zgcAnaesRecord);
|
addPP.clearAddObj(zgcAnaesRecord);
|
||||||
}
|
}
|
||||||
BOperationRecord.DeletePhysioDataByOpeID(_record.Id.Value);
|
BOperationRecord.DeletePhysioDataByOpeID(_record.Id.Value);
|
||||||
//同步未画点数据
|
//同步未画点数据
|
||||||
@ -915,7 +915,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
|
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value, myOpeRecord.RecoverId.Value);
|
||||||
DateTime nowDate = DateTime.Now;
|
DateTime nowDate = DateTime.Now;
|
||||||
TimeSpan tsp = nowDate - dts;
|
TimeSpan tsp = nowDate - dts;
|
||||||
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
||||||
@ -1019,7 +1019,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
_record = new OperationRecord();
|
_record = new OperationRecord();
|
||||||
btnSelectPatient.Enabled = true;
|
btnSelectPatient.Enabled = true;
|
||||||
btnCancelOperation.Enabled = false;
|
btnCancelOperation.Enabled = false;
|
||||||
btnCancelIn.Enabled = false;
|
btnCancelIn.Enabled = false;
|
||||||
LastMonitorDataTime = null;
|
LastMonitorDataTime = null;
|
||||||
ClearTimeText();
|
ClearTimeText();
|
||||||
if (templateManage != null)
|
if (templateManage != null)
|
||||||
@ -1085,7 +1085,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
frmFactDrug._record = _record;
|
frmFactDrug._record = _record;
|
||||||
frmFactDrug.zgcAnaesRecord = zgcAnaesRecord;
|
frmFactDrug.zgcAnaesRecord = zgcAnaesRecord;
|
||||||
frmFactDrug.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
|
frmFactDrug.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
|
||||||
frmFactDrug.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed);
|
frmFactDrug.DrugsParam += FrmFactDrug_DrugsParam;
|
||||||
frmFactDrug.ShowDialog();
|
frmFactDrug.ShowDialog();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1093,6 +1093,11 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
MessageBox.Show("请选择患者");
|
MessageBox.Show("请选择患者");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FrmFactDrug_DrugsParam()
|
||||||
|
{
|
||||||
|
plRefresh_Click(null, null);
|
||||||
|
}
|
||||||
private void btnAddEvents_Click(object sender, EventArgs e)
|
private void btnAddEvents_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (PatientId != 0)
|
if (PatientId != 0)
|
||||||
@ -1117,7 +1122,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
frmFactOutputLiquids._record = _record;
|
frmFactOutputLiquids._record = _record;
|
||||||
frmFactOutputLiquids.zgcAnaesRecord = zgcAnaesRecord;
|
frmFactOutputLiquids.zgcAnaesRecord = zgcAnaesRecord;
|
||||||
frmFactOutputLiquids.OutputLiquidTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
|
frmFactOutputLiquids.OutputLiquidTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
|
||||||
frmFactOutputLiquids.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed);
|
frmFactOutputLiquids.OutParam += FrmFactOutputLiquids_OutParam;
|
||||||
frmFactOutputLiquids.ShowDialog();
|
frmFactOutputLiquids.ShowDialog();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1125,6 +1130,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
MessageBox.Show("请选择患者");
|
MessageBox.Show("请选择患者");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FrmFactOutputLiquids_OutParam()
|
||||||
|
{
|
||||||
|
plRefresh_Click(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
private void button6_Click(object sender, EventArgs e)
|
private void button6_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
frmAnaseDataQualityRecord frmAnaseDataQuality = new frmAnaseDataQualityRecord();
|
frmAnaseDataQualityRecord frmAnaseDataQuality = new frmAnaseDataQualityRecord();
|
||||||
@ -1284,7 +1295,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
public DateTime? LastMonitorDataTime = null;
|
public DateTime? LastMonitorDataTime = null;
|
||||||
private void timerGetCollectorData_Tick(bool isOpen)
|
private void timerGetCollectorData_Tick(bool isOpen)
|
||||||
{
|
{
|
||||||
if (State == AIMSExtension.EditState.BROWSE || _record.StateName != "手术中" || NowRoom == null || isReadOnly == true) return;
|
if (State == AIMSExtension.EditState.BROWSE || _record.StateName != "手术中" || NowRoom == null || isReadOnly == true) return;
|
||||||
if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return;
|
if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return;
|
||||||
DateTime dtTime = DateTime.Now;
|
DateTime dtTime = DateTime.Now;
|
||||||
|
|
||||||
@ -1294,13 +1305,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
if (LastMonitorDataTime != null && LastMonitorDataTime.Value.ToString("yyyy-MM-dd HH:mm") == dtTime.ToString("yyyy-MM-dd HH:mm")) return;
|
if (LastMonitorDataTime != null && LastMonitorDataTime.Value.ToString("yyyy-MM-dd HH:mm") == dtTime.ToString("yyyy-MM-dd HH:mm")) return;
|
||||||
if (LastMonitorDataTime != null && LastMonitorDataTime.Value > dtTime) return;
|
if (LastMonitorDataTime != null && LastMonitorDataTime.Value > dtTime) return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//bool isNowRoom = isOpeRoom();
|
|
||||||
//if (isNowRoom == false)
|
|
||||||
//{
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
LastMonitorDataTime = dtTime;
|
LastMonitorDataTime = dtTime;
|
||||||
DateTime InsertTime = Convert.ToDateTime(dtTime.ToString("yyyy-MM-dd HH:mm:00.000"));
|
DateTime InsertTime = Convert.ToDateTime(dtTime.ToString("yyyy-MM-dd HH:mm:00.000"));
|
||||||
int date = 0;
|
int date = 0;
|
||||||
@ -1310,8 +1315,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
string key = addPP.Name;
|
string key = addPP.Name;
|
||||||
string value = addPP.Enname;
|
string value = addPP.Enname;
|
||||||
if (addPP.IsValid == false) continue;
|
if (addPP.IsValid == false) continue;
|
||||||
//if (addPP.StopCollect == true) continue;
|
|
||||||
if (key == "机械通气") continue;
|
if (key == "机械通气") continue;
|
||||||
if (value == null || value == "") continue;
|
if (value == null || value == "") continue;
|
||||||
|
|
||||||
@ -1390,8 +1394,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string szy;//舒张压
|
public string szy;//舒张压
|
||||||
public string ssy;//收缩压
|
public string ssy;//收缩压
|
||||||
public DateTime? LastRespMonitorDataTime;
|
|
||||||
private void timerGetTextCollectorData_Tick(object sender, EventArgs e)
|
private void timerGetTextCollectorData_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -1499,15 +1502,15 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
string szyssy = ssy + "/" + szy;
|
string szyssy = ssy + "/" + szy;
|
||||||
lblDia.Text = szyssy == "/" ? "--/--" : szyssy;
|
lblDia.Text = szyssy == "/" ? "---/---" : szyssy;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lblHR.Text = "- -";
|
lblHR.Text = "--";
|
||||||
lblRESP.Text = "- -";
|
lblRESP.Text = "--";
|
||||||
lblSpo2.Text = "- -";
|
lblSpo2.Text = "--";
|
||||||
lblPR.Text = "- -";
|
lblPR.Text = "--";
|
||||||
lblDia.Text = "--/--";
|
lblDia.Text = "---/---";
|
||||||
lblHR.ForeColor = Color.Green;
|
lblHR.ForeColor = Color.Green;
|
||||||
lblRESP.ForeColor = Color.Yellow;
|
lblRESP.ForeColor = Color.Yellow;
|
||||||
lblSpo2.ForeColor = Color.Cyan;
|
lblSpo2.ForeColor = Color.Cyan;
|
||||||
@ -1565,12 +1568,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
timerGetTextCollectorData.Stop();
|
timerGetTextCollectorData.Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StarttimerGetTextCollectorData()
|
|
||||||
{
|
|
||||||
if (timerGetTextCollectorData == null) return;
|
|
||||||
timerGetTextCollectorData.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -2159,6 +2157,24 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
// templateManage2.SetPYL();
|
// templateManage2.SetPYL();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
private void frmAnasRecordBill2_VisibleChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (this.Visible == false)
|
||||||
|
{
|
||||||
|
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
|
||||||
|
{
|
||||||
|
DisposeTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
|
||||||
|
{
|
||||||
|
StartTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -549,11 +549,11 @@
|
|||||||
this.lblDia.AutoSize = true;
|
this.lblDia.AutoSize = true;
|
||||||
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
|
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
|
||||||
this.lblDia.ForeColor = System.Drawing.Color.Red;
|
this.lblDia.ForeColor = System.Drawing.Color.Red;
|
||||||
this.lblDia.Location = new System.Drawing.Point(40, 232);
|
this.lblDia.Location = new System.Drawing.Point(27, 232);
|
||||||
this.lblDia.Name = "lblDia";
|
this.lblDia.Name = "lblDia";
|
||||||
this.lblDia.Size = new System.Drawing.Size(82, 40);
|
this.lblDia.Size = new System.Drawing.Size(108, 40);
|
||||||
this.lblDia.TabIndex = 35;
|
this.lblDia.TabIndex = 35;
|
||||||
this.lblDia.Text = "--/--";
|
this.lblDia.Text = "---/---";
|
||||||
//
|
//
|
||||||
// lblPR
|
// lblPR
|
||||||
//
|
//
|
||||||
@ -1759,6 +1759,7 @@
|
|||||||
this.Text = "器械清点单";
|
this.Text = "器械清点单";
|
||||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
this.Load += new System.EventHandler(this.frmAnasRecordInstrument_Load);
|
this.Load += new System.EventHandler(this.frmAnasRecordInstrument_Load);
|
||||||
|
this.VisibleChanged += new System.EventHandler(this.frmAnasRecordInstrument_VisibleChanged);
|
||||||
this.panel3.ResumeLayout(false);
|
this.panel3.ResumeLayout(false);
|
||||||
this.panel14.ResumeLayout(false);
|
this.panel14.ResumeLayout(false);
|
||||||
this.panel4.ResumeLayout(false);
|
this.panel4.ResumeLayout(false);
|
||||||
|
|||||||
@ -6,6 +6,7 @@ using AIMSBLL;
|
|||||||
using AIMSExtension;
|
using AIMSExtension;
|
||||||
using AIMSModel;
|
using AIMSModel;
|
||||||
using AxNsoOfficeLib;
|
using AxNsoOfficeLib;
|
||||||
|
using DCSoftDotfuscate;
|
||||||
using DevComponents.Editors.DateTimeAdv;
|
using DevComponents.Editors.DateTimeAdv;
|
||||||
using DrawGraph;
|
using DrawGraph;
|
||||||
using KHD_OREMRInterface;
|
using KHD_OREMRInterface;
|
||||||
@ -51,7 +52,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void frmAnasRecordInstrument_Load(object sender, EventArgs e)
|
private void frmAnasRecordInstrument_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
labOperatorName.Text = "(" + AIMSExtension.PublicMethod.OperatorNo + ")" + " " + AIMSExtension.PublicMethod.OperatorName;
|
labOperatorName.Text = "(" + AIMSExtension.PublicMethod.OperatorNo + ")" + " " + AIMSExtension.PublicMethod.OperatorName;
|
||||||
if (NowRoom != null) lblRoom.Text = NowRoom.Name;
|
if (NowRoom != null) lblRoom.Text = NowRoom.Name;
|
||||||
circularProgress1.Location = new Point((panel8.Width - circularProgress1.Width) / 2, (panel8.Height - circularProgress1.Height) / 2);
|
circularProgress1.Location = new Point((panel8.Width - circularProgress1.Width) / 2, (panel8.Height - circularProgress1.Height) / 2);
|
||||||
@ -526,6 +527,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
txtOperationBegin.LostFocus += new EventHandler(txtDateTime_LostFocus);
|
txtOperationBegin.LostFocus += new EventHandler(txtDateTime_LostFocus);
|
||||||
txtOperationEnd.LostFocus += new EventHandler(txtDateTime_LostFocus);
|
txtOperationEnd.LostFocus += new EventHandler(txtDateTime_LostFocus);
|
||||||
}
|
}
|
||||||
|
GetPhysioDataConfig();
|
||||||
circularProgress1.IsRunning = false;
|
circularProgress1.IsRunning = false;
|
||||||
circularProgress1.Visible = false;
|
circularProgress1.Visible = false;
|
||||||
zgcAnaesRecord.Visible = true;
|
zgcAnaesRecord.Visible = true;
|
||||||
@ -731,11 +733,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return;
|
if (NowRoom == null) return;
|
||||||
ShowMonitorDataToRight();
|
ShowMonitorDataToRight();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
PublicMethod.WriteLog(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -769,78 +772,71 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
if (keyValuePair.Enname.ToUpper() == p.Name.ToUpper())
|
if (keyValuePair.Enname.ToUpper() == p.Name.ToUpper())
|
||||||
{
|
{
|
||||||
try
|
object paramValue = p.GetValue(nowPhysioData, null);
|
||||||
|
if (paramValue != null && paramValue.ToString() != string.Empty && paramValue.ToString() != "NaN" && paramValue.ToString() != "NULL")
|
||||||
{
|
{
|
||||||
object paramValue = p.GetValue(nowPhysioData, null);
|
double value = Double.Parse(paramValue.ToString());
|
||||||
if (paramValue != null && paramValue.ToString() != string.Empty && paramValue.ToString() != "NaN" && paramValue.ToString() != "NULL")
|
value = Convert.ToInt32(value);
|
||||||
|
if (value < keyValuePair.WarningLowLimit || value > keyValuePair.WarningHighLimit)
|
||||||
{
|
{
|
||||||
double value = Double.Parse(paramValue.ToString());
|
iswar = true;
|
||||||
value = Convert.ToInt32(value);
|
|
||||||
if (value < keyValuePair.WarningLowLimit || value > keyValuePair.WarningHighLimit)
|
|
||||||
{
|
|
||||||
iswar = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyValuePair.Name == "心率")
|
|
||||||
{
|
|
||||||
lblHR.Text = value <= 0 ? "- -" : value.ToString();
|
|
||||||
if (iswar == true) lblHR.ForeColor = Color.Red; else lblHR.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "自主呼吸")
|
|
||||||
{
|
|
||||||
lblRESP.Text = value <= 0 ? "- -" : value.ToString();
|
|
||||||
if (iswar == true) lblRESP.ForeColor = Color.Red; else lblRESP.ForeColor = Color.Yellow;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "氧饱和度")
|
|
||||||
{
|
|
||||||
lblSpo2.Text = value <= 0 ? "- -" : value.ToString();
|
|
||||||
if (iswar == true) lblSpo2.ForeColor = Color.Red; else lblSpo2.ForeColor = Color.Cyan;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "脉率")
|
|
||||||
{
|
|
||||||
lblPR.Text = value <= 0 ? "- -" : value.ToString();
|
|
||||||
if (iswar == true) lblPR.ForeColor = Color.Red; else lblPR.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "无创舒张压")
|
|
||||||
{
|
|
||||||
szy = value <= 0 ? "" : value.ToString();
|
|
||||||
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "无创收缩压")
|
|
||||||
{
|
|
||||||
ssy = value <= 0 ? "" : value.ToString();
|
|
||||||
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "有创舒张压")
|
|
||||||
{
|
|
||||||
szy = value <= 0 ? "" : value.ToString();
|
|
||||||
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
if (keyValuePair.Name == "有创收缩压")
|
|
||||||
{
|
|
||||||
ssy = value <= 0 ? "" : value.ToString();
|
|
||||||
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Exception)
|
if (keyValuePair.Name == "心率")
|
||||||
{
|
{
|
||||||
//PublicMethod.WriteLog(ex);
|
lblHR.Text = value <= 0 ? "- -" : value.ToString();
|
||||||
|
if (iswar == true) lblHR.ForeColor = Color.Red; else lblHR.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "自主呼吸")
|
||||||
|
{
|
||||||
|
lblRESP.Text = value <= 0 ? "- -" : value.ToString();
|
||||||
|
if (iswar == true) lblRESP.ForeColor = Color.Red; else lblRESP.ForeColor = Color.Yellow;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "氧饱和度")
|
||||||
|
{
|
||||||
|
lblSpo2.Text = value <= 0 ? "- -" : value.ToString();
|
||||||
|
if (iswar == true) lblSpo2.ForeColor = Color.Red; else lblSpo2.ForeColor = Color.Cyan;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "脉率")
|
||||||
|
{
|
||||||
|
lblPR.Text = value <= 0 ? "- -" : value.ToString();
|
||||||
|
if (iswar == true) lblPR.ForeColor = Color.Red; else lblPR.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "无创舒张压")
|
||||||
|
{
|
||||||
|
szy = value <= 0 ? "" : value.ToString();
|
||||||
|
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "无创收缩压")
|
||||||
|
{
|
||||||
|
ssy = value <= 0 ? "" : value.ToString();
|
||||||
|
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "有创舒张压")
|
||||||
|
{
|
||||||
|
szy = value <= 0 ? "" : value.ToString();
|
||||||
|
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
if (keyValuePair.Name == "有创收缩压")
|
||||||
|
{
|
||||||
|
ssy = value <= 0 ? "" : value.ToString();
|
||||||
|
//if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string szyssy = ssy + "/" + szy;
|
string szyssy = ssy + "/" + szy;
|
||||||
lblDia.Text = szyssy == "/" ? "--/--" : szyssy;
|
lblDia.Text = szyssy == "/" ? "---/---" : szyssy;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lblHR.Text = "- -";
|
lblHR.Text = "--";
|
||||||
lblRESP.Text = "- -";
|
lblRESP.Text = "--";
|
||||||
lblSpo2.Text = "- -";
|
lblSpo2.Text = "--";
|
||||||
lblPR.Text = "- -";
|
lblPR.Text = "--";
|
||||||
lblDia.Text = "--/--";
|
lblDia.Text = "---/---";
|
||||||
lblHR.ForeColor = Color.Green;
|
lblHR.ForeColor = Color.Green;
|
||||||
lblRESP.ForeColor = Color.Yellow;
|
lblRESP.ForeColor = Color.Yellow;
|
||||||
lblSpo2.ForeColor = Color.Cyan;
|
lblSpo2.ForeColor = Color.Cyan;
|
||||||
@ -848,7 +844,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
lblDia.ForeColor = Color.Red;
|
lblDia.ForeColor = Color.Red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartTimer()
|
private void StartTimer()
|
||||||
{
|
{
|
||||||
if (timerGetTextCollectorData == null)
|
if (timerGetTextCollectorData == null)
|
||||||
@ -981,6 +977,59 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GetPhysioDataConfig ()
|
||||||
|
{
|
||||||
|
if (_record.addPhysioList.Count == 0)
|
||||||
|
{
|
||||||
|
//加载生命体征图标
|
||||||
|
IList<PhysioDataConfig> dt = PhysioDataConfig.GetAllList();
|
||||||
|
for (int i = 0; i < dt.Count; i++)
|
||||||
|
{
|
||||||
|
PhysioDataConfig pp = dt[i];
|
||||||
|
string[] str = pp.Color.Split('.');
|
||||||
|
int A = int.Parse(str[0].ToString());
|
||||||
|
int R = int.Parse(str[1].ToString());
|
||||||
|
int G = int.Parse(str[2].ToString());
|
||||||
|
int B = int.Parse(str[3].ToString());
|
||||||
|
pp.ConveColor = System.Drawing.Color.FromArgb(A, R, G, B);
|
||||||
|
|
||||||
|
if (pp.IsDefalultShow == false || (pp.ShowImg == false && pp.ShowText == false))
|
||||||
|
{
|
||||||
|
pp.showStyle = "不显示";
|
||||||
|
pp.IsValid = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pp.ShowImg == true)
|
||||||
|
{
|
||||||
|
pp.showStyle = "显示曲线";
|
||||||
|
pp.IsValid = true;
|
||||||
|
}
|
||||||
|
if (pp.ShowText == true)
|
||||||
|
{
|
||||||
|
pp.showStyle = "显示数值";
|
||||||
|
pp.IsValid = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
pp.showStyle = "显示曲线";
|
||||||
|
DateTime DateTimeNow = DateTime.Now;
|
||||||
|
bool isHave = false;
|
||||||
|
foreach (PhysioDataConfig appTemp in _record.addPhysioList)
|
||||||
|
{
|
||||||
|
if (appTemp.Name.Equals(pp.Name))
|
||||||
|
{
|
||||||
|
isHave = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isHave)
|
||||||
|
{
|
||||||
|
_record.addPhysioList.Add(pp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawEvent()
|
private void DrawEvent()
|
||||||
{
|
{
|
||||||
reDrawEvent();
|
reDrawEvent();
|
||||||
@ -1141,7 +1190,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
fnc.ShowDialog();
|
fnc.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnsbwh_Click(object sender, EventArgs e)
|
private void btnsbwh_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
frmInstrumentRegistration frm = new frmInstrumentRegistration();
|
frmInstrumentRegistration frm = new frmInstrumentRegistration();
|
||||||
@ -1149,11 +1198,11 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void btnsjzx_Click(object sender, EventArgs e)
|
private void btnsjzx_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
frmLISResult lISResult = new frmLISResult();
|
frmLISResult lISResult = new frmLISResult();
|
||||||
lISResult.PatientNo = _record.InHospitalNo;
|
lISResult.PatientNo = _record.InHospitalNo;
|
||||||
lISResult.Show();
|
lISResult.Show();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 器械清点
|
#region 器械清点
|
||||||
@ -1591,7 +1640,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
if (templateManage != null)
|
if (templateManage != null)
|
||||||
{
|
{
|
||||||
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
|
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
|
||||||
_record.InstrumentList.InstrumentNurse = txtInstrumentNurse.Text;
|
_record.InstrumentList.InstrumentNurse = txtInstrumentNurse.Text;
|
||||||
_record.InstrumentList.TourNurse = txtTourNurse.Text;
|
_record.InstrumentList.TourNurse = txtTourNurse.Text;
|
||||||
_record.InstrumentList.Remark = txtRemark.Text;
|
_record.InstrumentList.Remark = txtRemark.Text;
|
||||||
@ -1740,7 +1789,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void button9_Click(object sender, EventArgs e)
|
private void button9_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBoxAddEventSources(panelQX, @"\");
|
TextBoxAddEventSources(panelQX, @"\");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1774,6 +1823,24 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void frmAnasRecordInstrument_VisibleChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.Visible == false)
|
||||||
|
{
|
||||||
|
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
|
||||||
|
{
|
||||||
|
DisposeTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
|
||||||
|
{
|
||||||
|
StartTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void plPrint_Click(object sender, EventArgs e)
|
private void plPrint_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_record == null || _record.Id == 0) return;
|
if (_record == null || _record.Id == 0) return;
|
||||||
|
|||||||
@ -274,7 +274,8 @@ namespace AIMS.PublicUI.UI
|
|||||||
dr.Cells[2].Value = drug.DrugKind;
|
dr.Cells[2].Value = drug.DrugKind;
|
||||||
dr.Cells[3].Tag = drug.Id;
|
dr.Cells[3].Tag = drug.Id;
|
||||||
dr.Cells[3].Value = drug.Name;
|
dr.Cells[3].Value = drug.Name;
|
||||||
dr.Cells[5].Value = "ivgtt";
|
dr.Cells[4].Value = drug.Remark;
|
||||||
|
dr.Cells[5].Value = drug.Channel;
|
||||||
if (tabDrugs.SelectedTab.Name == "P3") dr.Cells[5].Value = "泵入";
|
if (tabDrugs.SelectedTab.Name == "P3") dr.Cells[5].Value = "泵入";
|
||||||
if (dr.Cells[2].Value.ToString() == "血液制品")
|
if (dr.Cells[2].Value.ToString() == "血液制品")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,7 +36,9 @@ namespace AIMS.PublicUI.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计量单位集合
|
/// 计量单位集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<BasicDictionary> _unitList;
|
public List<BasicDictionary> _unitList;
|
||||||
|
public delegate void OutsParamHandler();
|
||||||
|
public event OutsParamHandler OutParam;
|
||||||
|
|
||||||
int LastColumnIndex = 0;// e.ColumnIndex
|
int LastColumnIndex = 0;// e.ColumnIndex
|
||||||
public int OutputLiquidTypeId;
|
public int OutputLiquidTypeId;
|
||||||
|
|||||||
@ -1481,7 +1481,7 @@ namespace AIMS.OperationDoing.AnasRecoverBill.UI
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
|
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value,myOpeRecord.RecoverId.Value);
|
||||||
DateTime nowDate = DateTime.Now;
|
DateTime nowDate = DateTime.Now;
|
||||||
TimeSpan tsp = nowDate - dts;
|
TimeSpan tsp = nowDate - dts;
|
||||||
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
|
||||||
|
|||||||
@ -3701,7 +3701,7 @@ namespace AIMS.OperationFront.UI
|
|||||||
{
|
{
|
||||||
ucPlanOperationRoomCard ucOpeRoom = new ucPlanOperationRoomCard(selOperationRooms.Rooms[i], operationRooms);
|
ucPlanOperationRoomCard ucOpeRoom = new ucPlanOperationRoomCard(selOperationRooms.Rooms[i], operationRooms);
|
||||||
ucOpeRoom.Width = width;
|
ucOpeRoom.Width = width;
|
||||||
ucOpeRoom.Height = 110;
|
ucOpeRoom.Height = 135;
|
||||||
ucOpeRoom.dgvDetail = dgvDetail;
|
ucOpeRoom.dgvDetail = dgvDetail;
|
||||||
|
|
||||||
if (row != i / 5)
|
if (row != i / 5)
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
this.panelExMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panelExMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panelExMain.Location = new System.Drawing.Point(0, 0);
|
this.panelExMain.Location = new System.Drawing.Point(0, 0);
|
||||||
this.panelExMain.Name = "panelExMain";
|
this.panelExMain.Name = "panelExMain";
|
||||||
this.panelExMain.Size = new System.Drawing.Size(200, 110);
|
this.panelExMain.Size = new System.Drawing.Size(320, 135);
|
||||||
this.panelExMain.Style.Alignment = System.Drawing.StringAlignment.Center;
|
this.panelExMain.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||||
this.panelExMain.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
this.panelExMain.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
||||||
this.panelExMain.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
|
this.panelExMain.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
|
||||||
@ -76,11 +76,11 @@
|
|||||||
//
|
//
|
||||||
this.lblNurse2.ContextMenuStrip = this.contextMenuStrip1;
|
this.lblNurse2.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.lblNurse2.Dock = System.Windows.Forms.DockStyle.Top;
|
this.lblNurse2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.lblNurse2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.lblNurse2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
this.lblNurse2.Location = new System.Drawing.Point(0, 88);
|
this.lblNurse2.Location = new System.Drawing.Point(0, 106);
|
||||||
this.lblNurse2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.lblNurse2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.lblNurse2.Name = "lblNurse2";
|
this.lblNurse2.Name = "lblNurse2";
|
||||||
this.lblNurse2.Size = new System.Drawing.Size(200, 17);
|
this.lblNurse2.Size = new System.Drawing.Size(320, 22);
|
||||||
this.lblNurse2.TabIndex = 19;
|
this.lblNurse2.TabIndex = 19;
|
||||||
this.lblNurse2.Text = "巡回护士";
|
this.lblNurse2.Text = "巡回护士";
|
||||||
this.lblNurse2.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.lblNurse2.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
@ -94,7 +94,7 @@
|
|||||||
this.tsDelNs2,
|
this.tsDelNs2,
|
||||||
this.tsUpdateRoom});
|
this.tsUpdateRoom});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(173, 114);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(173, 114);
|
||||||
//
|
//
|
||||||
// tsDel
|
// tsDel
|
||||||
//
|
//
|
||||||
@ -134,11 +134,11 @@
|
|||||||
//
|
//
|
||||||
this.lblNurse.ContextMenuStrip = this.contextMenuStrip1;
|
this.lblNurse.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.lblNurse.Dock = System.Windows.Forms.DockStyle.Top;
|
this.lblNurse.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.lblNurse.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.lblNurse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
this.lblNurse.Location = new System.Drawing.Point(0, 71);
|
this.lblNurse.Location = new System.Drawing.Point(0, 84);
|
||||||
this.lblNurse.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.lblNurse.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.lblNurse.Name = "lblNurse";
|
this.lblNurse.Name = "lblNurse";
|
||||||
this.lblNurse.Size = new System.Drawing.Size(200, 17);
|
this.lblNurse.Size = new System.Drawing.Size(320, 22);
|
||||||
this.lblNurse.TabIndex = 18;
|
this.lblNurse.TabIndex = 18;
|
||||||
this.lblNurse.Text = "洗手护士";
|
this.lblNurse.Text = "洗手护士";
|
||||||
this.lblNurse.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.lblNurse.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
@ -147,11 +147,11 @@
|
|||||||
//
|
//
|
||||||
this.lblAnesDoctors.ContextMenuStrip = this.contextMenuStrip1;
|
this.lblAnesDoctors.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.lblAnesDoctors.Dock = System.Windows.Forms.DockStyle.Top;
|
this.lblAnesDoctors.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.lblAnesDoctors.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.lblAnesDoctors.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
this.lblAnesDoctors.Location = new System.Drawing.Point(0, 54);
|
this.lblAnesDoctors.Location = new System.Drawing.Point(0, 62);
|
||||||
this.lblAnesDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.lblAnesDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.lblAnesDoctors.Name = "lblAnesDoctors";
|
this.lblAnesDoctors.Name = "lblAnesDoctors";
|
||||||
this.lblAnesDoctors.Size = new System.Drawing.Size(200, 17);
|
this.lblAnesDoctors.Size = new System.Drawing.Size(320, 22);
|
||||||
this.lblAnesDoctors.TabIndex = 17;
|
this.lblAnesDoctors.TabIndex = 17;
|
||||||
this.lblAnesDoctors.Text = "麻醉医生";
|
this.lblAnesDoctors.Text = "麻醉医生";
|
||||||
this.lblAnesDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.lblAnesDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
@ -161,11 +161,11 @@
|
|||||||
this.lblOpeDoctors.BackColor = System.Drawing.Color.Transparent;
|
this.lblOpeDoctors.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.lblOpeDoctors.ContextMenuStrip = this.contextMenuStrip1;
|
this.lblOpeDoctors.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.lblOpeDoctors.Dock = System.Windows.Forms.DockStyle.Top;
|
this.lblOpeDoctors.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.lblOpeDoctors.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.lblOpeDoctors.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
this.lblOpeDoctors.Location = new System.Drawing.Point(0, 37);
|
this.lblOpeDoctors.Location = new System.Drawing.Point(0, 40);
|
||||||
this.lblOpeDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.lblOpeDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.lblOpeDoctors.Name = "lblOpeDoctors";
|
this.lblOpeDoctors.Name = "lblOpeDoctors";
|
||||||
this.lblOpeDoctors.Size = new System.Drawing.Size(200, 17);
|
this.lblOpeDoctors.Size = new System.Drawing.Size(320, 22);
|
||||||
this.lblOpeDoctors.TabIndex = 16;
|
this.lblOpeDoctors.TabIndex = 16;
|
||||||
this.lblOpeDoctors.Text = "手术医生";
|
this.lblOpeDoctors.Text = "手术医生";
|
||||||
this.lblOpeDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.lblOpeDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
@ -179,14 +179,15 @@
|
|||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(200, 37);
|
this.panel1.Size = new System.Drawing.Size(320, 40);
|
||||||
this.panel1.TabIndex = 8;
|
this.panel1.TabIndex = 8;
|
||||||
this.panel1.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.panel1.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
//
|
//
|
||||||
// labTabindex
|
// labTabindex
|
||||||
//
|
//
|
||||||
this.labTabindex.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.labTabindex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labTabindex.Location = new System.Drawing.Point(132, 8);
|
this.labTabindex.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.labTabindex.Location = new System.Drawing.Point(282, 10);
|
||||||
this.labTabindex.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.labTabindex.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.labTabindex.Name = "labTabindex";
|
this.labTabindex.Name = "labTabindex";
|
||||||
this.labTabindex.Size = new System.Drawing.Size(69, 20);
|
this.labTabindex.Size = new System.Drawing.Size(69, 20);
|
||||||
@ -196,11 +197,12 @@
|
|||||||
//
|
//
|
||||||
// labelName
|
// labelName
|
||||||
//
|
//
|
||||||
this.labelName.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.labelName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
|
||||||
this.labelName.Location = new System.Drawing.Point(3, 8);
|
this.labelName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.labelName.Location = new System.Drawing.Point(129, 10);
|
||||||
this.labelName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
this.labelName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.labelName.Name = "labelName";
|
this.labelName.Name = "labelName";
|
||||||
this.labelName.Size = new System.Drawing.Size(69, 20);
|
this.labelName.Size = new System.Drawing.Size(49, 20);
|
||||||
this.labelName.TabIndex = 6;
|
this.labelName.TabIndex = 6;
|
||||||
this.labelName.Text = "第几间";
|
this.labelName.Text = "第几间";
|
||||||
this.labelName.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
this.labelName.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
|
||||||
@ -211,7 +213,7 @@
|
|||||||
this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
|
this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
|
||||||
this.Controls.Add(this.panelExMain);
|
this.Controls.Add(this.panelExMain);
|
||||||
this.Name = "ucPlanOperationRoomCard";
|
this.Name = "ucPlanOperationRoomCard";
|
||||||
this.Size = new System.Drawing.Size(200, 110);
|
this.Size = new System.Drawing.Size(320, 135);
|
||||||
this.Load += new System.EventHandler(this.ucPlanOperationRoomCard_Load);
|
this.Load += new System.EventHandler(this.ucPlanOperationRoomCard_Load);
|
||||||
this.panelExMain.ResumeLayout(false);
|
this.panelExMain.ResumeLayout(false);
|
||||||
this.contextMenuStrip1.ResumeLayout(false);
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
|||||||
@ -390,7 +390,6 @@
|
|||||||
<Compile Include="Model\AutoGenerate\Role.cs" />
|
<Compile Include="Model\AutoGenerate\Role.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\StockPile.cs" />
|
<Compile Include="Model\AutoGenerate\StockPile.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\SysConfig.cs" />
|
<Compile Include="Model\AutoGenerate\SysConfig.cs" />
|
||||||
<Compile Include="Extensions\TitleTime.cs" />
|
|
||||||
<Compile Include="Model\AutoGenerate\UserPurview.cs" />
|
<Compile Include="Model\AutoGenerate\UserPurview.cs" />
|
||||||
<Compile Include="Model\Extension\AnaesthesiaMethod.cs" />
|
<Compile Include="Model\Extension\AnaesthesiaMethod.cs" />
|
||||||
<Compile Include="Model\Extension\ApplyAnaesthesiaMethod.cs" />
|
<Compile Include="Model\Extension\ApplyAnaesthesiaMethod.cs" />
|
||||||
|
|||||||
@ -24,5 +24,9 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(OperationApplyId);
|
return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(OperationApplyId);
|
||||||
}
|
}
|
||||||
|
public static string GetApplyAnaesthesiaMethod(int OperationApplyId)
|
||||||
|
{
|
||||||
|
return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethod(OperationApplyId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,10 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
public partial class BOperationRecord
|
public partial class BOperationRecord
|
||||||
{
|
{
|
||||||
|
public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, int State, DateTime Time, int RoomId)
|
||||||
|
{
|
||||||
|
return DOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, State, Time, RoomId);
|
||||||
|
}
|
||||||
public static OperationRecord getRecord(OperationRecord _record, int PatientId, int RecoverId)
|
public static OperationRecord getRecord(OperationRecord _record, int PatientId, int RecoverId)
|
||||||
{
|
{
|
||||||
if (_record == null) _record = new OperationRecord();
|
if (_record == null) _record = new OperationRecord();
|
||||||
@ -106,8 +110,6 @@ namespace AIMSBLL
|
|||||||
_record.InstrumentNurse = OperationDoingdt.Rows[0]["InstrumentNurseId"].ToString().Trim();
|
_record.InstrumentNurse = OperationDoingdt.Rows[0]["InstrumentNurseId"].ToString().Trim();
|
||||||
_record.TourNurse = OperationDoingdt.Rows[0]["TourNurseId"].ToString().Trim();
|
_record.TourNurse = OperationDoingdt.Rows[0]["TourNurseId"].ToString().Trim();
|
||||||
_record.OrtherDoctorId = OperationDoingdt.Rows[0]["OrtherDoctorId"].ToString().Trim();
|
_record.OrtherDoctorId = OperationDoingdt.Rows[0]["OrtherDoctorId"].ToString().Trim();
|
||||||
//if (OperationDoingdt.Rows[0]["ASALevel"] != null && OperationDoingdt.Rows[0]["ASALevel"].ToString() != "")
|
|
||||||
// _record.ASALevel = int.Parse(OperationDoingdt.Rows[0]["ASALevel"].ToString().Trim());
|
|
||||||
//_record.SpecialCase = OperationDoingdt.Rows[0]["SpecialCase"].ToString().Trim();
|
//_record.SpecialCase = OperationDoingdt.Rows[0]["SpecialCase"].ToString().Trim();
|
||||||
//if (_record.SpecialCase == null || _record.SpecialCase == "") _record.SpecialCase = "无";
|
//if (_record.SpecialCase == null || _record.SpecialCase == "") _record.SpecialCase = "无";
|
||||||
//if (OperationDoingdt.Rows[0]["Fasting"].ToString() != "")
|
//if (OperationDoingdt.Rows[0]["Fasting"].ToString() != "")
|
||||||
@ -207,6 +209,8 @@ namespace AIMSBLL
|
|||||||
}
|
}
|
||||||
_record.SpareThree = allOutDose.ToString();
|
_record.SpareThree = allOutDose.ToString();
|
||||||
|
|
||||||
|
if (_record.ASALevel == null || _record.ASALevel == 0)
|
||||||
|
GetASALevel(PatientId, _record);
|
||||||
return _record;
|
return _record;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -427,10 +431,6 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
DOperationRecord.SelectSingleEntity("PatientId=" + PatientId + " and RecoverId=" + RecoverId, ref operationRecord);
|
DOperationRecord.SelectSingleEntity("PatientId=" + PatientId + " and RecoverId=" + RecoverId, ref operationRecord);
|
||||||
}
|
}
|
||||||
public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, int State, DateTime Time, int RoomId)
|
|
||||||
{
|
|
||||||
return DOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, State, Time, RoomId);
|
|
||||||
}
|
|
||||||
public static void UpdateState(int PatientId, int TypeId, int State)
|
public static void UpdateState(int PatientId, int TypeId, int State)
|
||||||
{
|
{
|
||||||
DOperationRecord.UpdateState(PatientId, TypeId, State);
|
DOperationRecord.UpdateState(PatientId, TypeId, State);
|
||||||
@ -508,9 +508,9 @@ namespace AIMSBLL
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="doOpeInfo"></param>
|
/// <param name="doOpeInfo"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static DateTime lastMaxOperationDate(int PatientId)
|
public static DateTime lastMaxOperationDate(int PatientId, int TypeId)
|
||||||
{
|
{
|
||||||
string sqlStr = "select top 1 * from (SELECT s.PatientId , s.EventEndTime etime FROM FactEvents s WHERE s.PatientId = " + PatientId + " union all SELECT s.PatientId , s.DrugEndTime FROM[dbo].[FactDrug] s WHERE s.PatientId = " + PatientId + " ) a order by a.etime desc";
|
string sqlStr = "select top 1 * from (SELECT s.PatientId , s.EventEndTime etime FROM FactEvents s WHERE s.EventTypeId=" + TypeId + " and s.PatientId = " + PatientId + " union all SELECT s.PatientId , s.DrugEndTime FROM[dbo].[FactDrug] s WHERE s.DrugTypeId=" + TypeId + " and s.PatientId = " + PatientId + " ) a order by a.etime desc";
|
||||||
DataTable dt = DBHelper.GetDataTable(sqlStr);
|
DataTable dt = DBHelper.GetDataTable(sqlStr);
|
||||||
return DateTime.Parse(dt.Rows[0][1].ToString());
|
return DateTime.Parse(dt.Rows[0][1].ToString());
|
||||||
}
|
}
|
||||||
@ -553,7 +553,7 @@ namespace AIMSBLL
|
|||||||
}
|
}
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int DeletePhysioDataByOpeID(int operationId)
|
public static int DeletePhysioDataByOpeID(int operationId)
|
||||||
{
|
{
|
||||||
string sqlStr = "DELETE FROM PhysioData where PatientId = " + operationId + " ";
|
string sqlStr = "DELETE FROM PhysioData where PatientId = " + operationId + " ";
|
||||||
@ -577,5 +577,18 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
return DOperationRecord.FillOutFluid(PatientId, DrugTypeId);
|
return DOperationRecord.FillOutFluid(PatientId, DrugTypeId);
|
||||||
}
|
}
|
||||||
|
public static void GetASALevel(int PatientId, OperationRecord _record)
|
||||||
|
{
|
||||||
|
string ASALevel = BOperationReview.GetDocumentXmlStatic("麻醉术前访视记录单", PatientId, "ASA分级");
|
||||||
|
if (ASALevel != "")
|
||||||
|
{
|
||||||
|
BasicDictionary dict = BBasicDictionary.SelectSingle(" ParentId=30 and Name='" + ASALevel + "'", null);
|
||||||
|
if (dict != null)
|
||||||
|
{
|
||||||
|
_record.ASALevel = dict.Id.Value;
|
||||||
|
BOperationRecord.Update(" ASALevel=@ASALevel where Id=@Id", new ParameterList("@ASALevel", _record.ASALevel, "@Id", _record.Id.Value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,78 +10,78 @@ using AIMSBLL;
|
|||||||
namespace AIMSDAL
|
namespace AIMSDAL
|
||||||
{
|
{
|
||||||
internal partial class DDrugs
|
internal partial class DDrugs
|
||||||
{
|
{
|
||||||
#region 插入实体操作部份
|
#region 插入实体操作部份
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 插入
|
/// 插入
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>标识列值或影响的记录行数</returns>
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
internal static int Insert(SqlCommand cmd, Drugs drugs)
|
internal static int Insert(SqlCommand cmd, Drugs drugs)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
cmd.CommandText = "insert into Drugs (Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate) values (@Name,@HelpCode,@DrugKind,@Stand,@DosageUnit,@Unit,@UseRate,@IsValid,@OperatorNo,@OperatorName,@OperateDate);select @@identity";
|
cmd.CommandText = "insert into Drugs (Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate) values (@Name,@HelpCode,@DrugKind,@Stand,@DosageUnit,@Unit,@UseRate,@IsValid,@OperatorNo,@OperatorName,@OperateDate);select @@identity";
|
||||||
//从实体中取出值放入Command的参数列表
|
//从实体中取出值放入Command的参数列表
|
||||||
cmd.Parameters.Add(new SqlParameter("@Name",drugs.Name==null?(object)DBNull.Value:(object)drugs.Name));
|
cmd.Parameters.Add(new SqlParameter("@Name", drugs.Name == null ? (object)DBNull.Value : (object)drugs.Name));
|
||||||
cmd.Parameters.Add(new SqlParameter("@HelpCode",drugs.HelpCode==null?(object)DBNull.Value:(object)drugs.HelpCode));
|
cmd.Parameters.Add(new SqlParameter("@HelpCode", drugs.HelpCode == null ? (object)DBNull.Value : (object)drugs.HelpCode));
|
||||||
cmd.Parameters.Add(new SqlParameter("@DrugKind",drugs.DrugKind==null?(object)DBNull.Value:(object)drugs.DrugKind));
|
cmd.Parameters.Add(new SqlParameter("@DrugKind", drugs.DrugKind == null ? (object)DBNull.Value : (object)drugs.DrugKind));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Stand",drugs.Stand==null?(object)DBNull.Value:(object)drugs.Stand));
|
cmd.Parameters.Add(new SqlParameter("@Stand", drugs.Stand == null ? (object)DBNull.Value : (object)drugs.Stand));
|
||||||
cmd.Parameters.Add(new SqlParameter("@DosageUnit",drugs.DosageUnit==null?(object)DBNull.Value:(object)drugs.DosageUnit));
|
cmd.Parameters.Add(new SqlParameter("@DosageUnit", drugs.DosageUnit == null ? (object)DBNull.Value : (object)drugs.DosageUnit));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Unit",drugs.Unit==null?(object)DBNull.Value:(object)drugs.Unit));
|
cmd.Parameters.Add(new SqlParameter("@Unit", drugs.Unit == null ? (object)DBNull.Value : (object)drugs.Unit));
|
||||||
cmd.Parameters.Add(new SqlParameter("@UseRate",drugs.UseRate.HasValue?(object)drugs.UseRate.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@UseRate", drugs.UseRate.HasValue ? (object)drugs.UseRate.Value : (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqlParameter("@IsValid",drugs.IsValid.HasValue?(object)drugs.IsValid.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@IsValid", drugs.IsValid.HasValue ? (object)drugs.IsValid.Value : (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperatorNo",drugs.OperatorNo==null?(object)DBNull.Value:(object)drugs.OperatorNo));
|
cmd.Parameters.Add(new SqlParameter("@OperatorNo", drugs.OperatorNo == null ? (object)DBNull.Value : (object)drugs.OperatorNo));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperatorName",drugs.OperatorName==null?(object)DBNull.Value:(object)drugs.OperatorName));
|
cmd.Parameters.Add(new SqlParameter("@OperatorName", drugs.OperatorName == null ? (object)DBNull.Value : (object)drugs.OperatorName));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperateDate",drugs.OperateDate.HasValue?(object)drugs.OperateDate.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@OperateDate", drugs.OperateDate.HasValue ? (object)drugs.OperateDate.Value : (object)DBNull.Value));
|
||||||
return Convert.ToInt32(cmd.ExecuteScalar());
|
return Convert.ToInt32(cmd.ExecuteScalar());
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不使用事务的插入方法
|
/// 不使用事务的插入方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>标识列值或影响的记录行数</returns>
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
internal static int Insert(Drugs drugs)
|
internal static int Insert(Drugs drugs)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
return Insert(cmd, drugs);
|
return Insert(cmd, drugs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务的插入方法
|
/// 使用事务的插入方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">实现共享Connection的对象</param>
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>标识列值或影响的记录行数</returns>
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
internal static int Insert(Connection connection,Drugs drugs)
|
internal static int Insert(Connection connection, Drugs drugs)
|
||||||
{
|
{
|
||||||
return Insert(connection.Command, drugs);
|
return Insert(connection.Command, drugs);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 删除实体操作
|
#region 删除实体操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除
|
/// 删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>影响的记录行数</returns>
|
/// <returns>影响的记录行数</returns>
|
||||||
internal static int ExcuteDeleteCommand(SqlCommand cmd, Drugs drugs)
|
internal static int ExcuteDeleteCommand(SqlCommand cmd, Drugs drugs)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
cmd.CommandText = "delete from Drugs where Id=@Id";
|
cmd.CommandText = "delete from Drugs where Id=@Id";
|
||||||
//从实体中取出值放入Command的参数列表
|
//从实体中取出值放入Command的参数列表
|
||||||
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
|
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
|
||||||
return cmd.ExecuteNonQuery();
|
return cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不使用事务的删除方法
|
/// 不使用事务的删除方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
@ -97,18 +97,18 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务的删除方法
|
/// 使用事务的删除方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">实现共享Connection的对象</param>
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>影响的记录行数</returns>
|
/// <returns>影响的记录行数</returns>
|
||||||
internal static int Delete(Connection connection,Drugs drugs)
|
internal static int Delete(Connection connection, Drugs drugs)
|
||||||
{
|
{
|
||||||
return ExcuteDeleteCommand(connection.Command, drugs);
|
return ExcuteDeleteCommand(connection.Command, drugs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行删除命令
|
/// 执行删除命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
@ -135,8 +135,8 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
return cmd.ExecuteNonQuery();
|
return cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不使用事务的删除方法
|
/// 不使用事务的删除方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
@ -153,8 +153,8 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务的删除方法
|
/// 使用事务的删除方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">实现共享Connection的对象</param>
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
@ -165,34 +165,34 @@ namespace AIMSDAL
|
|||||||
{
|
{
|
||||||
return ExcuteDeleteCommand(connection.Command, oql, parameters);
|
return ExcuteDeleteCommand(connection.Command, oql, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 更新实体操作
|
#region 更新实体操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新
|
/// 更新
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>影响的记录行数</returns>
|
/// <returns>影响的记录行数</returns>
|
||||||
internal static int ExcuteUpdateCommand(SqlCommand cmd, Drugs drugs)
|
internal static int ExcuteUpdateCommand(SqlCommand cmd, Drugs drugs)
|
||||||
{
|
{
|
||||||
cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel where Id=@Id";
|
cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel where Id=@Id";
|
||||||
//从实体中取出值放入Command的参数列表
|
//从实体中取出值放入Command的参数列表
|
||||||
cmd.Parameters.Add(new SqlParameter("@Name",drugs.Name==null?(object)DBNull.Value:(object)drugs.Name));
|
cmd.Parameters.Add(new SqlParameter("@Name", drugs.Name == null ? (object)DBNull.Value : (object)drugs.Name));
|
||||||
cmd.Parameters.Add(new SqlParameter("@HelpCode",drugs.HelpCode==null?(object)DBNull.Value:(object)drugs.HelpCode));
|
cmd.Parameters.Add(new SqlParameter("@HelpCode", drugs.HelpCode == null ? (object)DBNull.Value : (object)drugs.HelpCode));
|
||||||
cmd.Parameters.Add(new SqlParameter("@DrugKind",drugs.DrugKind==null?(object)DBNull.Value:(object)drugs.DrugKind));
|
cmd.Parameters.Add(new SqlParameter("@DrugKind", drugs.DrugKind == null ? (object)DBNull.Value : (object)drugs.DrugKind));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Stand",drugs.Stand==null?(object)DBNull.Value:(object)drugs.Stand));
|
cmd.Parameters.Add(new SqlParameter("@Stand", drugs.Stand == null ? (object)DBNull.Value : (object)drugs.Stand));
|
||||||
cmd.Parameters.Add(new SqlParameter("@DosageUnit",drugs.DosageUnit==null?(object)DBNull.Value:(object)drugs.DosageUnit));
|
cmd.Parameters.Add(new SqlParameter("@DosageUnit", drugs.DosageUnit == null ? (object)DBNull.Value : (object)drugs.DosageUnit));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Unit",drugs.Unit==null?(object)DBNull.Value:(object)drugs.Unit));
|
cmd.Parameters.Add(new SqlParameter("@Unit", drugs.Unit == null ? (object)DBNull.Value : (object)drugs.Unit));
|
||||||
cmd.Parameters.Add(new SqlParameter("@UseRate",drugs.UseRate.HasValue?(object)drugs.UseRate.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@UseRate", drugs.UseRate.HasValue ? (object)drugs.UseRate.Value : (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqlParameter("@IsValid",drugs.IsValid.HasValue?(object)drugs.IsValid.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@IsValid", drugs.IsValid.HasValue ? (object)drugs.IsValid.Value : (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperatorNo",drugs.OperatorNo==null?(object)DBNull.Value:(object)drugs.OperatorNo));
|
cmd.Parameters.Add(new SqlParameter("@OperatorNo", drugs.OperatorNo == null ? (object)DBNull.Value : (object)drugs.OperatorNo));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperatorName",drugs.OperatorName==null?(object)DBNull.Value:(object)drugs.OperatorName));
|
cmd.Parameters.Add(new SqlParameter("@OperatorName", drugs.OperatorName == null ? (object)DBNull.Value : (object)drugs.OperatorName));
|
||||||
cmd.Parameters.Add(new SqlParameter("@OperateDate",drugs.OperateDate.HasValue?(object)drugs.OperateDate.Value:(object)DBNull.Value));
|
cmd.Parameters.Add(new SqlParameter("@OperateDate", drugs.OperateDate.HasValue ? (object)drugs.OperateDate.Value : (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Remark", drugs.Remark == null ? (object)DBNull.Value : (object) drugs.Remark));
|
cmd.Parameters.Add(new SqlParameter("@Remark", drugs.Remark == null ? (object)DBNull.Value : (object)drugs.Remark));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Channel", drugs.Channel == null ? (object)DBNull.Value : (object) drugs.Channel));
|
cmd.Parameters.Add(new SqlParameter("@Channel", drugs.Channel == null ? (object)DBNull.Value : (object)drugs.Channel));
|
||||||
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
|
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
|
||||||
return cmd.ExecuteNonQuery();
|
return cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
@ -203,27 +203,27 @@ namespace AIMSDAL
|
|||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>影响的记录行数</returns>
|
/// <returns>影响的记录行数</returns>
|
||||||
internal static int Update(Drugs drugs)
|
internal static int Update(Drugs drugs)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
return ExcuteUpdateCommand(cmd, drugs);
|
return ExcuteUpdateCommand(cmd, drugs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务的更新方法
|
/// 使用事务的更新方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">实现共享Connection的对象</param>
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
/// <param name="drugs">实体类对象</param>
|
/// <param name="drugs">实体类对象</param>
|
||||||
/// <returns>影响的记录行数</returns>
|
/// <returns>影响的记录行数</returns>
|
||||||
internal static int Update(Connection connection,Drugs drugs)
|
internal static int Update(Connection connection, Drugs drugs)
|
||||||
{
|
{
|
||||||
return ExcuteUpdateCommand(connection.Command, drugs);
|
return ExcuteUpdateCommand(connection.Command, drugs);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行更新命令
|
/// 执行更新命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
@ -235,7 +235,7 @@ namespace AIMSDAL
|
|||||||
//解析过滤部份Sql语句
|
//解析过滤部份Sql语句
|
||||||
string updateString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
string updateString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
||||||
cmd.CommandText = "update Drugs set " + updateString;
|
cmd.CommandText = "update Drugs set " + updateString;
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
//添加参数
|
//添加参数
|
||||||
if (parameters != null)
|
if (parameters != null)
|
||||||
{
|
{
|
||||||
@ -246,8 +246,8 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
return cmd.ExecuteNonQuery();
|
return cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不使用事务的更新方法
|
/// 不使用事务的更新方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
@ -264,8 +264,8 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务的更新方法
|
/// 使用事务的更新方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">实现共享Connection的对象</param>
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
@ -276,17 +276,17 @@ namespace AIMSDAL
|
|||||||
{
|
{
|
||||||
return ExcuteUpdateCommand(connection.Command, oql, parameters);
|
return ExcuteUpdateCommand(connection.Command, oql, parameters);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 查询实体集合
|
#region 查询实体集合
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行Command获取对象列表
|
/// 执行Command获取对象列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象列表</returns>
|
/// <returns>实体类对象列表</returns>
|
||||||
internal static List<Drugs> ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
internal static List<Drugs> ExcuteSelectCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
List<Drugs> drugsList = new List<Drugs>();
|
List<Drugs> drugsList = new List<Drugs>();
|
||||||
using (SqlDataReader dr = cmd.ExecuteReader())
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
@ -297,25 +297,25 @@ namespace AIMSDAL
|
|||||||
drugsList.Add(drugs);
|
drugsList.Add(drugs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return drugsList;
|
return drugsList;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行查询命令
|
/// 执行查询命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
/// <param name="parameters">参数列表</param>
|
/// <param name="parameters">参数列表</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
internal static List<Drugs> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
//解析过滤部份Sql语句
|
//解析过滤部份Sql语句
|
||||||
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
||||||
if (filterString != string.Empty)
|
if (filterString != string.Empty)
|
||||||
{
|
{
|
||||||
if(filterString.Trim().ToLower().IndexOf("order ")!=0)
|
if (filterString.Trim().ToLower().IndexOf("order ") != 0)
|
||||||
filterString = " where " + filterString;
|
filterString = " where " + filterString;
|
||||||
}
|
}
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
cmd.CommandText = "select * from Drugs " + filterString;
|
cmd.CommandText = "select * from Drugs " + filterString;
|
||||||
@ -329,14 +329,14 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据对象查询语句查询实体集合
|
/// 根据对象查询语句查询实体集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> Select()
|
internal static List<Drugs> Select()
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
@ -346,15 +346,15 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据对象查询语句查询实体集合
|
/// 根据对象查询语句查询实体集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> Select(RecursiveType recursiveType, int recursiveDepth)
|
internal static List<Drugs> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
@ -364,8 +364,8 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据对象查询语句查询实体集合
|
/// 根据对象查询语句查询实体集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
@ -373,7 +373,7 @@ namespace AIMSDAL
|
|||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> Select(string oql, ParameterList parameters)
|
internal static List<Drugs> Select(string oql, ParameterList parameters)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
@ -382,18 +382,18 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据对象查询语句查询实体集合
|
/// 根据对象查询语句查询实体集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
/// <param name="parameters">参数列表</param>
|
/// <param name="parameters">参数列表</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
internal static List<Drugs> Select(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
@ -402,62 +402,62 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据对象查询语句查询实体集合(启用事务)
|
/// 根据对象查询语句查询实体集合(启用事务)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">连接对象</param>
|
/// <param name="connection">连接对象</param>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
/// <param name="parameters">参数列表</param>
|
/// <param name="parameters">参数列表</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象集合</returns>
|
/// <returns>实体类对象集合</returns>
|
||||||
internal static List<Drugs> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
internal static List<Drugs> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth);
|
return ExcuteSelectCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 查询单个实体
|
#region 查询单个实体
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 递归查询单个实体
|
/// 递归查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体对象</returns>
|
/// <returns>实体对象</returns>
|
||||||
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
Drugs drugs=null;
|
Drugs drugs = null;
|
||||||
using (SqlDataReader dr = cmd.ExecuteReader())
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if(dr.Read())
|
if (dr.Read())
|
||||||
drugs = DataReaderToEntity(dr);
|
drugs = DataReaderToEntity(dr);
|
||||||
}
|
}
|
||||||
if(drugs==null)
|
if (drugs == null)
|
||||||
return drugs;
|
return drugs;
|
||||||
return drugs;
|
return drugs;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更据对象查询语句递归查询单个实体
|
/// 更据对象查询语句递归查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
/// <param name="parameters">参数列表</param>
|
/// <param name="parameters">参数列表</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体对象</returns>
|
/// <returns>实体对象</returns>
|
||||||
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
//解析过滤部份Sql语句
|
//解析过滤部份Sql语句
|
||||||
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
|
||||||
if(filterString!=string.Empty)
|
if (filterString != string.Empty)
|
||||||
{
|
{
|
||||||
filterString=" where "+filterString;
|
filterString = " where " + filterString;
|
||||||
}
|
}
|
||||||
cmd.CommandText = "select * from Drugs " + filterString;
|
cmd.CommandText = "select * from Drugs " + filterString;
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
//添加参数
|
//添加参数
|
||||||
if (parameters != null)
|
if (parameters != null)
|
||||||
{
|
{
|
||||||
@ -468,29 +468,29 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更据对象查询语句递归查询单个实体
|
/// 更据对象查询语句递归查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="oql">对象查询语句</param>
|
/// <param name="oql">对象查询语句</param>
|
||||||
/// <param name="parameters">参数列表</param>
|
/// <param name="parameters">参数列表</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体对象</returns>
|
/// <returns>实体对象</returns>
|
||||||
internal static Drugs SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
internal static Drugs SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更据对象查询语句查询单个实体
|
/// 更据对象查询语句查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
@ -499,10 +499,10 @@ namespace AIMSDAL
|
|||||||
/// <returns>实体对象</returns>
|
/// <returns>实体对象</returns>
|
||||||
internal static Drugs SelectSingle(string oql, ParameterList parameters)
|
internal static Drugs SelectSingle(string oql, ParameterList parameters)
|
||||||
{
|
{
|
||||||
return SelectSingle(oql,parameters,RecursiveType.Parent,1);
|
return SelectSingle(oql, parameters, RecursiveType.Parent, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更据对象查询语句并启用事务查询单个实体
|
/// 更据对象查询语句并启用事务查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">连接对象</param>
|
/// <param name="connection">连接对象</param>
|
||||||
@ -513,136 +513,144 @@ namespace AIMSDAL
|
|||||||
{
|
{
|
||||||
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更据主键值递归查询单个实体
|
/// 更据主键值递归查询单个实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmd">Command对象</param>
|
/// <param name="cmd">Command对象</param>
|
||||||
/// <param name="id">主键值</param>
|
/// <param name="id">主键值</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体对象</returns>
|
/// <returns>实体对象</returns>
|
||||||
internal static Drugs SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth)
|
internal static Drugs SelectSingle(SqlCommand cmd, int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
if(id.HasValue)
|
if (id.HasValue)
|
||||||
{
|
{
|
||||||
cmd.CommandText = "select * from Drugs where Id=@pk";
|
cmd.CommandText = "select * from Drugs where Id=@pk";
|
||||||
cmd.Parameters.Add(new SqlParameter("@pk",id.Value));
|
cmd.Parameters.Add(new SqlParameter("@pk", id.Value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmd.CommandText = "select * from Drugs where Id is null";
|
cmd.CommandText = "select * from Drugs where Id is null";
|
||||||
}
|
}
|
||||||
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 按主键字段查询特定实体
|
/// 按主键字段查询特定实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">主键值</param>
|
/// <param name="id">主键值</param>
|
||||||
/// <returns>实体类对象</returns>
|
/// <returns>实体类对象</returns>
|
||||||
internal static Drugs SelectSingle(int? id)
|
internal static Drugs SelectSingle(int? id)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
return SelectSingle(cmd,id,RecursiveType.Parent,1);
|
return SelectSingle(cmd, id, RecursiveType.Parent, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 按主键字段查询特定实体
|
/// 按主键字段查询特定实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">主键值</param>
|
/// <param name="id">主键值</param>
|
||||||
/// <param name="recursiveType">递归类型</param>
|
/// <param name="recursiveType">递归类型</param>
|
||||||
/// <param name="recursiveDepth">递归深度</param>
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
/// <returns>实体类对象</returns>
|
/// <returns>实体类对象</returns>
|
||||||
internal static Drugs SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
internal static Drugs SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
using (SqlCommand cmd = conn.CreateCommand())
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
return SelectSingle(cmd,id, recursiveType, recursiveDepth);
|
return SelectSingle(cmd, id, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用事务并按主键字段查询特定实体
|
/// 使用事务并按主键字段查询特定实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection">连接对象</param>
|
/// <param name="connection">连接对象</param>
|
||||||
/// <param name="id">主键值</param>
|
/// <param name="id">主键值</param>
|
||||||
/// <returns>实体类对象</returns>
|
/// <returns>实体类对象</returns>
|
||||||
internal static Drugs SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth)
|
internal static Drugs SelectSingle(Connection connection, int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
{
|
{
|
||||||
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
|
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 从DataReader中取出值生成实体对象
|
/// 从DataReader中取出值生成实体对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="searcher">查询对象</param>
|
/// <param name="searcher">查询对象</param>
|
||||||
/// <returns>过滤条件字符串</returns>
|
/// <returns>过滤条件字符串</returns>
|
||||||
private static Drugs DataReaderToEntity(SqlDataReader dr)
|
private static Drugs DataReaderToEntity(SqlDataReader dr)
|
||||||
{
|
{
|
||||||
Drugs entity = new Drugs ();
|
Drugs entity = new Drugs();
|
||||||
if(dr["Id"]!=System.DBNull.Value)
|
if (dr["Id"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.Id=Convert.ToInt32(dr["Id"]);
|
entity.Id = Convert.ToInt32(dr["Id"]);
|
||||||
}
|
}
|
||||||
if(dr["Name"]!=System.DBNull.Value)
|
if (dr["Name"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.Name=dr["Name"].ToString();
|
entity.Name = dr["Name"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["HelpCode"]!=System.DBNull.Value)
|
if (dr["HelpCode"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.HelpCode=dr["HelpCode"].ToString();
|
entity.HelpCode = dr["HelpCode"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["DrugKind"]!=System.DBNull.Value)
|
if (dr["DrugKind"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.DrugKind=dr["DrugKind"].ToString();
|
entity.DrugKind = dr["DrugKind"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["Stand"]!=System.DBNull.Value)
|
if (dr["Stand"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.Stand=dr["Stand"].ToString();
|
entity.Stand = dr["Stand"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["DosageUnit"]!=System.DBNull.Value)
|
if (dr["DosageUnit"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.DosageUnit=dr["DosageUnit"].ToString();
|
entity.DosageUnit = dr["DosageUnit"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["Unit"]!=System.DBNull.Value)
|
if (dr["Unit"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.Unit=dr["Unit"].ToString();
|
entity.Unit = dr["Unit"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["UseRate"]!=System.DBNull.Value)
|
if (dr["UseRate"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.UseRate=Convert.ToInt32(dr["UseRate"]);
|
entity.UseRate = Convert.ToInt32(dr["UseRate"]);
|
||||||
}
|
}
|
||||||
if(dr["IsValid"]!=System.DBNull.Value)
|
if (dr["IsValid"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.IsValid=Convert.ToInt32(dr["IsValid"]);
|
entity.IsValid = Convert.ToInt32(dr["IsValid"]);
|
||||||
}
|
}
|
||||||
if(dr["OperatorNo"]!=System.DBNull.Value)
|
if (dr["OperatorNo"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.OperatorNo=dr["OperatorNo"].ToString();
|
entity.OperatorNo = dr["OperatorNo"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["OperatorName"]!=System.DBNull.Value)
|
if (dr["OperatorName"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.OperatorName=dr["OperatorName"].ToString();
|
entity.OperatorName = dr["OperatorName"].ToString();
|
||||||
}
|
}
|
||||||
if(dr["OperateDate"]!=System.DBNull.Value)
|
if (dr["OperateDate"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]);
|
entity.OperateDate = Convert.ToDateTime(dr["OperateDate"]);
|
||||||
}
|
}
|
||||||
return entity;
|
if (dr["Remark"] != System.DBNull.Value)
|
||||||
}
|
{
|
||||||
}
|
entity.Remark = dr["Remark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Channel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Channel = dr["Channel"].ToString();
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,5 +49,22 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
return ApplyAnaesthesiaMethodIdList;
|
return ApplyAnaesthesiaMethodIdList;
|
||||||
}
|
}
|
||||||
|
public static string GetApplyAnaesthesiaMethod(int OperationApplyId)
|
||||||
|
{
|
||||||
|
string ApplyAnaesthesiaMethodIdList = "";
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
string strSql = "SELECT AnaesthesiaMethodId FROM ApplyAnaesthesiaMethod WHERE OperationApplyId='" + OperationApplyId + "'";
|
||||||
|
|
||||||
|
DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
|
||||||
|
for (int i = 0; i < dt.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
sb.Append(dt.Rows[i]["AnaesthesiaMethodId"].ToString() + ",");
|
||||||
|
}
|
||||||
|
if (sb.ToString().Length > 1)
|
||||||
|
{
|
||||||
|
ApplyAnaesthesiaMethodIdList = sb.ToString().Substring(0, sb.ToString().Length - 1);
|
||||||
|
}
|
||||||
|
return ApplyAnaesthesiaMethodIdList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
using AIMSModel;
|
using AIMSBLL;
|
||||||
|
using AIMSModel;
|
||||||
using AIMSObjectQuery;
|
using AIMSObjectQuery;
|
||||||
using DrawGraph;
|
using DrawGraph;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -12,13 +14,14 @@ namespace AIMSDAL
|
|||||||
{
|
{
|
||||||
public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, int State, DateTime Time, int RoomId)
|
public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, int State, DateTime Time, int RoomId)
|
||||||
{
|
{
|
||||||
string strSql = "INSERT INTO OperationRecord(PatientId,OperationApplyId,RecoverId,[State],InRoomTime,OperatorNo,OperatorName,OperateDate,RoomId)" +
|
string ApplyAnaesthesiaMethod = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethod(ApplyId);
|
||||||
|
string strSql = "INSERT INTO OperationRecord(PatientId,OperationApplyId,RecoverId,[State],InRoomTime,OperatorNo,OperatorName,OperateDate,RoomId,AnaesthesiaMethodName)" +
|
||||||
"VALUES (" + PatientId + "," + ApplyId + "," + RecoverId + ",'" + State + "','" + Time + "','" + AIMSExtension.PublicMethod.OperatorNo + "','"
|
"VALUES (" + PatientId + "," + ApplyId + "," + RecoverId + ",'" + State + "','" + Time + "','" + AIMSExtension.PublicMethod.OperatorNo + "','"
|
||||||
+ AIMSExtension.PublicMethod.OperatorName + "','" + AIMSExtension.PublicMethod.SystemDate() + "','" + RoomId + "');select @@identity ";
|
+ AIMSExtension.PublicMethod.OperatorName + "','" + AIMSExtension.PublicMethod.SystemDate() + "','" + RoomId + "','" + ApplyAnaesthesiaMethod + "');select @@identity ";
|
||||||
return Convert.ToInt32(HelperDB.DbHelperSQL.ExecNonQuery(strSql));
|
return Convert.ToInt32(HelperDB.DbHelperSQL.ExecNonQuery(strSql));
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DataTable GetOperationDoingMainInfo(int PatientId, int TypeId)
|
public static DataTable GetOperationDoingMainInfo(int PatientId, int TypeId)
|
||||||
{
|
{
|
||||||
string strSql = "SELECT od.Id,od.PatientId, od.ApplyId, InRoomTime, OutRoomTime, OperationBeginTime, OperationEndTime, " +
|
string strSql = "SELECT od.Id,od.PatientId, od.ApplyId, InRoomTime, OutRoomTime, OperationBeginTime, OperationEndTime, " +
|
||||||
@ -42,7 +45,7 @@ namespace AIMSDAL
|
|||||||
{
|
{
|
||||||
string strSql = "UPDATE OperationRecord SET " + (State == 1 ? " OutRoomTime=null, " : "") + " [State] = " + State +
|
string strSql = "UPDATE OperationRecord SET " + (State == 1 ? " OutRoomTime=null, " : "") + " [State] = " + State +
|
||||||
",Remark3 = '" + Text +
|
",Remark3 = '" + Text +
|
||||||
"',OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo +
|
"',OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo +
|
||||||
"',OperatorName = '" + AIMSExtension.PublicMethod.OperatorName +
|
"',OperatorName = '" + AIMSExtension.PublicMethod.OperatorName +
|
||||||
"',OperateDate = '" + AIMSExtension.PublicMethod.SystemDate() +
|
"',OperateDate = '" + AIMSExtension.PublicMethod.SystemDate() +
|
||||||
"' WHERE PatientId=" + PatientId + " and RecoverId='" + TypeId + "'";
|
"' WHERE PatientId=" + PatientId + " and RecoverId='" + TypeId + "'";
|
||||||
@ -68,15 +71,15 @@ namespace AIMSDAL
|
|||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM ApplianceRecord WHERE OperationRecordId =" + RecorId);
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM ApplianceRecord WHERE OperationRecordId =" + RecorId);
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + RecorId);
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + RecorId);
|
||||||
}
|
}
|
||||||
public static void DeleteOperationRecorvreData(int RecorId,int PatientId, int TypeId)
|
public static void DeleteOperationRecorvreData(int RecorId, int PatientId, int TypeId)
|
||||||
{
|
{
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + "");
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + "");
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + "");
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecoverInInfo WHERE OperationRecordId =" + RecorId);
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecoverInInfo WHERE OperationRecordId =" + RecorId);
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecoverOutInfo WHERE OperationRecordId =" + RecorId);
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecoverOutInfo WHERE OperationRecordId =" + RecorId);
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE Id=" + RecorId + "");
|
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE Id=" + RecorId + "");
|
||||||
}
|
}
|
||||||
public static void DeleteEvent(int PatientId, int EventId)
|
public static void DeleteEvent(int PatientId, int EventId)
|
||||||
{
|
{
|
||||||
@ -267,7 +270,7 @@ namespace AIMSDAL
|
|||||||
}
|
}
|
||||||
if (dr["SpileInTime"] != System.DBNull.Value)
|
if (dr["SpileInTime"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
entity.SpileInTime = Convert.ToDateTime(dr["SpileInTime"]);
|
entity.SpileInTime = Convert.ToDateTime(dr["SpileInTime"]);
|
||||||
}
|
}
|
||||||
if (dr["SpileOutTime"] != System.DBNull.Value)
|
if (dr["SpileOutTime"] != System.DBNull.Value)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,6 +3,10 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Xml;
|
||||||
|
using AIMSModel;
|
||||||
|
using HelperDB;
|
||||||
|
|
||||||
namespace AIMSBLL
|
namespace AIMSBLL
|
||||||
{
|
{
|
||||||
public class BOperationReview
|
public class BOperationReview
|
||||||
@ -40,5 +44,76 @@ namespace AIMSBLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据模板名称查询文档
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tempName">模板名称</param>
|
||||||
|
/// <param name="patientId">患者Id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static PrintDocument GetDocumentbyName(string tempName, int patientId)
|
||||||
|
{
|
||||||
|
PrintDocument model = new PrintDocument();
|
||||||
|
string result = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append("select ");
|
||||||
|
sb.Append(" pd.Id,");
|
||||||
|
sb.Append(" pd.PatientId,");
|
||||||
|
sb.Append(" pd.TemplateId,");
|
||||||
|
sb.Append(" pd.XmlFileName,");
|
||||||
|
sb.Append(" pd.XmlFile,");
|
||||||
|
sb.Append(" pd.XmlStatic,");
|
||||||
|
sb.Append(" pd.IsValid,");
|
||||||
|
sb.Append(" pd.OperatorNo,");
|
||||||
|
sb.Append(" pd.OperatorDate");
|
||||||
|
sb.Append(" from PrintDocument pd");
|
||||||
|
sb.Append(" where ");
|
||||||
|
sb.Append(" pd.PatientId = " + patientId);
|
||||||
|
sb.Append(" and pd.XmlFileName = '" + tempName + "'");
|
||||||
|
sb.Append(" and pd.IsValid = 1");
|
||||||
|
DataTable dt = DbHelperSQL.GetDataTable(sb.ToString());
|
||||||
|
if (dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
model.Id = int.Parse(dt.Rows[0]["Id"].ToString());
|
||||||
|
model.PatientId = int.Parse(dt.Rows[0]["PatientId"].ToString());
|
||||||
|
model.TemplateId = int.Parse(dt.Rows[0]["TemplateId"].ToString());
|
||||||
|
model.XmlFileName = dt.Rows[0]["XmlFileName"].ToString();
|
||||||
|
model.XmlFile = dt.Rows[0]["XmlFile"].ToString();
|
||||||
|
model.XmlStatic = dt.Rows[0]["XmlStatic"].ToString();
|
||||||
|
model.OperatorNo = dt.Rows[0]["OperatorNo"].ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
public static XmlDocument GetPrintDocumentXml(string tempName, int patientId)
|
||||||
|
{
|
||||||
|
PrintDocument model = GetDocumentbyName(tempName, patientId);
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
if (model.XmlStatic != null && model.XmlStatic.Length > 0)
|
||||||
|
{
|
||||||
|
doc.LoadXml(model.XmlStatic);
|
||||||
|
}
|
||||||
|
return doc;
|
||||||
|
}
|
||||||
|
public static string GetDocumentXmlStatic(string tempName, int patientId, string dictName)
|
||||||
|
{
|
||||||
|
string Value = "";
|
||||||
|
XmlDocument doc = GetPrintDocumentXml(tempName, patientId);
|
||||||
|
XmlElement root = doc.DocumentElement;
|
||||||
|
if (root != null)
|
||||||
|
{
|
||||||
|
foreach (XmlNode row in root.ChildNodes)
|
||||||
|
{
|
||||||
|
if (row.Attributes["Name"].InnerText == dictName)
|
||||||
|
Value = row.InnerText.Trim();//测试方法
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,19 +112,19 @@ namespace AIMSBLL
|
|||||||
FactOperationInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
|
FactOperationInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
|
||||||
BFactOperationInfo.Add(FactOperationInfoObj);
|
BFactOperationInfo.Add(FactOperationInfoObj);
|
||||||
}
|
}
|
||||||
//实施麻醉
|
////实施麻醉
|
||||||
List<int> ApplyAnaesthesiaMethodList = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId);
|
//List<int> ApplyAnaesthesiaMethodList = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId);
|
||||||
for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++)
|
//for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++)
|
||||||
{
|
//{
|
||||||
FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod();
|
// FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod();
|
||||||
FactAnaesthesiaMethodObj.PatientId = PatientId;
|
// FactAnaesthesiaMethodObj.PatientId = PatientId;
|
||||||
FactAnaesthesiaMethodObj.ApplyId = ApplyId;
|
// FactAnaesthesiaMethodObj.ApplyId = ApplyId;
|
||||||
FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i];
|
// FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i];
|
||||||
FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
|
// FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
|
||||||
FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
|
// FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
|
||||||
FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
|
// FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
|
||||||
BFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj);
|
// BFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj);
|
||||||
}
|
//}
|
||||||
|
|
||||||
//手术部位
|
//手术部位
|
||||||
List<int> ApplyOperationPositionList = BApplyOperationPosition.GetApplyOperationPositionIdList(ApplyId);
|
List<int> ApplyOperationPositionList = BApplyOperationPosition.GetApplyOperationPositionIdList(ApplyId);
|
||||||
|
|||||||
@ -1,83 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace AIMSModel
|
|
||||||
{
|
|
||||||
public class TitleTime
|
|
||||||
{
|
|
||||||
public int OperationApplyId;
|
|
||||||
private DateTime? _inroomtime;
|
|
||||||
private DateTime? _outroomtime;
|
|
||||||
private DateTime? _operationbegintime;
|
|
||||||
private DateTime? _operationendtime;
|
|
||||||
private DateTime? _anesthesiabegintime;
|
|
||||||
private DateTime? _anesthesiaendtime;
|
|
||||||
private DateTime? _spiletime;
|
|
||||||
private DateTime? _extubationtime;
|
|
||||||
|
|
||||||
public DateTime? InRoomTime
|
|
||||||
{
|
|
||||||
set { _inroomtime = value; }
|
|
||||||
get { return _inroomtime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? OutRoomTime
|
|
||||||
{
|
|
||||||
set { _outroomtime = value; }
|
|
||||||
get { return _outroomtime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? OperationBeginTime
|
|
||||||
{
|
|
||||||
set { _operationbegintime = value; }
|
|
||||||
get { return _operationbegintime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? OperationEndTime
|
|
||||||
{
|
|
||||||
set { _operationendtime = value; }
|
|
||||||
get { return _operationendtime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? AnesthesiaBeginTime
|
|
||||||
{
|
|
||||||
set { _anesthesiabegintime = value; }
|
|
||||||
get { return _anesthesiabegintime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? AnesthesiaEndTime
|
|
||||||
{
|
|
||||||
set { _anesthesiaendtime = value; }
|
|
||||||
get { return _anesthesiaendtime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? SpileTime
|
|
||||||
{
|
|
||||||
set { _spiletime = value; }
|
|
||||||
get { return _spiletime; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? ExtubationTime
|
|
||||||
{
|
|
||||||
set { _extubationtime = value; }
|
|
||||||
get { return _extubationtime; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@ using System.Data;
|
|||||||
using HelperDB;
|
using HelperDB;
|
||||||
using DCSoft.Writer.Data;
|
using DCSoft.Writer.Data;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace DocumentManagement
|
namespace DocumentManagement
|
||||||
{
|
{
|
||||||
@ -29,7 +30,7 @@ namespace DocumentManagement
|
|||||||
static DocumentDAL()
|
static DocumentDAL()
|
||||||
{
|
{
|
||||||
LoadKBLibaray();
|
LoadKBLibaray();
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static string OperatorNo = "";
|
//public static string OperatorNo = "";
|
||||||
|
|
||||||
@ -600,6 +601,7 @@ namespace DocumentManagement
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void InsertTemplate(PrintTemplate model)
|
public static void InsertTemplate(PrintTemplate model)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -795,7 +797,7 @@ namespace DocumentManagement
|
|||||||
StringBuilder strSql = new StringBuilder();
|
StringBuilder strSql = new StringBuilder();
|
||||||
strSql.Append(" select *");
|
strSql.Append(" select *");
|
||||||
strSql.Append(" from V_LisResult where");
|
strSql.Append(" from V_LisResult where");
|
||||||
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
|
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
|
||||||
return DbHelperSQL.GetDataTable(strSql.ToString());
|
return DbHelperSQL.GetDataTable(strSql.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -809,7 +811,7 @@ namespace DocumentManagement
|
|||||||
{
|
{
|
||||||
StringBuilder strSql = new StringBuilder();
|
StringBuilder strSql = new StringBuilder();
|
||||||
strSql.Append(" select LIS_ITEM_CODE,LIS_ITEM_CODEName,UpdateTime from LisResult where");
|
strSql.Append(" select LIS_ITEM_CODE,LIS_ITEM_CODEName,UpdateTime from LisResult where");
|
||||||
strSql.Append(" PATIENT_ID = '" + patientNo + "' group by LIS_ITEM_CODE,LIS_ITEM_CODEName,UpdateTime ");
|
strSql.Append(" PATIENT_ID = '" + patientNo + "' group by LIS_ITEM_CODE,LIS_ITEM_CODEName,UpdateTime ");
|
||||||
return DbHelperSQL.GetDataTable(strSql.ToString());
|
return DbHelperSQL.GetDataTable(strSql.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -817,13 +819,13 @@ namespace DocumentManagement
|
|||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static DataTable GetLisResultItems(string patientNo,string LIS_ITEM_CODE)
|
public static DataTable GetLisResultItems(string patientNo, string LIS_ITEM_CODE)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
StringBuilder strSql = new StringBuilder();
|
StringBuilder strSql = new StringBuilder();
|
||||||
strSql.Append(" select * from LisResult where");
|
strSql.Append(" select * from LisResult where");
|
||||||
strSql.Append(" PATIENT_ID = '" + patientNo + "' and LIS_ITEM_CODE= '" +LIS_ITEM_CODE + "' ");
|
strSql.Append(" PATIENT_ID = '" + patientNo + "' and LIS_ITEM_CODE= '" + LIS_ITEM_CODE + "' ");
|
||||||
return DbHelperSQL.GetDataTable(strSql.ToString());
|
return DbHelperSQL.GetDataTable(strSql.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@ -146,7 +146,7 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
if (item.GiveDrugType == "术后镇痛药")
|
if (item.GiveDrugType == "术后镇痛药")
|
||||||
{
|
{
|
||||||
myOpeRecord.AfterDrugsListstr.Add(string.Format("({0}){1} {2} {3}{4}{5}", x + 1, (item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString() + "->" + item.DrugEndTime.ToShortTimeString(), item.DrugName.Trim(), dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString()));
|
myOpeRecord.AfterDrugsListstr.Add(string.Format("({0}){1} {2} {3}{4}{5}", x + 1, "", item.DrugName.Trim(), dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString()));
|
||||||
myOpeRecord.AnalgesiaDrug += string.Format("{0}{1} ", item.DrugName.Trim(), dose);
|
myOpeRecord.AnalgesiaDrug += string.Format("{0}{1} ", item.DrugName.Trim(), dose);
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,7 +126,8 @@ namespace DrawGraph
|
|||||||
List<string> eventListstr = new List<string>();
|
List<string> eventListstr = new List<string>();
|
||||||
eventListstr.Add("【事件】");
|
eventListstr.Add("【事件】");
|
||||||
//myOpeRecord.FactEventsList.Sort(new FactEventsComparer());
|
//myOpeRecord.FactEventsList.Sort(new FactEventsComparer());
|
||||||
//List<string> eventlist = xmlOpe.GetNode(EVENTPARAMPATH, "name");
|
//List<string> eventlist =
|
||||||
|
//.GetNode(EVENTPARAMPATH, "name");
|
||||||
//循环加药集体
|
//循环加药集体
|
||||||
for (int i = 0; i < myOpeRecord.FactEventsList.Count; i++)
|
for (int i = 0; i < myOpeRecord.FactEventsList.Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -898,15 +898,15 @@ namespace DrawGraph
|
|||||||
int czpyl = 0;
|
int czpyl = 0;
|
||||||
int hzpyl = 0;
|
int hzpyl = 0;
|
||||||
int dfzpyl = 0;
|
int dfzpyl = 0;
|
||||||
try
|
//try
|
||||||
{
|
//{
|
||||||
czpyl = int.Parse(xmlOpe.GetNode("czpyl")[0].ToString());
|
// czpyl = int.Parse(xmlOpe.GetNode("czpyl")[0].ToString());
|
||||||
hzpyl = int.Parse(xmlOpe.GetNode("hzpyl")[0].ToString());
|
// hzpyl = int.Parse(xmlOpe.GetNode("hzpyl")[0].ToString());
|
||||||
//dfzpyl = int.Parse(xmlOpe.GetNode("dfzpyl")[0].ToString());
|
// //dfzpyl = int.Parse(xmlOpe.GetNode("dfzpyl")[0].ToString());
|
||||||
}
|
//}
|
||||||
catch (Exception)
|
//catch (Exception)
|
||||||
{
|
//{
|
||||||
}
|
//}
|
||||||
Zjpyl = Zjpyl + LocationY + czpyl;
|
Zjpyl = Zjpyl + LocationY + czpyl;
|
||||||
Hzjpyl = hzpyl;
|
Hzjpyl = hzpyl;
|
||||||
Dfzjpyl = dfzpyl;
|
Dfzjpyl = dfzpyl;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user