器械清点生命体征不显示

数千访视添加了Ada分级,术中麻醉记录单应该同步过来
4间9:54血压显示的不对
点击获取数据的时候才会把有创血压加载出来 不自动画点血压
This commit is contained in:
leomon 2022-11-09 20:32:37 +08:00
parent fe22b3bc55
commit 82591fb825
23 changed files with 642 additions and 513 deletions

View File

@ -1731,7 +1731,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
try
{
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value, myOpeRecord.RecoverId.Value);
DateTime nowDate = DateTime.Now;
TimeSpan tsp = nowDate - dts;
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false

View File

@ -656,11 +656,11 @@
this.lblDia.AutoSize = true;
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
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.Size = new System.Drawing.Size(82, 40);
this.lblDia.Size = new System.Drawing.Size(108, 40);
this.lblDia.TabIndex = 5;
this.lblDia.Text = "--/--";
this.lblDia.Text = "---/---";
//
// lblPR
//
@ -1968,6 +1968,7 @@
this.Text = "麻醉记录单";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.frmAnasRecordBill2_Load);
this.VisibleChanged += new System.EventHandler(this.frmAnasRecordBill2_VisibleChanged);
this.panel3.ResumeLayout(false);
this.panel14.ResumeLayout(false);
this.panel4.ResumeLayout(false);

View File

@ -758,7 +758,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
foreach (var addPP in _record.addPhysioList)
{
addPP.clearAddObj(zgcAnaesRecord);
addPP.clearAddObj(zgcAnaesRecord);
}
BOperationRecord.DeletePhysioDataByOpeID(_record.Id.Value);
//同步未画点数据
@ -915,7 +915,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
try
{
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value, myOpeRecord.RecoverId.Value);
DateTime nowDate = DateTime.Now;
TimeSpan tsp = nowDate - dts;
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false
@ -1085,7 +1085,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
frmFactDrug._record = _record;
frmFactDrug.zgcAnaesRecord = zgcAnaesRecord;
frmFactDrug.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
frmFactDrug.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed);
frmFactDrug.DrugsParam += FrmFactDrug_DrugsParam;
frmFactDrug.ShowDialog();
}
else
@ -1093,6 +1093,11 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
MessageBox.Show("请选择患者");
}
}
private void FrmFactDrug_DrugsParam()
{
plRefresh_Click(null, null);
}
private void btnAddEvents_Click(object sender, EventArgs e)
{
if (PatientId != 0)
@ -1117,7 +1122,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
frmFactOutputLiquids._record = _record;
frmFactOutputLiquids.zgcAnaesRecord = zgcAnaesRecord;
frmFactOutputLiquids.OutputLiquidTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单
frmFactOutputLiquids.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed);
frmFactOutputLiquids.OutParam += FrmFactOutputLiquids_OutParam;
frmFactOutputLiquids.ShowDialog();
}
else
@ -1125,6 +1130,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
MessageBox.Show("请选择患者");
}
}
private void FrmFactOutputLiquids_OutParam()
{
plRefresh_Click(null, null);
}
private void button6_Click(object sender, EventArgs e)
{
frmAnaseDataQualityRecord frmAnaseDataQuality = new frmAnaseDataQualityRecord();
@ -1295,12 +1306,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (LastMonitorDataTime != null && LastMonitorDataTime.Value > dtTime) return;
try
{
//bool isNowRoom = isOpeRoom();
//if (isNowRoom == false)
//{
// return;
//}
LastMonitorDataTime = dtTime;
DateTime InsertTime = Convert.ToDateTime(dtTime.ToString("yyyy-MM-dd HH:mm:00.000"));
int date = 0;
@ -1311,7 +1316,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
string key = addPP.Name;
string value = addPP.Enname;
if (addPP.IsValid == false) continue;
//if (addPP.StopCollect == true) continue;
if (key == "机械通气") continue;
if (value == null || value == "") continue;
@ -1391,7 +1395,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
public string szy;//舒张压
public string ssy;//收缩压
public DateTime? LastRespMonitorDataTime;
private void timerGetTextCollectorData_Tick(object sender, EventArgs e)
{
try
@ -1499,15 +1502,15 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
string szyssy = ssy + "/" + szy;
lblDia.Text = szyssy == "/" ? "--/--" : szyssy;
lblDia.Text = szyssy == "/" ? "---/---" : szyssy;
}
else
{
lblHR.Text = "- -";
lblRESP.Text = "- -";
lblSpo2.Text = "- -";
lblPR.Text = "- -";
lblDia.Text = "--/--";
lblHR.Text = "--";
lblRESP.Text = "--";
lblSpo2.Text = "--";
lblPR.Text = "--";
lblDia.Text = "---/---";
lblHR.ForeColor = Color.Green;
lblRESP.ForeColor = Color.Yellow;
lblSpo2.ForeColor = Color.Cyan;
@ -1566,11 +1569,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
public void StarttimerGetTextCollectorData()
{
if (timerGetTextCollectorData == null) return;
timerGetTextCollectorData.Start();
}
#endregion
@ -2159,6 +2157,24 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
// 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
}

View File

@ -549,11 +549,11 @@
this.lblDia.AutoSize = true;
this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F);
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.Size = new System.Drawing.Size(82, 40);
this.lblDia.Size = new System.Drawing.Size(108, 40);
this.lblDia.TabIndex = 35;
this.lblDia.Text = "--/--";
this.lblDia.Text = "---/---";
//
// lblPR
//
@ -1759,6 +1759,7 @@
this.Text = "器械清点单";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.frmAnasRecordInstrument_Load);
this.VisibleChanged += new System.EventHandler(this.frmAnasRecordInstrument_VisibleChanged);
this.panel3.ResumeLayout(false);
this.panel14.ResumeLayout(false);
this.panel4.ResumeLayout(false);

View File

@ -6,6 +6,7 @@ using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using AxNsoOfficeLib;
using DCSoftDotfuscate;
using DevComponents.Editors.DateTimeAdv;
using DrawGraph;
using KHD_OREMRInterface;
@ -526,6 +527,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
txtOperationBegin.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOperationEnd.LostFocus += new EventHandler(txtDateTime_LostFocus);
}
GetPhysioDataConfig();
circularProgress1.IsRunning = false;
circularProgress1.Visible = false;
zgcAnaesRecord.Visible = true;
@ -731,11 +733,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
try
{
if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return;
if (NowRoom == null) return;
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())
{
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);
if (paramValue != null && paramValue.ToString() != string.Empty && paramValue.ToString() != "NaN" && paramValue.ToString() != "NULL")
double value = Double.Parse(paramValue.ToString());
value = Convert.ToInt32(value);
if (value < keyValuePair.WarningLowLimit || value > keyValuePair.WarningHighLimit)
{
double value = Double.Parse(paramValue.ToString());
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;
iswar = true;
}
}
catch (Exception)
{
//PublicMethod.WriteLog(ex);
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;
}
}
}
}
string szyssy = ssy + "/" + szy;
lblDia.Text = szyssy == "/" ? "--/--" : szyssy;
lblDia.Text = szyssy == "/" ? "---/---" : szyssy;
}
else
{
lblHR.Text = "- -";
lblRESP.Text = "- -";
lblSpo2.Text = "- -";
lblPR.Text = "- -";
lblDia.Text = "--/--";
lblHR.Text = "--";
lblRESP.Text = "--";
lblSpo2.Text = "--";
lblPR.Text = "--";
lblDia.Text = "---/---";
lblHR.ForeColor = Color.Green;
lblRESP.ForeColor = Color.Yellow;
lblSpo2.ForeColor = Color.Cyan;
@ -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()
{
reDrawEvent();
@ -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)
{
if (_record == null || _record.Id == 0) return;

View File

@ -274,7 +274,8 @@ namespace AIMS.PublicUI.UI
dr.Cells[2].Value = drug.DrugKind;
dr.Cells[3].Tag = drug.Id;
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 (dr.Cells[2].Value.ToString() == "血液制品")
{

View File

@ -37,6 +37,8 @@ namespace AIMS.PublicUI.UI
/// 计量单位集合
/// </summary>
public List<BasicDictionary> _unitList;
public delegate void OutsParamHandler();
public event OutsParamHandler OutParam;
int LastColumnIndex = 0;// e.ColumnIndex
public int OutputLiquidTypeId;

View File

@ -1481,7 +1481,7 @@ namespace AIMS.OperationDoing.AnasRecoverBill.UI
{
try
{
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value);
DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.PatientId.Value,myOpeRecord.RecoverId.Value);
DateTime nowDate = DateTime.Now;
TimeSpan tsp = nowDate - dts;
if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false

View File

@ -3701,7 +3701,7 @@ namespace AIMS.OperationFront.UI
{
ucPlanOperationRoomCard ucOpeRoom = new ucPlanOperationRoomCard(selOperationRooms.Rooms[i], operationRooms);
ucOpeRoom.Width = width;
ucOpeRoom.Height = 110;
ucOpeRoom.Height = 135;
ucOpeRoom.dgvDetail = dgvDetail;
if (row != i / 5)

View File

@ -61,7 +61,7 @@
this.panelExMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelExMain.Location = new System.Drawing.Point(0, 0);
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.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.panelExMain.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
@ -76,11 +76,11 @@
//
this.lblNurse2.ContextMenuStrip = this.contextMenuStrip1;
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.Location = new System.Drawing.Point(0, 88);
this.lblNurse2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
this.lblNurse2.Location = new System.Drawing.Point(0, 106);
this.lblNurse2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
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.Text = "巡回护士";
this.lblNurse2.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
@ -134,11 +134,11 @@
//
this.lblNurse.ContextMenuStrip = this.contextMenuStrip1;
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.Location = new System.Drawing.Point(0, 71);
this.lblNurse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
this.lblNurse.Location = new System.Drawing.Point(0, 84);
this.lblNurse.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
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.Text = "洗手护士";
this.lblNurse.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
@ -147,11 +147,11 @@
//
this.lblAnesDoctors.ContextMenuStrip = this.contextMenuStrip1;
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.Location = new System.Drawing.Point(0, 54);
this.lblAnesDoctors.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
this.lblAnesDoctors.Location = new System.Drawing.Point(0, 62);
this.lblAnesDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
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.Text = "麻醉医生";
this.lblAnesDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
@ -161,11 +161,11 @@
this.lblOpeDoctors.BackColor = System.Drawing.Color.Transparent;
this.lblOpeDoctors.ContextMenuStrip = this.contextMenuStrip1;
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.Location = new System.Drawing.Point(0, 37);
this.lblOpeDoctors.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
this.lblOpeDoctors.Location = new System.Drawing.Point(0, 40);
this.lblOpeDoctors.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
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.Text = "手术医生";
this.lblOpeDoctors.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
@ -179,14 +179,15 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
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.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
//
// labTabindex
//
this.labTabindex.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labTabindex.Location = new System.Drawing.Point(132, 8);
this.labTabindex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Name = "labTabindex";
this.labTabindex.Size = new System.Drawing.Size(69, 20);
@ -196,11 +197,12 @@
//
// labelName
//
this.labelName.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelName.Location = new System.Drawing.Point(3, 8);
this.labelName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
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.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.Text = "第几间";
this.labelName.Click += new System.EventHandler(this.UcPlanOperationRoomCard_Click);
@ -211,7 +213,7 @@
this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
this.Controls.Add(this.panelExMain);
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.panelExMain.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);

View File

@ -390,7 +390,6 @@
<Compile Include="Model\AutoGenerate\Role.cs" />
<Compile Include="Model\AutoGenerate\StockPile.cs" />
<Compile Include="Model\AutoGenerate\SysConfig.cs" />
<Compile Include="Extensions\TitleTime.cs" />
<Compile Include="Model\AutoGenerate\UserPurview.cs" />
<Compile Include="Model\Extension\AnaesthesiaMethod.cs" />
<Compile Include="Model\Extension\ApplyAnaesthesiaMethod.cs" />

View File

@ -24,5 +24,9 @@ namespace AIMSBLL
{
return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(OperationApplyId);
}
public static string GetApplyAnaesthesiaMethod(int OperationApplyId)
{
return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethod(OperationApplyId);
}
}
}

View File

@ -16,6 +16,10 @@ namespace AIMSBLL
{
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)
{
if (_record == null) _record = new OperationRecord();
@ -106,8 +110,6 @@ namespace AIMSBLL
_record.InstrumentNurse = OperationDoingdt.Rows[0]["InstrumentNurseId"].ToString().Trim();
_record.TourNurse = OperationDoingdt.Rows[0]["TourNurseId"].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();
//if (_record.SpecialCase == null || _record.SpecialCase == "") _record.SpecialCase = "无";
//if (OperationDoingdt.Rows[0]["Fasting"].ToString() != "")
@ -207,6 +209,8 @@ namespace AIMSBLL
}
_record.SpareThree = allOutDose.ToString();
if (_record.ASALevel == null || _record.ASALevel == 0)
GetASALevel(PatientId, _record);
return _record;
}
@ -427,10 +431,6 @@ namespace AIMSBLL
{
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)
{
DOperationRecord.UpdateState(PatientId, TypeId, State);
@ -508,9 +508,9 @@ namespace AIMSBLL
/// </summary>
/// <param name="doOpeInfo"></param>
/// <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);
return DateTime.Parse(dt.Rows[0][1].ToString());
}
@ -577,5 +577,18 @@ namespace AIMSBLL
{
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));
}
}
}
}
}

View File

@ -10,78 +10,78 @@ using AIMSBLL;
namespace AIMSDAL
{
internal partial class DDrugs
{
#region
/// <summary>
{
#region
/// <summary>
/// 插入
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="cmd">Command对象</param>
/// <param name="drugs">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(SqlCommand cmd, Drugs drugs)
{
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";
//从实体中取出值放入Command的参数列表
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("@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("@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("@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("@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("@OperateDate",drugs.OperateDate.HasValue?(object)drugs.OperateDate.Value:(object)DBNull.Value));
return Convert.ToInt32(cmd.ExecuteScalar());
}
/// <summary>
internal static int Insert(SqlCommand cmd, Drugs drugs)
{
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";
//从实体中取出值放入Command的参数列表
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("@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("@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("@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("@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("@OperateDate", drugs.OperateDate.HasValue ? (object)drugs.OperateDate.Value : (object)DBNull.Value));
return Convert.ToInt32(cmd.ExecuteScalar());
}
/// <summary>
/// 不使用事务的插入方法
/// </summary>
/// <param name="drugs">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(Drugs drugs)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
internal static int Insert(Drugs drugs)
{
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return Insert(cmd, drugs);
}
}
}
}
}
/// <summary>
/// <summary>
/// 使用事务的插入方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="drugs">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(Connection connection,Drugs drugs)
internal static int Insert(Connection connection, Drugs drugs)
{
return Insert(connection.Command, drugs);
}
#endregion
#endregion
#region
#region
/// <summary>
/// <summary>
/// 删除
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="cmd">Command对象</param>
/// <param name="drugs">实体类对象</param>
/// <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";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
return cmd.ExecuteNonQuery();
}
/// <summary>
/// <summary>
/// 不使用事务的删除方法
/// </summary>
/// <param name="drugs">实体类对象</param>
@ -97,18 +97,18 @@ namespace AIMSDAL
}
}
}
/// <summary>
/// <summary>
/// 使用事务的删除方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="drugs">实体类对象</param>
/// <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>
/// <param name="cmd">Command对象</param>
@ -136,7 +136,7 @@ namespace AIMSDAL
return cmd.ExecuteNonQuery();
}
/// <summary>
/// <summary>
/// 不使用事务的删除方法
/// </summary>
/// <param name="oql">对象查询语句</param>
@ -154,7 +154,7 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 使用事务的删除方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
@ -166,33 +166,33 @@ namespace AIMSDAL
return ExcuteDeleteCommand(connection.Command, oql, parameters);
}
#endregion
#endregion
#region
#region
/// <summary>
/// <summary>
/// 更新
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="cmd">Command对象</param>
/// <param name="drugs">实体类对象</param>
/// <returns>影响的记录行数</returns>
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";
//从实体中取出值放入Command的参数列表
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("@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("@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("@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("@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("@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("@Channel", drugs.Channel == null ? (object)DBNull.Value : (object) drugs.Channel));
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";
//从实体中取出值放入Command的参数列表
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("@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("@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("@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("@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("@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("@Channel", drugs.Channel == null ? (object)DBNull.Value : (object)drugs.Channel));
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
return cmd.ExecuteNonQuery();
}
@ -203,27 +203,27 @@ namespace AIMSDAL
/// <param name="drugs">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Update(Drugs drugs)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
{
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteUpdateCommand(cmd, drugs);
}
}
}
/// <summary>
}
}
/// <summary>
/// 使用事务的更新方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="drugs">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Update(Connection connection,Drugs drugs)
internal static int Update(Connection connection, Drugs drugs)
{
return ExcuteUpdateCommand(connection.Command, drugs);
}
/// <summary>
}
/// <summary>
/// 执行更新命令
/// </summary>
/// <param name="cmd">Command对象</param>
@ -235,7 +235,7 @@ namespace AIMSDAL
//解析过滤部份Sql语句
string updateString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
cmd.CommandText = "update Drugs set " + updateString;
cmd.Parameters.Clear();
cmd.Parameters.Clear();
//添加参数
if (parameters != null)
{
@ -247,7 +247,7 @@ namespace AIMSDAL
return cmd.ExecuteNonQuery();
}
/// <summary>
/// <summary>
/// 不使用事务的更新方法
/// </summary>
/// <param name="oql">对象查询语句</param>
@ -265,7 +265,7 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 使用事务的更新方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
@ -276,17 +276,17 @@ namespace AIMSDAL
{
return ExcuteUpdateCommand(connection.Command, oql, parameters);
}
#endregion
#endregion
#region
/// <summary>
#region
/// <summary>
/// 执行Command获取对象列表
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <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>();
using (SqlDataReader dr = cmd.ExecuteReader())
@ -297,25 +297,25 @@ namespace AIMSDAL
drugsList.Add(drugs);
}
}
return drugsList;
return drugsList;
}
/// <summary>
/// <summary>
/// 执行查询命令
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <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语句
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
if (filterString != string.Empty)
{
if(filterString.Trim().ToLower().IndexOf("order ")!=0)
filterString = " where " + filterString;
if (filterString.Trim().ToLower().IndexOf("order ") != 0)
filterString = " where " + filterString;
}
cmd.Parameters.Clear();
cmd.CommandText = "select * from Drugs " + filterString;
@ -330,13 +330,13 @@ namespace AIMSDAL
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <returns>实体类对象集合</returns>
internal static List<Drugs> Select()
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
@ -346,15 +346,15 @@ namespace AIMSDAL
}
}
}
/// <summary>
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
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();
using (SqlCommand cmd = conn.CreateCommand())
@ -365,7 +365,7 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
@ -373,7 +373,7 @@ namespace AIMSDAL
/// <returns>实体类对象集合</returns>
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();
using (SqlCommand cmd = conn.CreateCommand())
@ -383,17 +383,17 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <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();
using (SqlCommand cmd = conn.CreateCommand())
@ -403,61 +403,61 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 根据对象查询语句查询实体集合(启用事务)
/// </summary>
/// <param name="connection">连接对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
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>
/// <param name="cmd">Command对象</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
{
Drugs drugs=null;
using (SqlDataReader dr = cmd.ExecuteReader())
internal static Drugs ExcuteSelectSingleCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth)
{
Drugs drugs = null;
using (SqlDataReader dr = cmd.ExecuteReader())
{
if(dr.Read())
drugs = DataReaderToEntity(dr);
}
if(drugs==null)
return drugs;
if (dr.Read())
drugs = DataReaderToEntity(dr);
}
if (drugs == null)
return drugs;
return drugs;
}
/// <summary>
}
/// <summary>
/// 更据对象查询语句递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <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语句
string filterString = SyntaxAnalyzer.ParseSql(oql, new DrugsMap());
if(filterString!=string.Empty)
{
filterString=" where "+filterString;
}
if (filterString != string.Empty)
{
filterString = " where " + filterString;
}
cmd.CommandText = "select * from Drugs " + filterString;
cmd.Parameters.Clear();
cmd.Parameters.Clear();
//添加参数
if (parameters != null)
{
@ -469,18 +469,18 @@ namespace AIMSDAL
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// <summary>
/// 更据对象查询语句递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
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();
using (SqlCommand cmd = conn.CreateCommand())
@ -490,7 +490,7 @@ namespace AIMSDAL
}
}
/// <summary>
/// <summary>
/// 更据对象查询语句查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
@ -499,10 +499,10 @@ namespace AIMSDAL
/// <returns>实体对象</returns>
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>
/// <param name="connection">连接对象</param>
@ -514,135 +514,143 @@ namespace AIMSDAL
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
}
/// <summary>
/// <summary>
/// 更据主键值递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="id">主键值</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static Drugs SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth)
{
cmd.Parameters.Clear();
if(id.HasValue)
{
cmd.CommandText = "select * from Drugs where Id=@pk";
cmd.Parameters.Add(new SqlParameter("@pk",id.Value));
}
else
{
cmd.CommandText = "select * from Drugs where Id is null";
}
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
}
internal static Drugs SelectSingle(SqlCommand cmd, int? id, RecursiveType recursiveType, int recursiveDepth)
{
cmd.Parameters.Clear();
if (id.HasValue)
{
cmd.CommandText = "select * from Drugs where Id=@pk";
cmd.Parameters.Add(new SqlParameter("@pk", id.Value));
}
else
{
cmd.CommandText = "select * from Drugs where Id is null";
}
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// <summary>
/// 按主键字段查询特定实体
/// </summary>
/// <param name="id">主键值</param>
/// <returns>实体类对象</returns>
internal static Drugs SelectSingle(int? id)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return SelectSingle(cmd,id,RecursiveType.Parent,1);
return SelectSingle(cmd, id, RecursiveType.Parent, 1);
}
}
}
/// <summary>
/// <summary>
/// 按主键字段查询特定实体
/// </summary>
/// <param name="id">主键值</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象</returns>
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();
using (SqlCommand cmd = conn.CreateCommand())
{
return SelectSingle(cmd,id, recursiveType, recursiveDepth);
return SelectSingle(cmd, id, recursiveType, recursiveDepth);
}
}
}
/// <summary>
/// <summary>
/// 使用事务并按主键字段查询特定实体
/// </summary>
/// <param name="connection">连接对象</param>
/// <param name="connection">连接对象</param>
/// <param name="id">主键值</param>
/// <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中取出值生成实体对象
/// </summary>
/// <param name="searcher">查询对象</param>
/// <returns>过滤条件字符串</returns>
private static Drugs DataReaderToEntity(SqlDataReader dr)
{
Drugs entity = new Drugs ();
if(dr["Id"]!=System.DBNull.Value)
{
entity.Id=Convert.ToInt32(dr["Id"]);
}
if(dr["Name"]!=System.DBNull.Value)
{
entity.Name=dr["Name"].ToString();
}
if(dr["HelpCode"]!=System.DBNull.Value)
{
entity.HelpCode=dr["HelpCode"].ToString();
}
if(dr["DrugKind"]!=System.DBNull.Value)
{
entity.DrugKind=dr["DrugKind"].ToString();
}
if(dr["Stand"]!=System.DBNull.Value)
{
entity.Stand=dr["Stand"].ToString();
}
if(dr["DosageUnit"]!=System.DBNull.Value)
{
entity.DosageUnit=dr["DosageUnit"].ToString();
}
if(dr["Unit"]!=System.DBNull.Value)
{
entity.Unit=dr["Unit"].ToString();
}
if(dr["UseRate"]!=System.DBNull.Value)
{
entity.UseRate=Convert.ToInt32(dr["UseRate"]);
}
if(dr["IsValid"]!=System.DBNull.Value)
{
entity.IsValid=Convert.ToInt32(dr["IsValid"]);
}
if(dr["OperatorNo"]!=System.DBNull.Value)
{
entity.OperatorNo=dr["OperatorNo"].ToString();
}
if(dr["OperatorName"]!=System.DBNull.Value)
{
entity.OperatorName=dr["OperatorName"].ToString();
}
if(dr["OperateDate"]!=System.DBNull.Value)
{
entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]);
}
return entity;
}
}
private static Drugs DataReaderToEntity(SqlDataReader dr)
{
Drugs entity = new Drugs();
if (dr["Id"] != System.DBNull.Value)
{
entity.Id = Convert.ToInt32(dr["Id"]);
}
if (dr["Name"] != System.DBNull.Value)
{
entity.Name = dr["Name"].ToString();
}
if (dr["HelpCode"] != System.DBNull.Value)
{
entity.HelpCode = dr["HelpCode"].ToString();
}
if (dr["DrugKind"] != System.DBNull.Value)
{
entity.DrugKind = dr["DrugKind"].ToString();
}
if (dr["Stand"] != System.DBNull.Value)
{
entity.Stand = dr["Stand"].ToString();
}
if (dr["DosageUnit"] != System.DBNull.Value)
{
entity.DosageUnit = dr["DosageUnit"].ToString();
}
if (dr["Unit"] != System.DBNull.Value)
{
entity.Unit = dr["Unit"].ToString();
}
if (dr["UseRate"] != System.DBNull.Value)
{
entity.UseRate = Convert.ToInt32(dr["UseRate"]);
}
if (dr["IsValid"] != System.DBNull.Value)
{
entity.IsValid = Convert.ToInt32(dr["IsValid"]);
}
if (dr["OperatorNo"] != System.DBNull.Value)
{
entity.OperatorNo = dr["OperatorNo"].ToString();
}
if (dr["OperatorName"] != System.DBNull.Value)
{
entity.OperatorName = dr["OperatorName"].ToString();
}
if (dr["OperateDate"] != System.DBNull.Value)
{
entity.OperateDate = Convert.ToDateTime(dr["OperateDate"]);
}
if (dr["Remark"] != System.DBNull.Value)
{
entity.Remark = dr["Remark"].ToString();
}
if (dr["Channel"] != System.DBNull.Value)
{
entity.Channel = dr["Channel"].ToString();
}
return entity;
}
}
}

View File

@ -49,5 +49,22 @@ namespace AIMSDAL
}
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;
}
}
}

View File

@ -1,7 +1,9 @@
using AIMSModel;
using AIMSBLL;
using AIMSModel;
using AIMSObjectQuery;
using DrawGraph;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
@ -12,11 +14,12 @@ namespace AIMSDAL
{
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 + "','"
+ 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));
;
}
public static DataTable GetOperationDoingMainInfo(int PatientId, int TypeId)
@ -42,7 +45,7 @@ namespace AIMSDAL
{
string strSql = "UPDATE OperationRecord SET " + (State == 1 ? " OutRoomTime=null, " : "") + " [State] = " + State +
",Remark3 = '" + Text +
"',OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo +
"',OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo +
"',OperatorName = '" + AIMSExtension.PublicMethod.OperatorName +
"',OperateDate = '" + AIMSExtension.PublicMethod.SystemDate() +
"' WHERE PatientId=" + PatientId + " and RecoverId='" + TypeId + "'";
@ -68,7 +71,7 @@ namespace AIMSDAL
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM ApplianceRecord WHERE OperationRecordId =" + 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 FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + "");
@ -76,7 +79,7 @@ namespace AIMSDAL
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 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)
{

View File

@ -3,6 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Xml;
using AIMSModel;
using HelperDB;
namespace AIMSBLL
{
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;
}
}
}

View File

@ -112,19 +112,19 @@ namespace AIMSBLL
FactOperationInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
BFactOperationInfo.Add(FactOperationInfoObj);
}
//实施麻醉
List<int> ApplyAnaesthesiaMethodList = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId);
for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++)
{
FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod();
FactAnaesthesiaMethodObj.PatientId = PatientId;
FactAnaesthesiaMethodObj.ApplyId = ApplyId;
FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i];
FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
BFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj);
}
////实施麻醉
//List<int> ApplyAnaesthesiaMethodList = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId);
//for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++)
//{
// FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod();
// FactAnaesthesiaMethodObj.PatientId = PatientId;
// FactAnaesthesiaMethodObj.ApplyId = ApplyId;
// FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i];
// FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
// FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
// FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate();
// BFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj);
//}
//手术部位
List<int> ApplyOperationPositionList = BApplyOperationPosition.GetApplyOperationPositionIdList(ApplyId);

View File

@ -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; }
}
}
}

View File

@ -6,6 +6,7 @@ using System.Data;
using HelperDB;
using DCSoft.Writer.Data;
using System.Threading.Tasks;
using System.Xml;
namespace DocumentManagement
{
@ -600,6 +601,7 @@ namespace DocumentManagement
return model;
}
public static void InsertTemplate(PrintTemplate model)
{
try
@ -795,7 +797,7 @@ namespace DocumentManagement
StringBuilder strSql = new StringBuilder();
strSql.Append(" select *");
strSql.Append(" from V_LisResult where");
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
return DbHelperSQL.GetDataTable(strSql.ToString());
}
catch (Exception ex)
@ -809,7 +811,7 @@ namespace DocumentManagement
{
StringBuilder strSql = new StringBuilder();
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());
}
catch (Exception ex)
@ -817,13 +819,13 @@ namespace DocumentManagement
throw ex;
}
}
public static DataTable GetLisResultItems(string patientNo,string LIS_ITEM_CODE)
public static DataTable GetLisResultItems(string patientNo, string LIS_ITEM_CODE)
{
try
{
StringBuilder strSql = new StringBuilder();
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());
}
catch (Exception ex)

View File

@ -146,7 +146,7 @@ namespace DrawGraph
}
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);
x++;
}

View File

@ -126,7 +126,8 @@ namespace DrawGraph
List<string> eventListstr = new List<string>();
eventListstr.Add("【事件】");
//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++)
{

View File

@ -898,15 +898,15 @@ namespace DrawGraph
int czpyl = 0;
int hzpyl = 0;
int dfzpyl = 0;
try
{
czpyl = int.Parse(xmlOpe.GetNode("czpyl")[0].ToString());
hzpyl = int.Parse(xmlOpe.GetNode("hzpyl")[0].ToString());
//dfzpyl = int.Parse(xmlOpe.GetNode("dfzpyl")[0].ToString());
}
catch (Exception)
{
}
//try
//{
// czpyl = int.Parse(xmlOpe.GetNode("czpyl")[0].ToString());
// hzpyl = int.Parse(xmlOpe.GetNode("hzpyl")[0].ToString());
// //dfzpyl = int.Parse(xmlOpe.GetNode("dfzpyl")[0].ToString());
//}
//catch (Exception)
//{
//}
Zjpyl = Zjpyl + LocationY + czpyl;
Hzjpyl = hzpyl;
Dfzjpyl = dfzpyl;