取消手术排程提示

医疗文书未排程列表
点击主复制药品 剂量也复制 在空白行之上
添加多个子药往后新增行
刷新手术间台次逻辑
药品判断相同新增通路 考虑模板
 通路 版本号 是否限制用药 自备药品 是否皮试
This commit is contained in:
leomon 2022-11-14 23:13:04 +08:00
parent 29d5b3c82d
commit 4b92b1d919
55 changed files with 2207 additions and 2998 deletions

View File

@ -159,8 +159,6 @@
<Compile Include="DocManager\frmTemplateD.designer.cs">
<DependentUpon>frmTemplateD.cs</DependentUpon>
</Compile>
<Compile Include="DocManager\PatientLisResult.cs" />
<Compile Include="DocManager\PatientRecord.cs" />
<Compile Include="DrugManagement\frmDosageKind.cs">
<SubType>Form</SubType>
</Compile>
@ -828,6 +826,7 @@
</EmbeddedResource>
<EmbeddedResource Include="FormLogin.resx">
<DependentUpon>FormLogin.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="OperationAfter\frmCommonLargeScreen.resx">
<DependentUpon>frmCommonLargeScreen.cs</DependentUpon>

View File

@ -1,15 +1,11 @@
using System;
using AIMS.OremrUserControl;
using AIMSModel;
using DevComponents.DotNetBar;
using DocumentManagement;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DocumentManagement;
using DCSoft.Writer.Security;
using DevComponents.DotNetBar;
using AIMS.OremrUserControl;
namespace AIMS.DocManager
{

View File

@ -1,21 +1,15 @@
using System;
using AIMS.OremrUserControl;
using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DevComponents.DotNetBar;
using DocumentManagement;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using DevComponents.DotNetBar;
using System.IO;
using System.Threading.Tasks;
using AIMSModel;
using AIMSExtension;
using AIMSBLL;
using DocumentManagement;
using AIMS.DocManager;
using AIMS.OremrUserControl;
namespace AIMS.OperationAfter.UI
{
@ -95,12 +89,6 @@ namespace AIMS.OperationAfter.UI
if (vPlanedOpeList.Rows.Count <= 0) return;
string roomname = "";
TreeNode roomnodenull = new TreeNode("空白单");
TreeNode nonode = new TreeNode("无患者");
nonode.ImageIndex = 2;
roomnodenull.Nodes.Add(nonode);
roomnodenull.Tag = -1;
treeViewPatient.Nodes.Add(roomnodenull);
foreach (DataRow po in vPlanedOpeList.Rows)
{
if (po["OperationRoom"].ToString() != roomname)
@ -120,6 +108,17 @@ namespace AIMS.OperationAfter.UI
}
}
}
TreeNode roomnodenull = new TreeNode("未排程");
foreach (DataRow vpo in vPlanedOpeList.Rows)
{
if (vpo["OperationRoom"].ToString() == "")
{
TreeNode sNode = new TreeNode(vpo["PatientName"].ToString() + "-" + vpo["MdrecNo"].ToString());
sNode.Tag = vpo;
roomnodenull.Nodes.Add(sNode);
}
}
treeViewPatient.Nodes.Add(roomnodenull);
}
catch (Exception exp)
{
@ -381,14 +380,14 @@ namespace AIMS.OperationAfter.UI
}
}
}
for (int i = 0; i < ucClassify.tv.Nodes.Count ; i++)
for (int i = 0; i < ucClassify.tv.Nodes.Count; i++)
{
TreeNode item = ucClassify.tv.Nodes[i];
if (item != null )
if (item != null)
{
foreach (TreeNode node in item.Nodes)
{
if (Ids.Contains( int.Parse(node.Tag.ToString()) ))
if (Ids.Contains(int.Parse(node.Tag.ToString())))
{
//创建该文书标签
TabItem tb = this.tsbDoc.CreateTab(node.Text);

View File

@ -1,7 +1,10 @@
using AIMS.DocManager;
using AIMS.OperationDoing.AnasRecordBill.UI;
using AIMSBLL;
using AIMSModel;
using DCSoftDotfuscate;
using DevComponents.DotNetBar;
using DocumentManagement;
using System;
using System.Collections.Generic;
using System.Data;
@ -36,8 +39,12 @@ namespace AIMS
eStyle.OfficeMobile2014 });
comboBoxEx1.SelectedIndex = 1;
SetGridAlternatingRows(lv1);
SetGridAlternatingRows(lv2);
SetGridAlternatingRows(lv3);
SetGridAlternatingRows(lv4);
SetGridAlternatingRows(lv5);
SetGridAlternatingRows(lv6);
}
private void switchButton1_ValueChanged(object sender, EventArgs e)
@ -189,9 +196,9 @@ namespace AIMS
Task.Factory.StartNew(() =>
{
BindOperationsList(lv1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), true);
BindOperationsList(lv3, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), true);
BindOperationsList(lv5, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), true, true);
BindOperationsList(lv1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labTa, true);
BindOperationsList(lv3, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), labTo, true);
BindOperationsList(lv5, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labWeek, true, true);
});
Task.Factory.StartNew(() =>
@ -203,34 +210,33 @@ namespace AIMS
}
public void BindOperationsList(DevComponents.DotNetBar.Controls.DataGridViewX lvex, DateTime beginTime, DateTime endTime, bool isLoginPerson, bool isEnOpe = false)
public void BindOperationsList(DevComponents.DotNetBar.Controls.DataGridViewX lvex, DateTime beginTime, DateTime endTime, DevComponents.DotNetBar.LabelX labCount, bool isLoginPerson, bool isEnOpe = false)
{
lvex.Rows.Clear();
DataTable dt = SelectPatient.GetSelectPatientDataTable
(beginTime, endTime, isLoginPerson, AIMSExtension.PublicMethod.OperatorName, isEnOpe);
if (dt.Rows.Count == 0) labCount.Visible = false;
else labCount.Visible = true;
labCount.Text = dt.Rows.Count.ToString() + "̨";
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow dr = dt.Rows[i];
string message = dr["MdrecNo"].ToString() + " " +
dr["PatientName"].ToString() + " Âé×í:" +
dr["AnesthesiaDoctor"].ToString();
if (AIMSExtension.PublicMethod.RoleId == 7 || AIMSExtension.PublicMethod.RoleId == 10)
{
message = dr["MdrecNo"].ToString() + " " +
dr["PatientName"].ToString() + " Âé×í:" +
dr["AnesthesiaDoctor"].ToString() + " »¤Ê¿:" +
dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString(); ;
}
else if (AIMSExtension.PublicMethod.RoleId == 6 || AIMSExtension.PublicMethod.RoleId == 8)
{
message = dr["MdrecNo"].ToString() + " " +
dr["PatientName"].ToString() + " »¤Ê¿:" +
dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString();
}
//lists[i] = new System.Windows.Forms.ListViewItem(new string[] { dr["ApplyId"].ToString(),
// message,
//dr["State"].ToString() }, i);// dr["ApplyDepName"].ToString()+" "+
string patient = dr["OperationRoom"].ToString() + (dr["PlanOrder"].ToString() == "" ? "" : ("-" + dr["PlanOrder"].ToString() + " ")) + dr["MdrecNo"].ToString() + " " +
dr["PatientName"].ToString();
if (isEnOpe == true) patient = dr["InRoomTime"].ToString() + " " + patient;
string AnesthesiaDoctor = dr["AnesthesiaDoctor"].ToString() == "" ? "" : (" Âé×í:" +
dr["AnesthesiaDoctor"].ToString());
string Nurse = (dr["InstrumentNurse"].ToString() == "" & dr["TourNurse"].ToString() == "") ? "" : (" »¤Ê¿:" + dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString());
string message = patient + AnesthesiaDoctor + Nurse;
//if (AIMSExtension.PublicMethod.RoleId == 7 || AIMSExtension.PublicMethod.RoleId == 10)
//{
// message = patient + AnesthesiaDoctor + Nurse;
//}
//else if (AIMSExtension.PublicMethod.RoleId == 6 || AIMSExtension.PublicMethod.RoleId == 8)
//{
// message = patient + Nurse;
//}
DataGridViewRow drc = new DataGridViewRow();
drc.CreateCells(lvex);
@ -239,6 +245,7 @@ namespace AIMS
drc.Cells[2].Value = message;
drc.Cells[3].Value = dr["State"].ToString();
lvex.Rows.Insert(i, drc);
lvex.ClearSelection();
}
}
public void BindOperationsListChart()
@ -400,10 +407,9 @@ namespace AIMS
{
AIMS.OperationFront.UI.frmOperationApplyDetail frmOperationApplyDetail = new AIMS.OperationFront.UI.frmOperationApplyDetail();
frmOperationApplyDetail.State = AIMSExtension.EditState.ADD;
frmOperationApplyDetail.IsJZ = true;
frmOperationApplyDetail.FormClosed += (ee, err) =>
{
BindOperationsList(lv1, DateTime.Now, DateTime.Now.AddDays(1), true);
BindOperationsList(lv1, DateTime.Now, DateTime.Now.AddDays(1), labTa, true);
};
frmOperationApplyDetail.ShowDialog();
@ -414,11 +420,11 @@ namespace AIMS
if (superTabControl1.SelectedTab.Name == "P1")
{
BindOperationsList(lv1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), true);
BindOperationsList(lv1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labTa, true);
}
if (superTabControl1.SelectedTab.Name == "P2")
{
BindOperationsList(lv2, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), false);
BindOperationsList(lv2, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labTa, false);
}
}
@ -426,11 +432,11 @@ namespace AIMS
{
if (superTabControl2.SelectedTab.Name == "P3")
{
BindOperationsList(lv3, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), true);
BindOperationsList(lv3, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), labTo, true);
}
if (superTabControl2.SelectedTab.Name == "P4")
{
BindOperationsList(lv4, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), false);
BindOperationsList(lv4, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(2), labTo, false);
}
}
@ -439,11 +445,11 @@ namespace AIMS
{
if (superTabControl3.SelectedTab.Name == "P5")
{
BindOperationsList(lv5, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), true, true);
BindOperationsList(lv5, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labWeek, true, true);
}
if (superTabControl3.SelectedTab.Name == "P6")
{
BindOperationsList(lv6, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), false, true);
BindOperationsList(lv6, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-7), DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(1), labWeek, false, true);
}
}
@ -471,13 +477,20 @@ namespace AIMS
if (SelApplyId != 0)
{
OperationApply apply = BOperationApply.GetModel(SelApplyId);
AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBill frmAnasRecord = new OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBill();
frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2();
frmAnasRecord.PatientId = apply.OrisPatientId.Value;
frmAnasRecord.ApplyId = apply.Id.Value;
frmAnasRecord.State = AIMSExtension.EditState.BROWSE;
frmAnasRecord.Show();
}
}
public void SetGridAlternatingRows(DataGridView dg)
{
if (dg != null)
{
dg.RowsDefaultCellStyle.BackColor = Color.FromArgb(255, 255, 255);
dg.AlternatingRowsDefaultCellStyle.BackColor = Color.AliceBlue;
}
}
}
}

Binary file not shown.

View File

@ -5,6 +5,7 @@ using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DevComponents.Editors.DateTimeAdv;
using DocumentManagement;
using DrawGraph;
using Newtonsoft.Json;
using System;

View File

@ -6,6 +6,7 @@ using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DevComponents.Editors.DateTimeAdv;
using DocumentManagement;
using DrawGraph;
using KHD_OREMRInterface;
using Newtonsoft.Json;
@ -19,7 +20,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
//using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
namespace AIMS.OperationDoing.AnasRecordBill.UI
{
@ -261,6 +261,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
PrintDocPane(e, zgcAnaesRecord2, templateManage2, false);
}
btnNextPage_Click(null, null);
if (i != 1)
{
MasterPane mPane = new MasterPane();
mPane.Border.IsVisible = false;
mPanes.Add(mPane);
}
}
}
@ -350,8 +356,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
m_startPrintPage = pDoc.PrinterSettings.FromPage;
m_endPrintPage = pDoc.PrinterSettings.ToPage;
if (m_startPrintPage == 0 && m_endPrintPage == 0)
{
int printCount = mPanes.Count;
if (mPanes.Count > 0 && count < printCount)
{
@ -366,45 +370,62 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
e.HasMorePages = false;
}
}
else
{
try
{
//如果当前打印页小于打印起始页码,就递增一页,直至等于打印起始页码
if (m_startPrintPage > 0)
{
while (m_PageIndex < m_startPrintPage)
{
m_PageIndex++;
}
}
mPanes[m_PageIndex - 1].Draw(e.Graphics);
//当前打印页加1
m_PageIndex++;
//if (m_startPrintPage == 0 && m_endPrintPage == 0)
//{
// int printCount = mPanes.Count;
// if (mPanes.Count > 0 && count < printCount)
// {
// mPanes[count].Draw(e.Graphics);
// count++;
// if (count < printCount)
// {
// e.HasMorePages = true;
// }
// }
// else
// {
// e.HasMorePages = false;
// }
//}
//else
//{
// try
// {
// //如果当前打印页小于打印起始页码,就递增一页,直至等于打印起始页码
// if (m_startPrintPage > 0)
// {
// while (m_PageIndex < m_startPrintPage)
// {
// m_PageIndex++;
// }
// }
if (m_PageIndex <= m_endPrintPage)
{
e.HasMorePages = true;
}
// mPanes[m_PageIndex - 1].Draw(e.Graphics);
// //当前打印页加1
// m_PageIndex++;
//如果设置了打印页码范围并且当前打印页大于打印终止页码终止打印设置e.HasMorePages参数初始化相关变量
if ((m_startPrintPage > 0) && (m_PageIndex > m_endPrintPage))
{
e.HasMorePages = false;
m_PageIndex = 1;
return;
}
// if (m_PageIndex <= m_endPrintPage)
// {
// e.HasMorePages = true;
// }
}
catch (Exception ex)
{
//出错处理终止打印设置e.HasMorePages参数初始化相关变量
e.HasMorePages = false;
m_PageIndex = 1;
}
}
// //如果设置了打印页码范围并且当前打印页大于打印终止页码终止打印设置e.HasMorePages参数初始化相关变量
// if ((m_startPrintPage > 0) && (m_PageIndex > m_endPrintPage))
// {
// e.HasMorePages = false;
// m_PageIndex = 1;
// return;
// }
// }
// catch (Exception ex)
// {
// //出错处理终止打印设置e.HasMorePages参数初始化相关变量
// e.HasMorePages = false;
// m_PageIndex = 1;
// }
//}
}
#endregion
@ -995,6 +1016,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
HelperDB.DbHelperSQL.CommitTrans();
ClearTimeText();
btnSelectPatient.Enabled = false;
btnCancelOperation.Enabled = true;
btnCancelIn.Enabled = true;
DrawAnasReordBill.IniDrawAnasReordBill5(_record, zgcAnaesRecord, zgcAnaesRecord2, ref templateManage, ref templateManage2);
StartTimer();
}
@ -1007,6 +1030,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
_record = new OperationRecord();
btnSelectPatient.Enabled = false; //清空记录点并重新加载
btnCancelOperation.Enabled = true;
btnCancelIn.Enabled = true;
ClearTimeText();
if (templateManage != null)
{
@ -1710,6 +1735,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.RoomId = int.Parse(RoomStr);
BOperationRecord.Update("RoomId=@RoomId where Id=@id ", new AIMSModel.ParameterList("@RoomId", _record.RoomId, "@id", _record.Id));
BOperationApply.UpdateApplyRoom(_record.OperationApplyId.Value, _record.RoomId.Value, _record.PlanOperationTime);
BOperationApply.UpdteOperationOrder(_record.PlanOperationTime, NowRoom.Id.Value);
NowRoom = AIMSBLL.BOperationRoom.SelectSingle(_record.RoomId);
lblRoom.Text = NowRoom.Name;
}
@ -1887,9 +1913,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
templateManage2.Bind();
reDrawAnalysis();
SelectWorkerValue.Hidden();
SelectDictValue.Hidden();
SelectDictText.Hidden();
//SelectWorkerValue.Hidden();
//SelectDictValue.Hidden();
//SelectDictText.Hidden();
zgcAnaesRecord.Refresh();
zgcAnaesRecord2.Refresh();
@ -2252,13 +2278,16 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
private void frmAnasRecordBill2_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible == false)
{
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
{
panel8.VerticalScroll.Value = 0;
panel82.VerticalScroll.Value = 0;
if (templateManage != null)
templateManage.SetPYL();
if (templateManage2 != null)
templateManage2.SetPYL();
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
{
DisposeTimer();
}
}

View File

@ -8,6 +8,7 @@ using AIMSModel;
using AxNsoOfficeLib;
using DCSoftDotfuscate;
using DevComponents.Editors.DateTimeAdv;
using DocumentManagement;
using DrawGraph;
using KHD_OREMRInterface;
using Newtonsoft.Json;

View File

@ -6,6 +6,7 @@ using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DevComponents.Editors.DateTimeAdv;
using DocumentManagement;
using DrawGraph;
using Newtonsoft.Json;
using System;

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using DCSoftDotfuscate;
namespace AIMS.PublicUI.UI
{
@ -155,8 +156,6 @@ namespace AIMS.PublicUI.UI
_VelocityUnit.Insert(0, new BasicDictionary() { Id = -1, Name = "" });
_DensityUnit = BBasicDictionary.GetBasicDictionaryByName("浓度单位").SubItem;
_DensityUnit.Insert(0, new BasicDictionary() { Id = -1, Name = "" });
DataTable dt = BDrugs.GetDrugsDataTable();
FullCommonlyDrugs(dt, AnesPanel);
}
int page = 0;
@ -166,7 +165,7 @@ namespace AIMS.PublicUI.UI
private void FullCommonlyDrugs(DataTable dt, Panel panelleft)
{
if (panelleft.Controls != null) panelleft.Controls.Clear();
if ((dt.Rows.Count / 18) == 1 || (dt.Rows.Count / 18) == 2 || (dt.Rows.Count / 18) == 3)
if (dt.Rows.Count == 18 || dt.Rows.Count == 36 || dt.Rows.Count == 54)
page = (dt.Rows.Count / 18);
else
page = (dt.Rows.Count / 18) + 1;
@ -179,7 +178,6 @@ namespace AIMS.PublicUI.UI
Panel paneltab = new Panel();
paneltab.AutoScroll = true;
paneltab.BackColor = Color.White;
//paneltab.BorderStyle = BorderStyle.FixedSingle;
paneltab.Dock = DockStyle.Top;
paneltab.Height = 36;
panelleft.Controls.Add(paneltab);
@ -191,9 +189,6 @@ namespace AIMS.PublicUI.UI
lb.Text = i.ToString().Trim();
lb.Size = new System.Drawing.Size(30, 30);
lb.Font = new System.Drawing.Font("微软雅黑", 11f, FontStyle.Bold);
//lb.Cursor = Cursors.Hand;
//lb.ColorTable = eButtonColor.Flat;
//lb.BackColor = Color.PaleTurquoise;
lb.Parent = paneltab;
if (i == 1)
lb.TextColor = System.Drawing.Color.Black;
@ -347,7 +342,6 @@ namespace AIMS.PublicUI.UI
{
dr.Cells[12].ReadOnly = true;//血型
}
//dr.Cells[17].Value = drug.Rows[0]["CategoriesName"].ToString();
if (send.Text != "")
{
@ -488,6 +482,7 @@ namespace AIMS.PublicUI.UI
{
_dataGridView.Rows[index].Cells[16].Value = Convert.ToDateTime(item.DrugEndTime);//结束时间
}
_dataGridView.Rows[index].Cells[17].Value = item.Access;
}
private void dgvDrugs_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
@ -519,6 +514,10 @@ namespace AIMS.PublicUI.UI
dr.Cells[1].Tag = _dataGridView.CurrentRow.Index;
dr.Cells[0].Value = imageList1.Images[1];
_lineNumber = e.RowIndex + 1;
while (_dataGridView.Rows[_lineNumber].Cells[1].Value.ToString() == " ...")
{
_lineNumber++;
}
_dataGridView.Rows.Insert(_lineNumber, dr);
}
if (e.ColumnIndex == 1)
@ -529,7 +528,7 @@ namespace AIMS.PublicUI.UI
if (dr.Cells[1].Value.ToString().Trim() != "...")
{
dr.Cells[0].Value = imageList1.Images[0];
_lineNumber = _dataGridView.Rows.Count;//追加药添加到最后一行
_lineNumber = _dataGridView.Rows.Count - 1;//追加药添加到最后一行
}
else
{
@ -549,6 +548,7 @@ namespace AIMS.PublicUI.UI
dr.Cells[7].Value = _dataGridView.Rows[e.RowIndex].Cells[7].Value;//浓度单位
dr.Cells[8].Value = _dataGridView.Rows[e.RowIndex].Cells[8].Value;//速度
dr.Cells[9].Value = _dataGridView.Rows[e.RowIndex].Cells[9].Value;//速度单位
dr.Cells[10].Value = _dataGridView.Rows[e.RowIndex].Cells[10].Value;//剂量
DateTime starttime = DateTime.Now;
try
{
@ -567,12 +567,11 @@ namespace AIMS.PublicUI.UI
if (_dataGridView.Rows[e.RowIndex].Cells[1].Value.ToString() != " ..." && _dataGridView.Rows[e.RowIndex + 1].Cells[1].Value.ToString() == " ...")
{
_lineNumber = _dataGridView.Rows.Count;//追加药添加到最后一行
DataGridViewRow drc = new DataGridViewRow();
drc.CreateCells(_dataGridView);
drc.Cells[1].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[1].Value;
drc.Cells[0].Value = imageList1.Images[1];
_lineNumber = _dataGridView.Rows.Count;//追加药添加到最后一行
_lineNumber = _dataGridView.Rows.Count - 1;//追加药添加到最后一行
drc.Cells[4].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[4].Value;
drc.Cells[1].Tag = dr.Index;
drc.Cells[2].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[2].Value;
@ -586,6 +585,7 @@ namespace AIMS.PublicUI.UI
drc.Cells[7].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[7].Value;//浓度单位
drc.Cells[8].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[8].Value;//速度
drc.Cells[9].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[9].Value;//速度单位
drc.Cells[10].Value = _dataGridView.Rows[e.RowIndex + 1].Cells[10].Value;//剂量
drc.Cells[14].Value = starttime;//开始时间
_dataGridView.Rows.Insert(_lineNumber, drc);
}
@ -920,20 +920,14 @@ namespace AIMS.PublicUI.UI
switch (index)
{
case 0:
drugEffect = "术前加抗菌药";
break;
case 1:
drugEffect = "麻醉前用药";
break;
case 2:
case 1:
drugEffect = "术中加药";
break;
case 3:
case 2:
drugEffect = "术后镇痛药";
break;
case 4:
drugEffect = "麻醉诱导用药";
break;
}
int second = 0;
foreach (DataGridViewRow dr in _dataGridView.Rows)
@ -1014,6 +1008,11 @@ namespace AIMS.PublicUI.UI
drugsR.OperatorName = PublicMethod.OperatorName;
drugsR.OperateDate = DateTime.Now;
drugsR.DrugTypeId = DrugTypeId;
if (dr.Cells[17].Value != null)
drugsR.Access = dr.Cells[17].Value.ToString();
else
drugsR.Access = "";
if (dr.Tag == null)
{
@ -1060,6 +1059,7 @@ namespace AIMS.PublicUI.UI
if (oldDrug.DensityUnit != newDrug.DensityUnit) b = false;
if (oldDrug.BloodType != newDrug.BloodType) b = false;
if (oldDrug.DrugChannel != newDrug.DrugChannel) b = false;
if (oldDrug.Access != newDrug.Access ) b = false;
if (oldDrug.DrugBeginTime != null && newDrug.DrugBeginTime != null && oldDrug.DrugBeginTime.ToString("yyyy-MM-dd HH:mm") != newDrug.DrugBeginTime.ToString("yyyy-MM-dd HH:mm")) b = false;
if (oldDrug.IsContinue != newDrug.IsContinue) b = false;
if (oldDrug.DrugEndTime != newDrug.DrugEndTime && oldDrug.DrugEndTime.ToString("HH:mm") != newDrug.DrugEndTime.ToString("HH:mm")) b = false;
@ -1165,7 +1165,7 @@ namespace AIMS.PublicUI.UI
private void FullALLDGV()
{
//_record.FactDrugList.Sort(new FactDrugComparer());
_record.FactDrugList.Sort(new FactDrugComparer());
foreach (BasicDictionary bd in _drugEffectList)
{
if (bd.Name == "麻醉前用药")
@ -1203,21 +1203,6 @@ namespace AIMS.PublicUI.UI
{
x = this.HorizontalScroll.Value;
}
private void txtQuery_TextChanged(object sender, EventArgs e)
{
this.TabSelDrugs.SelectedTabChanged -= new System.EventHandler<DevComponents.DotNetBar.SuperTabStripSelectedTabChangedEventArgs>(this.superTabControl1_SelectedTabChanged);
TextBoxX box = sender as TextBoxX;
Panel panel = null;
DataTable dt = new DataTable();
TabSelDrugs.SelectedTab = AnesTab;
panel = AnesPanel;
//dt = BDrugs.GetCommonlyDrugs(string.Format(" and (d.Name like '%{0}%' or d.HCode like '%{0}%') ", box.Text));
FullCommonlyDrugs(dt, panel);
this.TabSelDrugs.SelectedTabChanged += new System.EventHandler<DevComponents.DotNetBar.SuperTabStripSelectedTabChangedEventArgs>(this.superTabControl1_SelectedTabChanged);
}
private void tabDrugs_SelectedTabChanged(object sender, SuperTabStripSelectedTabChangedEventArgs e)
{
DataTable dt = new DataTable();
@ -1281,11 +1266,6 @@ namespace AIMS.PublicUI.UI
DataTable dt = new DataTable();
Superitem = TabSelDrugs.SelectedTab;
if (TabSelDrugs.SelectedTab.Name == "AnesTab")
{
panel = AnesPanel;
dt = BDrugs.GetDrugsDataTable();
}
if (Superitem.Tag != null && Superitem.Tag.ToString() != "")
{
panel = (SuperTabControlPanel)Superitem.AttachedControl;
@ -1320,10 +1300,8 @@ namespace AIMS.PublicUI.UI
{
buttonX1.Text = "全部显示";
}
AnesTab.Visible = true;
FullALLDGV();
tabDrugs_SelectedTabChanged(null, null);
TabSelDrugs.SelectedTab = AnesTab;
}
SuperTabControl stc = new SuperTabControl();
@ -1331,10 +1309,6 @@ namespace AIMS.PublicUI.UI
{
try
{
//for (int i = TabSelDrugs.Tabs.Count; i > 1; i--)
//{
// TabSelDrugs.Tabs.RemoveAt(i - 1);
//}
for (int i = TabSelDrugs.Tabs.Count - 1; i >= 0; i--)
{
TabSelDrugs.Tabs.RemoveAt(i);
@ -1353,8 +1327,9 @@ namespace AIMS.PublicUI.UI
superTabControlPanel.TabItem = spt;
spt.AttachedControl = superTabControlPanel;
}
TabSelDrugs.SelectedTab = TabSelDrugs.Tabs[1] as SuperTabItem;
this.TabSelDrugs.SelectedTabChanged += new System.EventHandler<DevComponents.DotNetBar.SuperTabStripSelectedTabChangedEventArgs>(this.superTabControl1_SelectedTabChanged);
TabSelDrugs.SelectedTab = TabSelDrugs.Tabs[0] as SuperTabItem;
superTabControl1_SelectedTabChanged(null, null);
}
catch (Exception ex)
{

View File

@ -136,9 +136,9 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAu
CAAAAk1TRnQBSQFMAgEBAgEAAUABBgFAAQYBFAEAARQBAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFQ
AwABFAMAAQEBAAEgBgABGS4AA1UBrwKAAXcB/gMrAfwDKwH8AZkBiwFAAf0BoQGSAQAB/wGTAYIBAAH/
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
CAAAAk1TRnQBSQFMAgEBAgEAAXABBgFwAQYBFAEAARQBAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFQ
AwABFAMAAQEBAAEgBgABGS4AA1UBrwKAAX0B/gMrAfwDKwH8AZkBiwFAAf0BoQGSAQAB/wGTAYIBAAH/
AZYBhwFAAf0BowGUAQAB/wGjAZQBAAH/AaMBlAEAAf8DKwH8A2AB6P8ADQABkwGCAQAB/wNiAfYDbQH3
A20B9wNcAfgDgAH+AZcBhgEAAf8DbQH3AewB5wHkAf8B7AHnAeQB/wHsAecB5AH/A20B9wGTAYIBAAH/
/wANAAGTAYIBAAH/A2cB8gH/Av0C/wL9Av8C/QL/Av0B/wGbAYsBAAH/AysB/AH/Av0C/wL9Av8C/QL/
@ -149,29 +149,29 @@
Af0C/wH8Af0C/wH8Af0C/wL+Af8BkwGCAQAB//8ADQABkwGCAQAB/wNgAfMB/gH7AfwB/wH+AfsB/AH/
Af4B+wH8Af8B/gH7AfwB/wGbAYsBAAH/AysB/AH+AfsB/AH/Af4B+wH8Af8B/gH7AfwC/wL9Af8BkwGC
AQAB//QAA0cBgQNHAYIDRwGCA0cBggNHAYIDRwGCAYkCAAH/A00B+gNfAfsDXwH7A18B+wNfAfsBjQIA
Af8BpwGgAZAB/QNfAfsDXwH7A18B+wKoAZ8B/QGTAYIBAAH/8AADBgEIAmABWwHzAW0BUgFRAfcCWgFR
AfUCWgFRAfUCWgFRAfUCWgFRAfUBgQIAAf8DAAH/AV8BXgEyAfsBXwFeATIB+wFfAV4BMgH7Al8BMgH7
AYECAAH/A2AB4wNeAdMDXgHTA14B0wNdAdEDYAHU8AADCQELA00B+gJtAVEB9wHwAaIBAAH/AfABogEA
Af8B8AGiAQAB/wHwAaIBAAH/AYcCAAH/A1wB+AHwAaIBAAH/AfABogEAAf8B8AGiAQAB/wHwAaIBAAH/
AwAB/wM4AVwMAAM+AWoDDgES8AADCQELA00B+gNcAfgB6gGeAQAB/wHqAZ4BAAH/AeoBngEAAf8B6gGe
AQAB/wGMAgAB/wNNAfoB6gGeAQAB/wHqAZ4BAAH/AeoBngEAAf8B6gGeAQAB/wMAAf8DOAFcDAADOAFc
A18B1fAAAwkBCwNNAfoBagFoAUcB+QNqAfkDagH5A2oB+QNqAfkBhwIAAf8CbQFsAfcDagH5A2oB+QNq
AfkDagH5AwAB/wM4AVwMAAM1AVYDRgF98AADBwEJA00B+gGDAkAB/QFqAWgBRwH5AWoBaAFHAfkBagFo
AUcB+QFqAWgBRwH5AYECAAH/A00B+gFqAWgBRwH5AWoBaAFHAfkBagFoAUcB+QFqAWkBRgH5AYECAAH/
A1kBvgNPAZkDTwGZA08BmQNYAbcDUQGf8AAEAgNJAYUDSQGIA0kBiANJAYgDSQGIA0kBiAGLAgAB/wGP
AkAB/QOAAf4DgAH+A4AB/gGkAY0BQAH9AYsCAAH/AaYBmQGDAf0BqAGlAZYB/QGoAaUBlgH9AagBpQGW
Af0DgAH+AZMBggEAAf//AA0AAZMBggEAAf8DYAHzAf4B+gH7Af8B/gH6AfsB/wH+AfoB+wH/Af4B+gH7
Af8BmwGLAQAB/wMrAfwB/gH6AfsB/wH+AfoB+wH/Af4B+gH7Av8C/QH/AZMBggEAAf//AA0AAZMBggEA
Af8DYAHzAf4B+wH8Af8B/gH7AfwB/wH+AfsB/AH/AfsB+AH5Af8BmwGLAQAB/wMrAfwB/gH7AfwB/wH+
AfsB/AH/Af4B+wH8Av8C/QH/AZMBggEAAf//AA0AAm0BbAH3A1wB+AOAAf4DgAH+A4AB/gOAAf4BmAGH
AQAB/wMrAfwB1AHNAcIB/wHUAc0BwgH/AdQBzQHCAf8DgAH+AZMBggEAAf//AAkAAwMBBANQAZoBkgGC
AQAB/wKAAXMB/gKAAXMB/gKAAXMB/gGTAYIBAAH/AZMBggEAAf8BjgGBAQAB/wGTAYIBAAH/AZMBggEA
Af8BkwGCAQAB/wKAAXMB/gNaAb3/AAkAAwMBBAMSARcDIwEzAyMBMwMjATMDIwEzAyMBMwMjATMDIwEz
AyMBMwMjATMDIwEzAyMBMwMWAR7/AA0AAwUBBgMEAQUDBAEFAwQBBQMEBAUBBgMFAQYDBQEGAwUBBgMF
AQYDBQEGAwUBBgMDAQTwAAFCAU0BPgcAAT4DAAEoAwABUAMAARQDAAEBAQABAQUAAfAXAAP/AQAB/gEA
AQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEA
AQ8C/wcAAYABAAEPAv8JAAEPAv8IAAEBAc8C/wgAAQEBzwL/CAABAQHPAv8JAAEPAv8JAAEPAv8HAAH+
AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH8AQABDwL/BwAB/AEAAQ8C/wcAAf4BAAEPAv8HAAs=
Af8BpwGgAZAB/QNfAfsDXwH7A18B+wKoAZ8B/QGTAYIBAAH/8AADBgEIA2AB8wFtAVIBUQH3AloBWQH1
AloBWQH1AloBWQH1AloBWQH1AYECAAH/AwAB/wFfAV4BMgH7AV8BXgEyAfsBXwFeATIB+wJfATIB+wGB
AgAB/wNgAeMDXgHTA14B0wNeAdMDXQHRA2AB1PAAAwkBCwNNAfoCbQFRAfcB8AGiAQAB/wHwAaIBAAH/
AfABogEAAf8B8AGiAQAB/wGHAgAB/wNcAfgB8AGiAQAB/wHwAaIBAAH/AfABogEAAf8B8AGiAQAB/wMA
Af8DOAFcDAADPgFqAw4BEvAAAwkBCwNNAfoDXAH4AeoBngEAAf8B6gGeAQAB/wHqAZ4BAAH/AeoBngEA
Af8BjAIAAf8DTQH6AeoBngEAAf8B6gGeAQAB/wHqAZ4BAAH/AeoBngEAAf8DAAH/AzgBXAwAAzgBXANf
AdXwAAMJAQsDTQH6AWoBaAFHAfkDagH5A2oB+QNqAfkDagH5AYcCAAH/Am0BbAH3A2oB+QNqAfkDagH5
A2oB+QMAAf8DOAFcDAADNQFWA0YBffAAAwcBCQNNAfoBgwJAAf0BagFoAUcB+QFqAWgBRwH5AWoBaAFH
AfkBagFoAUcB+QGBAgAB/wNNAfoBagFoAUcB+QFqAWgBRwH5AWoBaAFHAfkBagFpAUYB+QGBAgAB/wNZ
Ab4DTwGZA08BmQNPAZkDWAG3A1EBn/AABAIDSQGFA0kBiANJAYgDSQGIA0kBiANJAYgBiwIAAf8BjwJA
Af0DgAH+A4AB/gOAAf4BpAGNAUAB/QGLAgAB/wGmAZkBgwH9AagBpQGWAf0BqAGlAZYB/QGoAaUBlgH9
A4AB/gGTAYIBAAH//wANAAGTAYIBAAH/A2AB8wH+AfoB+wH/Af4B+gH7Af8B/gH6AfsB/wH+AfoB+wH/
AZsBiwEAAf8DKwH8Af4B+gH7Af8B/gH6AfsB/wH+AfoB+wL/Av0B/wGTAYIBAAH//wANAAGTAYIBAAH/
A2AB8wH+AfsB/AH/Af4B+wH8Af8B/gH7AfwB/wH7AfgB+QH/AZsBiwEAAf8DKwH8Af4B+wH8Af8B/gH7
AfwB/wH+AfsB/AL/Av0B/wGTAYIBAAH//wANAAJtAWwB9wNcAfgDgAH+A4AB/gOAAf4DgAH+AZgBhwEA
Af8DKwH8AdQBzQHCAf8B1AHNAcIB/wHUAc0BwgH/A4AB/gGTAYIBAAH//wAJAAMDAQQDUAGaAZIBggEA
Af8CgAF5Af4CgAF5Af4CgAF5Af4BkwGCAQAB/wGTAYIBAAH/AY4BgQEAAf8BkwGCAQAB/wGTAYIBAAH/
AZMBggEAAf8CgAF5Af4DWgG9/wAJAAMDAQQDEgEXAyMBMwMjATMDIwEzAyMBMwMjATMDIwEzAyMBMwMj
ATMDIwEzAyMBMwMjATMDFgEe/wANAAMFAQYDBAEFAwQBBQMEAQUDBAQFAQYDBQEGAwUBBgMFAQYDBQEG
AwUBBgMFAQYDAwEE8AABQgFNAT4HAAE+AwABKAMAAVADAAEUAwABAQEAAQEFAAHwFwAD/wEAAf4BAAEP
Av8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEP
Av8HAAGAAQABDwL/CQABDwL/CAABAQHPAv8IAAEBAc8C/wgAAQEBzwL/CQABDwL/CQABDwL/BwAB/gEA
AQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/AEAAQ8C/wcAAfwBAAEPAv8HAAH+AQABDwL/BwAL
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@ -470,24 +470,25 @@
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(0, 142);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1035, 495);
this.groupBox2.Size = new System.Drawing.Size(1035, 519);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "手术患者";
//
// panel3
//
this.panel3.AutoScroll = true;
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(3, 17);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1029, 475);
this.panel3.Size = new System.Drawing.Size(1029, 499);
this.panel3.TabIndex = 0;
//
// frmSelectPatientNew2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1035, 637);
this.ClientSize = new System.Drawing.Size(1035, 661);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel1);

View File

@ -195,11 +195,11 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示");
return;
}
//if (operA.OrderOperationTime.Value.Date != DateTime.Now.Date && operA.OrderOperationTime.Value.Hour < 18)
//{
// MessageBox.Show("该手术预约时间不是当前日期 ,请确认后重新选择!", "系统提示");
// return;
//}
if (operA.OrderOperationTime.Value.Date != DateTime.Now.Date)// && operA.OrderOperationTime.Value.Hour < 20)
{
MessageBox.Show("该手术预约时间不是当前日期 ,请确认后重新选择!", "系统提示");
return;
}
DataTable dtOperationRecord = SelectPatient.GetTodayDoOpePatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()));
foreach (DataRow row in dtOperationRecord.Rows)
{
@ -392,6 +392,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
PublicMethod.SelectRoom = Convert.ToInt32(cboRoom.SelectedValue);
}
else
{
PublicMethod.SelectRoom = -1;
}
FillDgv();
}

View File

@ -6,6 +6,7 @@ using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DevComponents.Editors.DateTimeAdv;
using DocumentManagement;
using DrawGraph;
using Newtonsoft.Json;
using System;

View File

@ -83,7 +83,7 @@ namespace AIMS.OperationFront.UI
private void btnFind_Click(object sender, EventArgs e)
{
DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd"));
DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd 00:00:00"), dtpEndDate.Value.ToString("yyyy-MM-dd 23:59:59"));
string dept = "";
if (cboDepartment.Text!="" && cboDepartment.Text!="全部科室")
{

View File

@ -13,7 +13,6 @@ namespace AIMS.OperationFront.UI
{
public AIMSExtension.EditState State = new AIMSExtension.EditState();
public int EditApplyId = 0;
public bool IsJZ = false;
private PublicUI.UI.frmSelectDisease frmSelectDisease;
private PublicUI.UI.frmSelectOperationOne frmSelectOperation;
private PublicUI.UI.frmOperationCutType frmOperationCutType;
@ -51,7 +50,7 @@ namespace AIMS.OperationFront.UI
private PublicUI.UI.frmSelectPerson frmTourNurseSucceed = new PublicUI.UI.frmSelectPerson();
public SysConfig sysPass = BSysConfig.SelectSingle(" name='手术申请审核功能' ", null);
private DateTime OrderOperationTime;
public frmOperationApplyDetail()
{
InitializeComponent();
@ -99,9 +98,8 @@ namespace AIMS.OperationFront.UI
rboJZ.Checked = true;
if (EditOperationApplyObj.OperationType == "日间")
rboRJ.Checked = true;
if (EditOperationApplyObj.OrderOperationTime != null)
dtpOrderOperationTime.Value = EditOperationApplyObj.OrderOperationTime.Value;
//txtOperationTimeLeight.Text = EditOperationApplyObj.OperationTimeLeight.ToString();
OrderOperationTime = dtpOrderOperationTime.Value;
if (EditOperationApplyObj.IsReturnOperation == 1)
{
@ -279,95 +277,6 @@ namespace AIMS.OperationFront.UI
//txtOther.Text = EditOperationApplyObj.Other;
#endregion
try
{
if (IsJZ == false)
{
groupBox3.Visible = false;
this.Size = new Size(1140, 570);
}
else
{
groupBox3.Visible = true;
this.Size = new Size(1140, 670);
if (rboJZ.Checked == true)
{
cboOperationRoom.DisplayMember = "Name";
cboOperationRoom.ValueMember = "Id";
cboOperationRoom.DataSource = BOperationRoom.GetDataTable("IsValid=1");
cboOperationRoom.SelectedIndex = -1;
if (EditOperationApplyObj.PlanOperationTime != null)
dtpPlanOperationTime.Value = EditOperationApplyObj.PlanOperationTime.Value;
cboOperationRoom.SelectedValue = int.Parse(EditOperationApplyObj.OperationRoomId.ToString());
SelectAnesthesiaDoctorData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 5);
foreach (int RowId in SelectAnesthesiaDoctorData)
{
txtAnesthesiaDoctor.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectAnesthesiaDoctorData.Count > 0)
{
txtAnesthesiaDoctor.Text = txtAnesthesiaDoctor.Text.Substring(0, txtAnesthesiaDoctor.Text.LastIndexOf(" ,"));
}
SelectInstrumentNurseData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 6);
foreach (int RowId in SelectInstrumentNurseData)
{
txtInstrumentNurse.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectInstrumentNurseData.Count > 0)
{
txtInstrumentNurse.Text = txtInstrumentNurse.Text.Substring(0, txtInstrumentNurse.Text.LastIndexOf(" ,"));
}
SelectTourNurseData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 7);
foreach (int RowId in SelectTourNurseData)
{
txtTourNurse.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectTourNurseData.Count > 0)
{
txtTourNurse.Text = txtTourNurse.Text.Substring(0, txtTourNurse.Text.LastIndexOf(" ,"));
}
SelectAnesthesiaDoctorSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 8);
foreach (int RowId in SelectAnesthesiaDoctorSucceedData)
{
txtAnesthesiaDoctorSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectAnesthesiaDoctorSucceedData.Count > 0)
{
txtAnesthesiaDoctorSucceed.Text = txtAnesthesiaDoctorSucceed.Text.Substring(0, txtAnesthesiaDoctorSucceed.Text.LastIndexOf(" ,"));
}
SelectInstrumentNurseSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 9);
foreach (int RowId in SelectInstrumentNurseSucceedData)
{
txtInstrumentNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectInstrumentNurseSucceedData.Count > 0)
{
txtInstrumentNurseSucceed.Text = txtInstrumentNurseSucceed.Text.Substring(0, txtInstrumentNurseSucceed.Text.LastIndexOf(" ,"));
}
SelectTourNurseSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 10);
foreach (int RowId in SelectTourNurseSucceedData)
{
txtTourNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,";
}
if (SelectTourNurseSucceedData.Count > 0)
{
txtTourNurseSucceed.Text = txtTourNurseSucceed.Text.Substring(0, txtTourNurseSucceed.Text.LastIndexOf(" ,"));
}
}
}
}
catch (Exception ex)
{
AIMSExtension.PublicMethod.WriteLog(ex);
}
}
}
@ -919,6 +828,7 @@ namespace AIMS.OperationFront.UI
{
OperationApplyObj.OperationType = "择期";
}
if (State == AIMSExtension.EditState.ADD || OperationApplyObj.State <= 5)
OperationApplyObj.OrderOperationTime = DateTime.Parse(dtpOrderOperationTime.Value.ToString("yyyy-MM-dd HH:mm"));
//if (txtOperationTimeLeight.Text != "")
// OperationApplyObj.OperationTimeLeight = int.Parse(txtOperationTimeLeight.Text);
@ -974,13 +884,11 @@ namespace AIMS.OperationFront.UI
//{
HelperDB.DbHelperSQL.BeginTrans();
//Oris_PatientObj.Id = BOperationApply.SelectSingle(EditApplyId).Oris_PatientId;
//OperationApplyObj.Id = EditApplyId;
if (OperationApplyObj.PlanOperationTime != null && OperationApplyObj.PlanOperationTime.Value.Year != 1)
if (OperationApplyObj.PlanOperationTime != null && OperationApplyObj.PlanOperationTime.Value.Year != 1 && OperationApplyObj.State <= 5)
if (OperationApplyObj.OrderOperationTime.Value.Day != OperationApplyObj.PlanOperationTime.Value.Day)
{
OperationApplyObj.PlanOperationTime = OperationApplyObj.OrderOperationTime;
OperationApplyObj.PlanOrder = BOperationApply.GetMaxPlanOrder( OperationApplyObj.PlanOperationTime.Value, OperationApplyObj.OperationRoomId.Value) + 1;
OperationApplyObj.PlanOperationTime = OperationApplyObj.OrderOperationTime.Value;
OperationApplyObj.PlanOrder = BOperationApply.GetMaxPlanOrder(OperationApplyObj.PlanOperationTime.Value, OperationApplyObj.OperationRoomId.Value) + 1;
}
BOrisPatient.Update(Oris_PatientObj);
@ -992,27 +900,6 @@ namespace AIMS.OperationFront.UI
Close();
//}
}
if (IsJZ == true)
if (rboJZ.Checked == true && ValidInput2())
{
try
{
HelperDB.DbHelperSQL.BeginTrans();
int ApplyId = EditApplyId;
string PlanOperationTime = dtpPlanOperationTime.Value.ToString("yyyy-MM-dd HH:mm");
int OperationRoomId = int.Parse(cboOperationRoom.SelectedValue.ToString());
BOperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 4); //状态4 已排程
SaveSelectItem2(ApplyId, AIMSExtension.PublicMethod.SystemDate());
HelperDB.DbHelperSQL.CommitTrans();
this.Close();
}
catch
{
HelperDB.DbHelperSQL.RollbackTrans();
}
}
}
catch (Exception ex)
{
@ -1207,97 +1094,12 @@ namespace AIMS.OperationFront.UI
{
MessageBox.Show("手术室不能为空!");
}
//else if (DateTime.Parse(AIMSExtension.PublicMethod.SystemDate().ToString("yyyy-MM-dd HH:mm")) > DateTime.Parse(dtpPlanOperationTime.Value.ToString("yyyy-MM-dd HH:mm")))
//{
// MessageBox.Show("手术日期小于当前时间!");
//}
else
{
result = true;
}
return result;
}
private void SaveSelectItem2(int OperationApplyId, DateTime OperateDate)
{
ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 5);
foreach (int PersonId in SelectAnesthesiaDoctorData)
{
ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = OperationApplyId;
ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 5; // 麻醉医生
ApplyPersonDutyAnesthesiaDoctor.PersonId = PersonId;
ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyAnesthesiaDoctor.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor);
}
ApplyPersonDuty ApplyPersonDutyInstrumentNurse = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 6);
foreach (int PersonId in SelectInstrumentNurseData)
{
ApplyPersonDutyInstrumentNurse.OperationApplyId = OperationApplyId;
ApplyPersonDutyInstrumentNurse.PersonDutyId = 6; // 器械护士
ApplyPersonDutyInstrumentNurse.PersonId = PersonId;
ApplyPersonDutyInstrumentNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyInstrumentNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyInstrumentNurse.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurse);
}
ApplyPersonDuty ApplyPersonDutyTourNurse = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 7);
foreach (int PersonId in SelectTourNurseData)
{
ApplyPersonDutyTourNurse.OperationApplyId = OperationApplyId;
ApplyPersonDutyTourNurse.PersonDutyId = 7; // 巡回护士
ApplyPersonDutyTourNurse.PersonId = PersonId;
ApplyPersonDutyTourNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyTourNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyTourNurse.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyTourNurse);
}
ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctorSucceed = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 8);
foreach (int PersonId in SelectAnesthesiaDoctorSucceedData)
{
ApplyPersonDutyAnesthesiaDoctorSucceed.OperationApplyId = OperationApplyId;
ApplyPersonDutyAnesthesiaDoctorSucceed.PersonDutyId = 8; // 麻醉接台
ApplyPersonDutyAnesthesiaDoctorSucceed.PersonId = PersonId;
ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyAnesthesiaDoctorSucceed.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctorSucceed);
}
ApplyPersonDuty ApplyPersonDutyInstrumentNurseSucceed = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 9);
foreach (int PersonId in SelectInstrumentNurseSucceedData)
{
ApplyPersonDutyInstrumentNurseSucceed.OperationApplyId = OperationApplyId;
ApplyPersonDutyInstrumentNurseSucceed.PersonDutyId = 9; // 器械接台
ApplyPersonDutyInstrumentNurseSucceed.PersonId = PersonId;
ApplyPersonDutyInstrumentNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyInstrumentNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyInstrumentNurseSucceed.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurseSucceed);
}
ApplyPersonDuty ApplyPersonDutyTourNurseSucceed = new ApplyPersonDuty();
BApplyPersonDuty.Delete(OperationApplyId, 10);
foreach (int PersonId in SelectTourNurseSucceedData)
{
ApplyPersonDutyTourNurseSucceed.OperationApplyId = OperationApplyId;
ApplyPersonDutyTourNurseSucceed.PersonDutyId = 10; // 巡回接台
ApplyPersonDutyTourNurseSucceed.PersonId = PersonId;
ApplyPersonDutyTourNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
ApplyPersonDutyTourNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName;
ApplyPersonDutyTourNurseSucceed.OperateDate = OperateDate;
BApplyPersonDuty.Add(ApplyPersonDutyTourNurseSucceed);
}
}
private bool ValidInput()
{
bool result = false;
@ -1717,16 +1519,6 @@ namespace AIMS.OperationFront.UI
{
dtpOrderOperationTime.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd HH:mm");
}
//if (IsJZ == false)
//{
// groupBox3.Visible = false;
// this.Size = new Size(1140, 530);
//}
//else
//{
// groupBox3.Visible = true;
// this.Size = new Size(1140, 630);
//}
}
}
}

View File

@ -229,9 +229,9 @@ namespace AIMS.OperationFront.UI
private DataGridViewTextBoxColumn Index;
private DataGridViewTextBoxColumn DepartmentId;
private DataGridViewTextBoxColumn OperationDoctor;
private DataGridViewTextBoxColumn PlanTime;
private DataGridViewTextBoxColumn InHospitalNo;
private DataGridViewTextBoxColumn PatientName;
private DataGridViewTextBoxColumn InHospitalNo;
private DataGridViewTextBoxColumn PlanTime;
private DataGridViewTextBoxColumn Operation;
private DataGridViewTextBoxColumn OrderOperationTime;
private DataGridViewTextBoxColumn Remark;
@ -239,6 +239,7 @@ namespace AIMS.OperationFront.UI
private DataGridViewTextBoxColumn Diagnose;
private DataGridViewTextBoxColumn OperationType;
private DataGridViewTextBoxColumn Contagion;
private GridColumn gridColumn2;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpSearchTime;
/// <summary>
@ -275,6 +276,13 @@ namespace AIMS.OperationFront.UI
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
@ -356,17 +364,25 @@ namespace AIMS.OperationFront.UI
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle86 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle87 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle88 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.navigationPane1 = new DevComponents.DotNetBar.NavigationPane();
this.navigationPanePanel1 = new DevComponents.DotNetBar.NavigationPanePanel();
this.groupBoxsel = new System.Windows.Forms.GroupBox();
this.dgvApplyOrDoctor = new DevComponents.DotNetBar.Controls.DataGridViewX();
this.Column1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DepartmentId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OperationDoctor = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PatientName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InHospitalNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PlanTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Operation = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OrderOperationTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AnaesthesiaMethodId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Diagnose = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OperationType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Contagion = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel3 = new System.Windows.Forms.Panel();
this.labelWeek = new System.Windows.Forms.Label();
this.txtQuery = new DevComponents.DotNetBar.Controls.TextBoxX();
@ -377,7 +393,7 @@ namespace AIMS.OperationFront.UI
this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
this.navigationPanePanel4 = new DevComponents.DotNetBar.NavigationPanePanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.dgvInstrumentNurse = new DataGridView();
this.dgvInstrumentNurse = new System.Windows.Forms.DataGridView();
this.dataGridViewCheckBoxColumn3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn49 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.iName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -399,7 +415,7 @@ namespace AIMS.OperationFront.UI
this.buttonInstrumentNurse = new DevComponents.DotNetBar.ButtonItem();
this.navigationPanePanel5 = new DevComponents.DotNetBar.NavigationPanePanel();
this.v = new System.Windows.Forms.GroupBox();
this.dgvTourNurse = new DataGridView();
this.dgvTourNurse = new System.Windows.Forms.DataGridView();
this.dataGridViewCheckBoxColumn4 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn60 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -421,7 +437,7 @@ namespace AIMS.OperationFront.UI
this.buttonItemTourNurse = new DevComponents.DotNetBar.ButtonItem();
this.navigationPanePanel2 = new DevComponents.DotNetBar.NavigationPanePanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dgvWorkers = new DataGridView();
this.dgvWorkers = new System.Windows.Forms.DataGridView();
this.Check = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.oName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -562,21 +578,7 @@ namespace AIMS.OperationFront.UI
this.dataGridViewTextBoxColumn46 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn47 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn48 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DepartmentId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OperationDoctor = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PlanTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InHospitalNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PatientName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Operation = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OrderOperationTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AnaesthesiaMethodId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Diagnose = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OperationType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Contagion = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gridColumn2 = new DevComponents.DotNetBar.SuperGrid.GridColumn();
this.navigationPane1.SuspendLayout();
this.navigationPanePanel1.SuspendLayout();
this.groupBoxsel.SuspendLayout();
@ -742,9 +744,9 @@ namespace AIMS.OperationFront.UI
this.Index,
this.DepartmentId,
this.OperationDoctor,
this.PlanTime,
this.InHospitalNo,
this.PatientName,
this.InHospitalNo,
this.PlanTime,
this.Operation,
this.OrderOperationTime,
this.Remark,
@ -783,6 +785,151 @@ namespace AIMS.OperationFront.UI
this.dgvApplyOrDoctor.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvApplyOrDoctor_CellDoubleClick);
this.dgvApplyOrDoctor.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvApplyOrDoctor_ColumnHeaderMouseClick);
//
// Column1
//
this.Column1.HeaderText = "";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.TrueValue = "1";
this.Column1.Width = 30;
//
// Id
//
this.Id.DataPropertyName = "ApplyId";
this.Id.HeaderText = "编号";
this.Id.Name = "Id";
this.Id.ReadOnly = true;
this.Id.Visible = false;
//
// Index
//
this.Index.DataPropertyName = "ApplyId";
this.Index.HeaderText = "序号";
this.Index.Name = "Index";
this.Index.ReadOnly = true;
this.Index.Visible = false;
this.Index.Width = 40;
//
// DepartmentId
//
this.DepartmentId.DataPropertyName = "ApplyDepName";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DepartmentId.DefaultCellStyle = dataGridViewCellStyle2;
this.DepartmentId.HeaderText = "科室";
this.DepartmentId.Name = "DepartmentId";
this.DepartmentId.ReadOnly = true;
this.DepartmentId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.DepartmentId.Width = 80;
//
// OperationDoctor
//
this.OperationDoctor.DataPropertyName = "OperationDoctor";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.OperationDoctor.DefaultCellStyle = dataGridViewCellStyle3;
this.OperationDoctor.HeaderText = "医师";
this.OperationDoctor.Name = "OperationDoctor";
this.OperationDoctor.ReadOnly = true;
this.OperationDoctor.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.OperationDoctor.Width = 60;
//
// PatientName
//
this.PatientName.DataPropertyName = "PatInfo";
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 11F);
this.PatientName.DefaultCellStyle = dataGridViewCellStyle4;
this.PatientName.HeaderText = "患者姓名";
this.PatientName.Name = "PatientName";
this.PatientName.ReadOnly = true;
this.PatientName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PatientName.Width = 125;
//
// InHospitalNo
//
this.InHospitalNo.DataPropertyName = "MdrecNo";
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.InHospitalNo.DefaultCellStyle = dataGridViewCellStyle5;
this.InHospitalNo.HeaderText = "住院号";
this.InHospitalNo.Name = "InHospitalNo";
this.InHospitalNo.ReadOnly = true;
this.InHospitalNo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.InHospitalNo.Width = 90;
//
// PlanTime
//
this.PlanTime.DataPropertyName = "ApplyTime";
this.PlanTime.HeaderText = "申请时间";
this.PlanTime.Name = "PlanTime";
this.PlanTime.ReadOnly = true;
this.PlanTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PlanTime.Width = 90;
//
// Operation
//
this.Operation.DataPropertyName = "ApplyOperationInfoName";
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 11F);
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Operation.DefaultCellStyle = dataGridViewCellStyle6;
this.Operation.HeaderText = "手术";
this.Operation.Name = "Operation";
this.Operation.ReadOnly = true;
this.Operation.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Operation.Width = 200;
//
// OrderOperationTime
//
this.OrderOperationTime.DataPropertyName = "OrderOperationTime";
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F);
this.OrderOperationTime.DefaultCellStyle = dataGridViewCellStyle7;
this.OrderOperationTime.HeaderText = "时间";
this.OrderOperationTime.Name = "OrderOperationTime";
this.OrderOperationTime.ReadOnly = true;
this.OrderOperationTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.OrderOperationTime.Visible = false;
this.OrderOperationTime.Width = 65;
//
// Remark
//
this.Remark.DataPropertyName = "OperationRemark";
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F);
this.Remark.DefaultCellStyle = dataGridViewCellStyle8;
this.Remark.HeaderText = "备注";
this.Remark.Name = "Remark";
this.Remark.ReadOnly = true;
this.Remark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// AnaesthesiaMethodId
//
this.AnaesthesiaMethodId.DataPropertyName = "AnaesthesiaMethodName";
this.AnaesthesiaMethodId.HeaderText = "拟施麻醉";
this.AnaesthesiaMethodId.Name = "AnaesthesiaMethodId";
this.AnaesthesiaMethodId.ReadOnly = true;
this.AnaesthesiaMethodId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Diagnose
//
this.Diagnose.DataPropertyName = "ApplyDiagnoseInfoName";
this.Diagnose.HeaderText = "术前诊断";
this.Diagnose.Name = "Diagnose";
this.Diagnose.ReadOnly = true;
this.Diagnose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// OperationType
//
this.OperationType.DataPropertyName = "OperationType";
this.OperationType.HeaderText = "类型";
this.OperationType.Name = "OperationType";
this.OperationType.ReadOnly = true;
//
// Contagion
//
this.Contagion.DataPropertyName = "Contagion";
this.Contagion.HeaderText = "感染筛查";
this.Contagion.Name = "Contagion";
this.Contagion.ReadOnly = true;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.White;
@ -2092,6 +2239,7 @@ namespace AIMS.OperationFront.UI
this.dgvDetail.PrimaryGrid.Columns.Add(this.colTourNurse);
this.dgvDetail.PrimaryGrid.Columns.Add(this.colRemarks);
this.dgvDetail.PrimaryGrid.Columns.Add(this.colDel);
this.dgvDetail.PrimaryGrid.Columns.Add(this.gridColumn2);
background2.Color1 = System.Drawing.Color.Transparent;
this.dgvDetail.PrimaryGrid.DefaultVisualStyles.CellStyles.Default.Background = background2;
this.dgvDetail.PrimaryGrid.ImmediateResize = true;
@ -3267,150 +3415,10 @@ namespace AIMS.OperationFront.UI
this.dataGridViewTextBoxColumn48.HeaderText = "类别";
this.dataGridViewTextBoxColumn48.Name = "dataGridViewTextBoxColumn48";
//
// Column1
// gridColumn2
//
this.Column1.HeaderText = "";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.TrueValue = "1";
this.Column1.Width = 30;
//
// Id
//
this.Id.DataPropertyName = "ApplyId";
this.Id.HeaderText = "编号";
this.Id.Name = "Id";
this.Id.ReadOnly = true;
this.Id.Visible = false;
//
// Index
//
this.Index.DataPropertyName = "ApplyId";
this.Index.HeaderText = "序号";
this.Index.Name = "Index";
this.Index.ReadOnly = true;
this.Index.Visible = false;
this.Index.Width = 40;
//
// DepartmentId
//
this.DepartmentId.DataPropertyName = "ApplyDepName";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DepartmentId.DefaultCellStyle = dataGridViewCellStyle2;
this.DepartmentId.HeaderText = "科室";
this.DepartmentId.Name = "DepartmentId";
this.DepartmentId.ReadOnly = true;
this.DepartmentId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.DepartmentId.Width = 80;
//
// OperationDoctor
//
this.OperationDoctor.DataPropertyName = "OperationDoctor";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.OperationDoctor.DefaultCellStyle = dataGridViewCellStyle3;
this.OperationDoctor.HeaderText = "医师";
this.OperationDoctor.Name = "OperationDoctor";
this.OperationDoctor.ReadOnly = true;
this.OperationDoctor.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.OperationDoctor.Width = 60;
//
// PlanTime
//
this.PlanTime.DataPropertyName = "ApplyTime";
this.PlanTime.HeaderText = "申请时间";
this.PlanTime.Name = "PlanTime";
this.PlanTime.ReadOnly = true;
this.PlanTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PlanTime.Width = 90;
//
// InHospitalNo
//
this.InHospitalNo.DataPropertyName = "MdrecNo";
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.InHospitalNo.DefaultCellStyle = dataGridViewCellStyle4;
this.InHospitalNo.HeaderText = "住院号";
this.InHospitalNo.Name = "InHospitalNo";
this.InHospitalNo.ReadOnly = true;
this.InHospitalNo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.InHospitalNo.Width = 90;
//
// PatientName
//
this.PatientName.DataPropertyName = "PatientName";
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 11F);
this.PatientName.DefaultCellStyle = dataGridViewCellStyle5;
this.PatientName.HeaderText = "姓名";
this.PatientName.Name = "PatientName";
this.PatientName.ReadOnly = true;
this.PatientName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PatientName.Width = 125;
//
// Operation
//
this.Operation.DataPropertyName = "ApplyOperationInfoName";
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 11F);
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Operation.DefaultCellStyle = dataGridViewCellStyle6;
this.Operation.HeaderText = "手术";
this.Operation.Name = "Operation";
this.Operation.ReadOnly = true;
this.Operation.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Operation.Width = 200;
//
// OrderOperationTime
//
this.OrderOperationTime.DataPropertyName = "OrderOperationTime";
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F);
this.OrderOperationTime.DefaultCellStyle = dataGridViewCellStyle7;
this.OrderOperationTime.HeaderText = "时间";
this.OrderOperationTime.Name = "OrderOperationTime";
this.OrderOperationTime.ReadOnly = true;
this.OrderOperationTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.OrderOperationTime.Visible = false;
this.OrderOperationTime.Width = 65;
//
// Remark
//
this.Remark.DataPropertyName = "OperationRemark";
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F);
this.Remark.DefaultCellStyle = dataGridViewCellStyle8;
this.Remark.HeaderText = "备注";
this.Remark.Name = "Remark";
this.Remark.ReadOnly = true;
this.Remark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// AnaesthesiaMethodId
//
this.AnaesthesiaMethodId.DataPropertyName = "AnaesthesiaMethodName";
this.AnaesthesiaMethodId.HeaderText = "拟施麻醉";
this.AnaesthesiaMethodId.Name = "AnaesthesiaMethodId";
this.AnaesthesiaMethodId.ReadOnly = true;
this.AnaesthesiaMethodId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Diagnose
//
this.Diagnose.DataPropertyName = "ApplyDiagnoseInfoName";
this.Diagnose.HeaderText = "术前诊断";
this.Diagnose.Name = "Diagnose";
this.Diagnose.ReadOnly = true;
this.Diagnose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// OperationType
//
this.OperationType.DataPropertyName = "OperationType";
this.OperationType.HeaderText = "类型";
this.OperationType.Name = "OperationType";
this.OperationType.ReadOnly = true;
//
// Contagion
//
this.Contagion.DataPropertyName = "Contagion";
this.Contagion.HeaderText = "感染筛查";
this.Contagion.Name = "Contagion";
this.Contagion.ReadOnly = true;
this.gridColumn2.Name = "state";
this.gridColumn2.Visible = false;
//
// frmOperationSchedulePlan
//
@ -4144,12 +4152,15 @@ namespace AIMS.OperationFront.UI
if (selApply == null || selApply == "") return;
try
{
OperationApply opeapply = BOperationApply.SelectSingle( int.Parse(selApply) , RecursiveType.None, 0);
if (opeapply.State > 5) { MessageBox.Show("该申请已手术 请于术中切换手术间!"); return; }
OperationRoom opeRoom = (sender as ToolStripItem).Tag as OperationRoom;
BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value, dtpSearchTime.Value);
BOperationApply.UpdteOperationOrder(dtpSearchTime.Value, RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value);
outMsg = string.Format("{2} 更换 患者:{0} 手术间{1} 成功!", grCurrentSub.Cells["Patient"].Value, opeRoom, RoomCardManage.lastSelectOpeRoom.operationRoom.Name);
RoomCardManage.WriteMsg(rtbLog, outMsg);
LoadOperationInfo(RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value);
LoadOperationInfo(opeRoom.Id.Value);
LoadOperationInfoDgv(CurrentRoom);
dgvDetail.PrimaryGrid.Rows.Remove(grCurrentSub);
}
catch (Exception ex)
@ -4386,6 +4397,7 @@ namespace AIMS.OperationFront.UI
return;
grCurrentSub = (GridRow)e.GridCell.GridRow;
int iRowID = int.Parse(grCurrentSub.Cells["Id"].Value.ToString());
//int StateId = int.Parse(grCurrentSub.Cells["State"].Value.ToString());
selApply = iRowID.ToString();
RoomCardManage.IsFillAll = false;
if (e.GridCell.Value != null)
@ -4404,10 +4416,12 @@ namespace AIMS.OperationFront.UI
{
BApplyPersonDuty.Delete(" PersonDutyId in(5,6,7,8,9,10) and OperationApplyId=" + iRowID, null);
outMsg = string.Format("{2} 移除 患者:{0} 手术:{1} 成功!", grCurrentSub.Cells["Patient"].Value, grCurrentSub.Cells["OperationName"].Value, RoomCardManage.lastSelectOpeRoom.operationRoom.Name);
BOperationApply.UpdteOperationOrder(dtpSearchTime.Value, RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value);
RoomCardManage.WriteMsg(rtbLog, outMsg);
dgvDetail.PrimaryGrid.Rows.Remove(grCurrentSub);
LoadSelectDate("");
LoadOperationInfo();
//LoadOperationInfo(RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value);
LoadOperationInfoDgv(CurrentRoom);
}
#endregion
}

View File

@ -251,7 +251,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD+
CAAAAk1TRnQBSQFMAgEBAgEAAXwBEwF8ARMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAZQBEwGUARMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -1,6 +1,7 @@
using AIMS.DocManager;
using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DCSoft.Writer;
using DCSoft.Writer.Data;
using DCSoft.Writer.Dom;
@ -164,6 +165,7 @@ namespace AIMS.OremrUserControl
}
}
}
DocumentExtension.SetDocumentDefaultValue(TModel.XmlFileName,myEditControl.Document,Patient);
}
string xmlStatic = DocumentDAL.GetEventXml(DModel.TemplateId);
if (xmlStatic != string.Empty)
@ -323,17 +325,17 @@ namespace AIMS.OremrUserControl
ClearT();
}
myEditControl.Document.Modified = false;
//更新ASA分级与心功能分级
if (DModel.XmlFileName == "麻醉术前访视单")
{
var asa = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
&& (x as XTextInputFieldElement).ToolTip == "ASA分级").FirstOrDefault();
string strASA = asa == null ? "" : asa.Text;
var hf = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
&& (x as XTextInputFieldElement).ToolTip == "心功能分级").FirstOrDefault();
string strH = hf == null ? "" : hf.Text;
BOperationApply.UpdateASA(Patient.ApplyId, strASA, strH);
}
////更新ASA分级与心功能分级
//if (DModel.XmlFileName == "麻醉术前访视单")
//{
// var asa = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
// && (x as XTextInputFieldElement).ToolTip == "ASA分级").FirstOrDefault();
// string strASA = asa == null ? "" : asa.Text;
// var hf = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
// && (x as XTextInputFieldElement).ToolTip == "心功能分级").FirstOrDefault();
// string strH = hf == null ? "" : hf.Text;
// BOperationApply.UpdateASA(Patient.ApplyId, strASA, strH);
//}
new frmMessageBox().Show();
}

View File

@ -11,6 +11,7 @@ using DevComponents.DotNetBar.SuperGrid;
using AIMSExtension;
using AIMSBLL;
using System.Drawing.Drawing2D;
using DCSoftDotfuscate;
namespace AIMS.OremrUserControl
{
@ -136,15 +137,34 @@ namespace AIMS.OremrUserControl
private void tsDel_Click(object sender, EventArgs e)
{
if (pDataTable.Rows.Count <= 0) return;
if (pDataTable.Rows.Count > 0)
{
string patientname = "";
foreach (DataRow item in pDataTable.Rows)
{
if (!"1,2,3,4,5".Contains(item["StateId"].ToString()))
patientname += item["PatientName"] + " ";
}
if (patientname != "")
{
MessageBox.Show("患者:" + patientname.Trim() + " 已手术 无法撤销!");
}
}
//AnesthesiaDoctor = null, TourNurse = null, InstrumentNurse = null,
string DoctorNuresName = " PlanOperationTime = null,OperationRoomId = null, PlanOrder=null , State = 2 ";
if (BOperationApply.SaveDoctorByRommTime(DoctorNuresName, PlanOperationTime, operationRoom.Id.Value) > 0)
{
foreach (DataRow item in pDataTable.Rows)
{
if ("1,2,3,4,5".Contains(item["StateId"].ToString()))
{
string OperationApplyId = item["ApplyId"].ToString();
BApplyPersonDuty.Delete(" PersonDutyId in(5,6,7,8,9,10) and OperationApplyId=" + OperationApplyId, null);
}
}
BOperationApply.UpdteOperationOrder(PlanOperationTime, operationRoom.Id.Value);
dgvDetail.PrimaryGrid.Rows.Clear();
lblNurse2.Text = "巡回护士";
lblNurse2.ForeColor = Color.Gray;
@ -233,7 +253,7 @@ namespace AIMS.OremrUserControl
string sAnesthesiaDoctor = item["AnesthesiaDoctor"].ToString();
string sInstrumentNurse = item["InstrumentNurse"].ToString();
string sTourNurse = item["TourNurse"].ToString();
GridRow grNew = new GridRow(item["ApplyId"].ToString(), item["PlanOrder"].ToString(), string.Format("{0}{1}", item["PatientName"].ToString(), ""), item["MdrecNo"].ToString(), item["ApplyDepName"].ToString() + "-" + item["SickBed"].ToString(), sOperationDoctor, item["ApplyOperationInfoName"].ToString(), DateTime.Parse(item["OrderOperationTime"].ToString()).ToString("HH:mm"), sAnesthesiaDoctor, sInstrumentNurse, sTourNurse, item["OperationRemark"].ToString(), "Χ");
GridRow grNew = new GridRow(item["ApplyId"].ToString(), item["PlanOrder"].ToString(), string.Format("{0}{1}", item["PatientName"].ToString(), ""), item["MdrecNo"].ToString(), item["ApplyDepName"].ToString() + "-" + item["SickBed"].ToString(), sOperationDoctor, item["ApplyOperationInfoName"].ToString(), DateTime.Parse(item["OrderOperationTime"].ToString()).ToString("HH:mm"), sAnesthesiaDoctor, sInstrumentNurse, sTourNurse, item["OperationRemark"].ToString(), "Χ", item["StateId"].ToString());
if (item["Contagion"].ToString() != "" && item["Contagion"].ToString() != "无" && item["Contagion"].ToString() != "未报")
{
grNew.CellStyles.Default.Background.Color1 = Color.Purple;
@ -425,9 +445,12 @@ namespace AIMS.OremrUserControl
{
if (pDataTable.Rows.Count <= 0) return;
OperationRoom opeRoom = (sender as ToolStripItem).Tag as OperationRoom;
string PlanOperationRoom = "OperationRoomId = " + opeRoom.Id;
if (BOperationApply.SaveDoctorByRommTime(PlanOperationRoom, PlanOperationTime, operationRoom.Id.Value) > 0)
if (BOperationApply.SaveRoomOrderByTime(opeRoom.Id.Value , PlanOperationTime, operationRoom.Id.Value) > 0)
{
//刷新当前间台次
BOperationApply.UpdteOperationOrder(PlanOperationTime, operationRoom.Id.Value);
//更新转入手术间台次
BOperationApply.UpdteOperationOrder(PlanOperationTime, opeRoom.Id.Value);
dgvDetail.PrimaryGrid.Rows.Clear();
lblNurse2.Text = "巡回护士";
lblNurse2.ForeColor = Color.Gray;

View File

@ -30,18 +30,18 @@ namespace AIMS
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Process instance = RunningInstance();
if (instance == null)
{
//Process instance = RunningInstance();
//if (instance == null)
//{
UpdateProgram(args);
Task.Factory.StartNew(() => { PreLoad(); });
Application.Run(new FormLogin());
}
else
{
/*1.2 已经有一个实例在运行*/
HandleRunningInstance(instance);
}
//}
//else
//{
// /*1.2 已经有一个实例在运行*/
// HandleRunningInstance(instance);
//}
}
static void PreLoad()

View File

@ -114,7 +114,6 @@
<Compile Include="BLL\AutoGenerate\BPersonDuty.cs" />
<Compile Include="BLL\AutoGenerate\BPharmaCology.cs" />
<Compile Include="BLL\AutoGenerate\BPrintDoc.cs" />
<Compile Include="BLL\AutoGenerate\BPrintDocument.cs" />
<Compile Include="BLL\AutoGenerate\BProgramException.cs" />
<Compile Include="BLL\AutoGenerate\BProvider.cs" />
<Compile Include="BLL\AutoGenerate\BQualityControl.cs" />
@ -182,7 +181,6 @@
<Compile Include="BLL\Extension\BPersonDuty.cs" />
<Compile Include="BLL\Extension\BPharmaCology.cs" />
<Compile Include="BLL\Extension\BPrintDoc.cs" />
<Compile Include="BLL\Extension\BPrintDocument.cs" />
<Compile Include="BLL\Extension\BProgramException.cs" />
<Compile Include="BLL\Extension\BProvider.cs" />
<Compile Include="BLL\Extension\BRole.cs" />
@ -256,7 +254,6 @@
<Compile Include="DAL\AutoGenerate\DPersonDuty.cs" />
<Compile Include="DAL\AutoGenerate\DPharmaCology.cs" />
<Compile Include="DAL\AutoGenerate\DPrintDoc.cs" />
<Compile Include="DAL\AutoGenerate\DPrintDocument.cs" />
<Compile Include="DAL\AutoGenerate\DProgramException.cs" />
<Compile Include="DAL\AutoGenerate\DProvider.cs" />
<Compile Include="DAL\AutoGenerate\DQualityControl.cs" />
@ -322,7 +319,6 @@
<Compile Include="DAL\Extension\DPersonDuty.cs" />
<Compile Include="DAL\Extension\DPharmaCology.cs" />
<Compile Include="DAL\Extension\DPrintDoc.cs" />
<Compile Include="DAL\Extension\DPrintDocument.cs" />
<Compile Include="DAL\Extension\DProgramException.cs" />
<Compile Include="DAL\Extension\DProvider.cs" />
<Compile Include="DAL\Extension\DRole.cs" />
@ -379,7 +375,6 @@
<Compile Include="Model\AutoGenerate\PersonDuty.cs" />
<Compile Include="Model\AutoGenerate\PharmaCology.cs" />
<Compile Include="Model\AutoGenerate\PrintDoc.cs" />
<Compile Include="Model\AutoGenerate\PrintDocument.cs" />
<Compile Include="Model\AutoGenerate\ProgramException.cs" />
<Compile Include="Model\AutoGenerate\Provider.cs" />
<Compile Include="Model\AutoGenerate\QualityControl.cs" />
@ -438,7 +433,6 @@
<Compile Include="Model\Extension\PersonDuty.cs" />
<Compile Include="Model\Extension\PharmaCology.cs" />
<Compile Include="Model\Extension\PrintDoc.cs" />
<Compile Include="Model\Extension\PrintDocument.cs" />
<Compile Include="Model\Extension\ProgramException.cs" />
<Compile Include="Model\Extension\Provider.cs" />
<Compile Include="Model\Extension\Role.cs" />
@ -516,7 +510,6 @@
<Compile Include="ObjectQuery\PersonMap.cs" />
<Compile Include="ObjectQuery\PharmaCologyMap.cs" />
<Compile Include="ObjectQuery\PrintDocMap.cs" />
<Compile Include="ObjectQuery\PrintDocumentMap.cs" />
<Compile Include="ObjectQuery\ProgramExceptionMap.cs" />
<Compile Include="ObjectQuery\ProviderMap.cs" />
<Compile Include="ObjectQuery\QualityControlConfigMap.cs" />

View File

@ -1,160 +0,0 @@
using System;
using AIMSDAL;
using AIMSModel;
using System.Collections;
using System.Collections.Generic;
namespace AIMSBLL
{
public partial class BPrintDocument
{
#region
/// <summary>
/// 插入实体
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
public static int Insert(PrintDocument printDocument)
{
return DPrintDocument.Insert(printDocument);
}
#endregion
#region
/// <summary>
/// 删除实体
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
public static int Delete(PrintDocument printDocument)
{
return DPrintDocument.Delete(printDocument);
}
/// <summary>
/// 根据对象查询语句删除
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
public static int Delete(string oql, ParameterList parameters)
{
return DPrintDocument.Delete(oql,parameters);
}
#endregion
#region
/// <summary>
/// 更新实体
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
public static int Update(PrintDocument printDocument)
{
return DPrintDocument.Update(printDocument);
}
/// <summary>
/// 根据对象查询语句更新实体
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
public static int Update(string oql, ParameterList parameters)
{
return DPrintDocument.Update(oql,parameters);
}
#endregion
#region
/// <summary>
/// \查询实体集合
/// </summary>
/// <returns>实体类对象集合</returns>
public static List<PrintDocument> Select()
{
return DPrintDocument.Select();
}
/// <summary>
/// 递归查询实体集合
/// </summary>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
public static List<PrintDocument> Select(RecursiveType recursiveType, int recursiveDepth)
{
return DPrintDocument.Select(recursiveType, recursiveDepth);
}
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>实体类对象集合</returns>
public static List<PrintDocument> Select(string oql, ParameterList parameters)
{
return DPrintDocument.Select(oql, parameters);
}
/// <summary>
/// 根据对象查询语句递归查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
public static List<PrintDocument> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
{
return DPrintDocument.Select(oql, parameters, recursiveType, recursiveDepth);
}
#endregion
#region
/// <summary>
/// 更据对象查询语句查询单个实体
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>实体对象</returns>
public static PrintDocument SelectSingle(string oql, ParameterList parameters)
{
return DPrintDocument.SelectSingle(oql, parameters);
}
/// <summary>
/// 更据对象查询语句递归查询单个实体
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
public static PrintDocument SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
return DPrintDocument.SelectSingle(oql, parameters, recursiveType, recursiveDepth);
}
/// <summary>
/// 按主键字段查询特定实体
/// </summary>
/// <param name="id">主键值</param>
/// <returns>实体类对象</returns>
public static PrintDocument SelectSingle(int? id)
{
return DPrintDocument.SelectSingle(id);
}
/// <summary>
/// 更据主键递归查询单个实体
/// </summary>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
public static PrintDocument SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
{
return DPrintDocument.SelectSingle(id, recursiveType, recursiveDepth);
}
#endregion
}
}

View File

@ -17,22 +17,10 @@ namespace AIMSBLL
DOperationApply.Add(OperationApplyObj);
}
//public static void Update(OperationApply OperationApplyObj)
//{
// DOperationApply.Update(OperationApplyObj);
//}
public static void UpdatePlanOrder(int ApplyId, int PlanOrder)
{
DOperationApply.UpdatePlanOrder(ApplyId, PlanOrder);
}
public static void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder)
{
DOperationApply.UpdateOperationRoom(ApplyId, OperationRoomId, MaxPlanOrder);
}
public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting)
{
DOperationApply.UpdateASA(ApplyId, ASA, HeartFunctionLevel, IsFasting);
}
public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel)
{
DOperationApply.UpdateASA(ApplyId, ASA, HeartFunctionLevel);
@ -75,9 +63,10 @@ namespace AIMSBLL
{
DOperationApply.UpdateApplyState(ApplyId, State);
}
public static void UpdateApplyRoom(int ApplyId, int room,DateTime PlanOperationTime)
public static void UpdateApplyRoom(int ApplyId, int room, DateTime PlanOperationTime)
{
DOperationApply.UpdateApplyRoom(ApplyId, room,PlanOperationTime);
int PlanOrder = BOperationApply.GetMaxPlanOrder(PlanOperationTime, room) + 1;
DOperationApply.UpdateApplyRoom(ApplyId, room, PlanOperationTime, PlanOrder);
}
public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State)
{
@ -87,30 +76,6 @@ namespace AIMSBLL
{
DOperationApply.UpdateStopOperation(ApplyId, Content);
}
public static DataTable GetOperationFrontByApplyId(List<int> ApplyIdList)
{
return DOperationApply.GetOperationFrontByApplyId(ApplyIdList);
}
/// <summary>
/// 排程手术小卡片数据集
/// </summary>
/// <param name="PlanOperationTime"></param>
/// <param name="OperationRoomId"></param>
/// <returns></returns>
public static DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId)
{
return DOperationApply.GetOperationRoomDataTable(PlanOperationTime, OperationRoomId);
}
public static DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId)
{
return DOperationApply.GetPlanOperationDataTable(PlanOperationTime, OperationRoomId);
}
public static void UpdateOperationRoom(int ApplyId, int OperationRoomId)
{
DOperationApply.UpdateOperationRoom(ApplyId, OperationRoomId);
}
public static DataTable SelectPlanedOpeByRoom(string whereSql)
{
return DOperationApply.SelectPlanedOpeByRoom(whereSql);
@ -119,6 +84,40 @@ namespace AIMSBLL
{
return DOperationApply.SaveDoctorByRommTime(DoctorNuresName, SearchTime, CurrentRoom);
}
public static int SaveRoomOrderByTime(int SetRoom, DateTime SearchTime, int CurrentRoom)
{
int num = 0;
DataTable _operationInfoRows = DOperationApply.SelectPlanedOpe(" state in(1,2,3,4) and PlanOperationTime<='" + SearchTime.ToString("yyyy-MM-dd 23:59:59") + "' and PlanOperationTime>='" + SearchTime.ToString("yyyy-MM-dd 00:00:00") + "' and OperationRoomId=" + CurrentRoom + " order by PlanOrder asc");
if (_operationInfoRows.Rows.Count > 0)
{
int PlanOrder = BOperationApply.GetMaxPlanOrder(SearchTime, SetRoom) + 1;
for (int index = 0; index < _operationInfoRows.Rows.Count; index++)
{
int ApplyId = int.Parse(_operationInfoRows.Rows[index]["Id"].ToString());
num += DOperationApply.UpdateApplyRoom(ApplyId, SetRoom, SearchTime, PlanOrder);
PlanOrder++;
}
}
return num;
}
public static void UpdteOperationOrder(DateTime dtpSearchTime, int operationRoom)
{
DataTable _operationInfoRows = DOperationApply.SelectPlanedOpe(" PlanOperationTime<='" + dtpSearchTime.ToString("yyyy-MM-dd 23:59:59") + "' and PlanOperationTime>='" + dtpSearchTime.ToString("yyyy-MM-dd 00:00:00") + "' and OperationRoomId=" + operationRoom + " order by PlanOrder asc");
if (_operationInfoRows.Rows.Count > 0)
{
for (int index = 0; index < _operationInfoRows.Rows.Count; index++)
{
int ApplyId = int.Parse(_operationInfoRows.Rows[index]["Id"].ToString());
int OperationOrder = index + 1;
UpdateApplyOrder(ApplyId, OperationOrder);
}
}
}
public static void UpdateApplyOrder(int ApplyId, int order)
{
DOperationApply.UpdateApplyOrder(ApplyId, order);
}
}
}

View File

@ -82,7 +82,7 @@ namespace AIMSBLL
_record.MedicalHistoryNo = OperationFrontdt.Rows[0]["ArchivesNo"].ToString();
_record.Name = OperationFrontdt.Rows[0]["PatientName"].ToString();
_record.Sex = OperationFrontdt.Rows[0]["Sex"].ToString();
_record.Age = AIMSExtension.PublicMethod.GetAge(DateTime.Parse(OperationFrontdt.Rows[0]["BirthDay"].ToString()));
_record.Age = OperationFrontdt.Rows[0]["Age"].ToString();
if (OperationFrontdt.Rows[0]["Height"].ToString() != "")
_record.Height = double.Parse(OperationFrontdt.Rows[0]["Height"].ToString()).ToString();
if (OperationFrontdt.Rows[0]["Weight"].ToString() != "")
@ -92,6 +92,7 @@ namespace AIMSBLL
_record.OperationType = OperationFrontdt.Rows[0]["OperationType"].ToString();
_record.RoomId = int.Parse(OperationFrontdt.Rows[0]["OperationRoomId"].ToString().Trim());
_record.MedicalRecord = OperationFrontdt.Rows[0]["MedicalRecord"].ToString();
_record.PlanOperationTime = DateTime.Parse(OperationFrontdt.Rows[0]["PlanOperationTime"].ToString());
}
@ -211,7 +212,7 @@ namespace AIMSBLL
_record.SpareThree = allOutDose.ToString();
if (_record.ASALevel == null || _record.ASALevel == 0)
GetASALevel(PatientId, _record);
BOperationReview.GetASALevel(PatientId, _record);
return _record;
}
@ -249,6 +250,7 @@ namespace AIMSBLL
FactDrug.OperateDate = DateTime.Parse(DrugAllData.Rows[i]["OperateDate"].ToString());
FactDrug.AnesType = DrugAllData.Rows[i]["AnesType"].ToString();
FactDrug.Comment = DrugAllData.Rows[i]["Comment"].ToString();
FactDrug.Access = DrugAllData.Rows[i]["Access"].ToString();
_record.FactDrugList.Add(FactDrug);
}
}
@ -586,9 +588,9 @@ namespace AIMSBLL
}
}
public static DataTable getByOpeIDIsPhysioData(int operationId,string PhysioDataConfigId)
public static DataTable getByOpeIDIsPhysioData(int operationId, string PhysioDataConfigId)
{
string sqlStr = "SELECT [PhysioDataConfig].Name , PhysioData.RecordTime, PhysioData.[Value] FROM [dbo].[PhysioDataConfig] INNER JOIN PhysioData ON [PhysioDataConfig].Id = PhysioData.PhysioDataConfigId where PatientId = " + operationId + " and PhysioDataConfigId in ("+ PhysioDataConfigId + ") order by PhysioDataConfigId,PhysioData.RecordTime ASC";
string sqlStr = "SELECT [PhysioDataConfig].Name , PhysioData.RecordTime, PhysioData.[Value] FROM [dbo].[PhysioDataConfig] INNER JOIN PhysioData ON [PhysioDataConfig].Id = PhysioData.PhysioDataConfigId where PatientId = " + operationId + " and PhysioDataConfigId in (" + PhysioDataConfigId + ") order by PhysioDataConfigId,PhysioData.RecordTime ASC";
return DBHelper.GetDataTable(sqlStr);
}
@ -606,18 +608,6 @@ 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

@ -45,6 +45,8 @@ namespace AIMSBLL
OperationTemplateDrugObj.Spare3 = Drugdt.Rows[i]["Velocity"].ToString();
OperationTemplateDrugObj.Spare4 = Drugdt.Rows[i]["VelocityUnit"].ToString();
OperationTemplateDrugObj.Spare5 = Drugdt.Rows[i]["ParentId"].ToString();
OperationTemplateDrugObj.Spare6 = Drugdt.Rows[i]["DrugName"].ToString();
OperationTemplateDrugObj.Spare7 = Drugdt.Rows[i]["Access"].ToString();
Add(OperationTemplateDrugObj);
}
@ -176,6 +178,8 @@ namespace AIMSBLL
FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
FactDrugObj.OperateDate = NewInRoomTime;
FactDrugObj.ParentId =int.Parse( dr["Spare5"].ToString());
FactDrugObj.DrugName = dr["Spare6"].ToString();
FactDrugObj.Access = dr["Spare7"].ToString();
BFactDrug.Add(FactDrugObj);
}

View File

@ -1,12 +0,0 @@
using System;
using AIMSDAL;
using AIMSModel;
using AIMSObjectQuery;
using System.Collections;
using System.Collections.Generic;
namespace AIMSBLL
{
public partial class BPrintDocument
{
}
}

View File

@ -1,11 +1,9 @@
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using AIMSModel;
using AIMSModel;
using AIMSObjectQuery;
using System.Collections.Generic;
using DrawGraph;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
namespace AIMSDAL
{
@ -21,8 +19,8 @@ namespace AIMSDAL
internal static int Insert(SqlCommand cmd, FactDrug factDrug)
{
cmd.Parameters.Clear();
cmd.CommandText = "insert into FactDrug (PatientId,DrugTypeId,DrugId,DrugBeginTime,DrugEndTime,Dosage,DosageUnit,DrugChannel,GiveDrugType,IsContinue,Remark,OperatorNo,OperatorName,OperateDate,Density,DensityUnit,Velocity,VelocityUnit,BloodType,ParentId) values (@PatientId,@DrugTypeId,@DrugId,@DrugBeginTime,@DrugEndTime,@Dosage,@DosageUnit,@DrugChannel,@GiveDrugType,@IsContinue,@Remark,@OperatorNo,@OperatorName,@OperateDate,@Density,@DensityUnit,@Velocity,@VelocityUnit,@BloodType,@ParentId);select @@identity";
//从实体中取出值放入Command的参数列表
cmd.CommandText = "insert into FactDrug (PatientId,DrugTypeId,DrugId,DrugBeginTime,DrugEndTime,Dosage,DosageUnit,DrugChannel,GiveDrugType,IsContinue,Remark,OperatorNo,OperatorName,OperateDate,Density,DensityUnit,Velocity,VelocityUnit,BloodType,ParentId,DrugName,Access) values (@PatientId,@DrugTypeId,@DrugId,@DrugBeginTime,@DrugEndTime,@Dosage,@DosageUnit,@DrugChannel,@GiveDrugType,@IsContinue,@Remark,@OperatorNo,@OperatorName,@OperateDate,@Density,@DensityUnit,@Velocity,@VelocityUnit,@BloodType,@ParentId,@DrugName,@Access);select @@identity";
//从实体中取出值放入Command的参数列表,BatchNo,PaySelf,TestFlag,LimitFlag,Extend1,Extend2,Extend3,Extend4,Extend5 ,@BatchNo,@PaySelf,@TestFlag,@LimitFlag,@Extend1,@Extend2,@Extend3,@Extend4,@Extend5
cmd.Parameters.Add(new SqlParameter("@PatientId", factDrug.PatientId));
cmd.Parameters.Add(new SqlParameter("@DrugTypeId", factDrug.DrugTypeId));
cmd.Parameters.Add(new SqlParameter("@DrugId", factDrug.DrugId));
@ -38,11 +36,22 @@ namespace AIMSDAL
cmd.Parameters.Add(new SqlParameter("@OperatorName", factDrug.OperatorName));
cmd.Parameters.Add(new SqlParameter("@OperateDate", factDrug.OperateDate));
cmd.Parameters.Add(new SqlParameter("@Density", factDrug.Density));
cmd.Parameters.Add(new SqlParameter("@DensityUnit", factDrug.DensityUnit == null ? "" : factDrug.DensityUnit));
cmd.Parameters.Add(new SqlParameter("@DensityUnit", factDrug.DensityUnit));
cmd.Parameters.Add(new SqlParameter("@Velocity", factDrug.Velocity));
cmd.Parameters.Add(new SqlParameter("@VelocityUnit", factDrug.VelocityUnit == null ? "" : factDrug.VelocityUnit));
cmd.Parameters.Add(new SqlParameter("@VelocityUnit", factDrug.VelocityUnit));
cmd.Parameters.Add(new SqlParameter("@BloodType", factDrug.BloodType));
cmd.Parameters.Add(new SqlParameter("@ParentId", factDrug.ParentId));
cmd.Parameters.Add(new SqlParameter("@DrugName", factDrug.DrugName));
cmd.Parameters.Add(new SqlParameter("@Access", factDrug.Access));
//cmd.Parameters.Add(new SqlParameter("@BatchNo", factDrug.BatchNo));
//cmd.Parameters.Add(new SqlParameter("@PaySelf", factDrug.PaySelf));
//cmd.Parameters.Add(new SqlParameter("@TestFlag", factDrug.TestFlag));
//cmd.Parameters.Add(new SqlParameter("@LimitFlag", factDrug.LimitFlag));
//cmd.Parameters.Add(new SqlParameter("@Extend1", factDrug.Extend1));
//cmd.Parameters.Add(new SqlParameter("@Extend2", factDrug.Extend2));
//cmd.Parameters.Add(new SqlParameter("@Extend3", factDrug.Extend3));
//cmd.Parameters.Add(new SqlParameter("@Extend4", factDrug.Extend4));
//cmd.Parameters.Add(new SqlParameter("@Extend5", factDrug.Extend5));
return Convert.ToInt32(cmd.ExecuteScalar());
}
/// <summary>
@ -127,7 +136,7 @@ namespace AIMSDAL
internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters)
{
//解析过滤部份Sql语句
string filterString = oql;// SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
string filterString = SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
if (filterString != string.Empty)
{
filterString = " where " + filterString;
@ -187,8 +196,8 @@ namespace AIMSDAL
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, FactDrug factDrug)
{
cmd.CommandText = "update FactDrug set PatientId=@PatientId,DrugTypeId=@DrugTypeId,DrugId=@DrugId,DrugBeginTime=@DrugBeginTime,DrugEndTime=@DrugEndTime,Dosage=@Dosage,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,IsContinue=@IsContinue,Remark=@Remark,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Density=@Density,DensityUnit=@DensityUnit,Velocity=@Velocity,VelocityUnit=@VelocityUnit,BloodType=@BloodType,ParentId=@ParentId where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.CommandText = "update FactDrug set PatientId=@PatientId,DrugTypeId=@DrugTypeId,DrugId=@DrugId,DrugBeginTime=@DrugBeginTime,DrugEndTime=@DrugEndTime,Dosage=@Dosage,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,IsContinue=@IsContinue,Remark=@Remark,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Density=@Density,DensityUnit=@DensityUnit,Velocity=@Velocity,VelocityUnit=@VelocityUnit,BloodType=@BloodType,ParentId=@ParentId,DrugName=@DrugName,Access=@Access where Id=@Id";
//从实体中取出值放入Command的参数列表,BatchNo=@BatchNo,PaySelf=@PaySelf,TestFlag=@TestFlag,LimitFlag=@LimitFlag,Extend1=@Extend1,Extend2=@Extend2,Extend3=@Extend3,Extend4=@Extend4,Extend5=@Extend5
cmd.Parameters.Add(new SqlParameter("@PatientId", factDrug.PatientId));
cmd.Parameters.Add(new SqlParameter("@DrugTypeId", factDrug.DrugTypeId));
cmd.Parameters.Add(new SqlParameter("@DrugId", factDrug.DrugId));
@ -209,6 +218,17 @@ namespace AIMSDAL
cmd.Parameters.Add(new SqlParameter("@VelocityUnit", factDrug.VelocityUnit));
cmd.Parameters.Add(new SqlParameter("@BloodType", factDrug.BloodType));
cmd.Parameters.Add(new SqlParameter("@ParentId", factDrug.ParentId));
cmd.Parameters.Add(new SqlParameter("@DrugName", factDrug.DrugName));
cmd.Parameters.Add(new SqlParameter("@Access", factDrug.Access));
//cmd.Parameters.Add(new SqlParameter("@BatchNo", factDrug.BatchNo));
//cmd.Parameters.Add(new SqlParameter("@PaySelf", factDrug.PaySelf));
//cmd.Parameters.Add(new SqlParameter("@TestFlag", factDrug.TestFlag));
//cmd.Parameters.Add(new SqlParameter("@LimitFlag", factDrug.LimitFlag));
//cmd.Parameters.Add(new SqlParameter("@Extend1", factDrug.Extend1));
//cmd.Parameters.Add(new SqlParameter("@Extend2", factDrug.Extend2));
//cmd.Parameters.Add(new SqlParameter("@Extend3", factDrug.Extend3));
//cmd.Parameters.Add(new SqlParameter("@Extend4", factDrug.Extend4));
//cmd.Parameters.Add(new SqlParameter("@Extend5", factDrug.Extend5));
cmd.Parameters.Add(new SqlParameter("@Id", factDrug.Id));
return cmd.ExecuteNonQuery();
}
@ -249,7 +269,7 @@ namespace AIMSDAL
internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters)
{
//解析过滤部份Sql语句
string updateString = oql;// SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
string updateString = SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
cmd.CommandText = "update FactDrug set " + updateString;
cmd.Parameters.Clear();
//添加参数
@ -327,7 +347,7 @@ namespace AIMSDAL
internal static List<FactDrug> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
//解析过滤部份Sql语句
string filterString = oql;// SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
string filterString = SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
if (filterString != string.Empty)
{
if (filterString.Trim().ToLower().IndexOf("order ") != 0)
@ -467,7 +487,7 @@ namespace AIMSDAL
internal static FactDrug ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
//解析过滤部份Sql语句
string filterString = oql;// SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
string filterString = SyntaxAnalyzer.ParseSql(oql, new FactDrugMap());
if (filterString != string.Empty)
{
filterString = " where " + filterString;
@ -671,7 +691,7 @@ namespace AIMSDAL
}
if (dr["Density"] != System.DBNull.Value)
{
entity.Density = Convert.ToDecimal(dr[""]);
entity.Density = Convert.ToDecimal(dr["Density"]);
}
if (dr["DensityUnit"] != System.DBNull.Value)
{
@ -691,7 +711,51 @@ namespace AIMSDAL
}
if (dr["ParentId"] != System.DBNull.Value)
{
entity.ParentId = Convert.ToInt32(dr["ParentId"].ToString());
entity.ParentId = Convert.ToInt32(dr["ParentId"]);
}
if (dr["DrugName"] != System.DBNull.Value)
{
entity.DrugName = dr["DrugName"].ToString();
}
if (dr["Access"] != System.DBNull.Value)
{
entity.Access = dr["Access"].ToString();
}
if (dr["BatchNo"] != System.DBNull.Value)
{
entity.BatchNo = dr["BatchNo"].ToString();
}
if (dr["PaySelf"] != System.DBNull.Value)
{
entity.PaySelf = dr["PaySelf"].ToString();
}
if (dr["TestFlag"] != System.DBNull.Value)
{
entity.TestFlag = dr["TestFlag"].ToString();
}
if (dr["LimitFlag"] != System.DBNull.Value)
{
entity.LimitFlag = dr["LimitFlag"].ToString();
}
if (dr["Extend1"] != System.DBNull.Value)
{
entity.Extend1 = dr["Extend1"].ToString();
}
if (dr["Extend2"] != System.DBNull.Value)
{
entity.Extend2 = dr["Extend2"].ToString();
}
if (dr["Extend3"] != System.DBNull.Value)
{
entity.Extend3 = dr["Extend3"].ToString();
}
if (dr["Extend4"] != System.DBNull.Value)
{
entity.Extend4 = dr["Extend4"].ToString();
}
if (dr["Extend5"] != System.DBNull.Value)
{
entity.Extend5 = dr["Extend5"].ToString();
}
return entity;
}

View File

@ -20,7 +20,7 @@ namespace AIMSDAL
internal static int Insert(SqlCommand cmd, OperationTemplate operationTemplate)
{
cmd.Parameters.Clear();
cmd.CommandText = "insert into OperationTemplate (TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate,IsPublic,Spare1,Spare2,Spare3,Spare4,Spare5) values (@TemplateName,@TypeId,@ItemKindName,@InRoomTime,@ItemId,@BeginTime,@EndTime,@Value,@DosageUnit,@DrugChannel,@GiveDrugType,@OperatorNo,@OperatorName,@OperateDate,@IsPublic,@Spare1,@Spare2,@Spare3,@Spare4,@Spare5);select @@identity";
cmd.CommandText = "insert into OperationTemplate (TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate,IsPublic,Spare1,Spare2,Spare3,Spare4,Spare5,Spare6,Spare7,Spare8,Spare9,Spare10) values (@TemplateName,@TypeId,@ItemKindName,@InRoomTime,@ItemId,@BeginTime,@EndTime,@Value,@DosageUnit,@DrugChannel,@GiveDrugType,@OperatorNo,@OperatorName,@OperateDate,@IsPublic,@Spare1,@Spare2,@Spare3,@Spare4,@Spare5,@Spare6,@Spare7,@Spare8,@Spare9,@Spare10);select @@identity";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@TemplateName",operationTemplate.TemplateName==null?(object)DBNull.Value:(object)operationTemplate.TemplateName));
cmd.Parameters.Add(new SqlParameter("@TypeId",operationTemplate.TypeId.HasValue?(object)operationTemplate.TypeId.Value:(object)DBNull.Value));
@ -42,6 +42,11 @@ namespace AIMSDAL
cmd.Parameters.Add(new SqlParameter("@Spare3",operationTemplate.Spare3==null?(object)DBNull.Value:(object)operationTemplate.Spare3));
cmd.Parameters.Add(new SqlParameter("@Spare4",operationTemplate.Spare4==null?(object)DBNull.Value:(object)operationTemplate.Spare4));
cmd.Parameters.Add(new SqlParameter("@Spare5",operationTemplate.Spare5==null?(object)DBNull.Value:(object)operationTemplate.Spare5));
cmd.Parameters.Add(new SqlParameter("@Spare6",operationTemplate.Spare6==null?(object)DBNull.Value:(object)operationTemplate.Spare6));
cmd.Parameters.Add(new SqlParameter("@Spare7",operationTemplate.Spare7==null?(object)DBNull.Value:(object)operationTemplate.Spare7));
cmd.Parameters.Add(new SqlParameter("@Spare8",operationTemplate.Spare8==null?(object)DBNull.Value:(object)operationTemplate.Spare8));
cmd.Parameters.Add(new SqlParameter("@Spare9",operationTemplate.Spare9==null?(object)DBNull.Value:(object)operationTemplate.Spare9));
cmd.Parameters.Add(new SqlParameter("@Spare10",operationTemplate.Spare10==null?(object)DBNull.Value:(object)operationTemplate.Spare10));
return Convert.ToInt32(cmd.ExecuteScalar());
}
/// <summary>
@ -186,7 +191,7 @@ namespace AIMSDAL
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, OperationTemplate operationTemplate)
{
cmd.CommandText = "update OperationTemplate set TemplateName=@TemplateName,TypeId=@TypeId,ItemKindName=@ItemKindName,InRoomTime=@InRoomTime,ItemId=@ItemId,BeginTime=@BeginTime,EndTime=@EndTime,Value=@Value,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,IsPublic=@IsPublic,Spare1=@Spare1,Spare2=@Spare2,Spare3=@Spare3,Spare4=@Spare4,Spare5=@Spare5 where Id=@Id";
cmd.CommandText = "update OperationTemplate set TemplateName=@TemplateName,TypeId=@TypeId,ItemKindName=@ItemKindName,InRoomTime=@InRoomTime,ItemId=@ItemId,BeginTime=@BeginTime,EndTime=@EndTime,Value=@Value,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,IsPublic=@IsPublic,Spare1=@Spare1,Spare2=@Spare2,Spare3=@Spare3,Spare4=@Spare4,Spare5=@Spare5,Spare6=@Spare6,Spare7=@Spare7,Spare8=@Spare8,Spare9=@Spare9,Spare10=@Spare10 where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@TemplateName",operationTemplate.TemplateName==null?(object)DBNull.Value:(object)operationTemplate.TemplateName));
cmd.Parameters.Add(new SqlParameter("@TypeId",operationTemplate.TypeId.HasValue?(object)operationTemplate.TypeId.Value:(object)DBNull.Value));
@ -208,6 +213,11 @@ namespace AIMSDAL
cmd.Parameters.Add(new SqlParameter("@Spare3",operationTemplate.Spare3==null?(object)DBNull.Value:(object)operationTemplate.Spare3));
cmd.Parameters.Add(new SqlParameter("@Spare4",operationTemplate.Spare4==null?(object)DBNull.Value:(object)operationTemplate.Spare4));
cmd.Parameters.Add(new SqlParameter("@Spare5",operationTemplate.Spare5==null?(object)DBNull.Value:(object)operationTemplate.Spare5));
cmd.Parameters.Add(new SqlParameter("@Spare6",operationTemplate.Spare6==null?(object)DBNull.Value:(object)operationTemplate.Spare6));
cmd.Parameters.Add(new SqlParameter("@Spare7",operationTemplate.Spare7==null?(object)DBNull.Value:(object)operationTemplate.Spare7));
cmd.Parameters.Add(new SqlParameter("@Spare8",operationTemplate.Spare8==null?(object)DBNull.Value:(object)operationTemplate.Spare8));
cmd.Parameters.Add(new SqlParameter("@Spare9",operationTemplate.Spare9==null?(object)DBNull.Value:(object)operationTemplate.Spare9));
cmd.Parameters.Add(new SqlParameter("@Spare10",operationTemplate.Spare10==null?(object)DBNull.Value:(object)operationTemplate.Spare10));
cmd.Parameters.Add(new SqlParameter("@Id", operationTemplate.Id));
return cmd.ExecuteNonQuery();
}
@ -692,6 +702,26 @@ namespace AIMSDAL
{
entity.Spare5=dr["Spare5"].ToString();
}
if(dr["Spare6"]!=System.DBNull.Value)
{
entity.Spare6=dr["Spare6"].ToString();
}
if(dr["Spare7"]!=System.DBNull.Value)
{
entity.Spare7=dr["Spare7"].ToString();
}
if(dr["Spare8"]!=System.DBNull.Value)
{
entity.Spare8=dr["Spare8"].ToString();
}
if(dr["Spare9"]!=System.DBNull.Value)
{
entity.Spare9=dr["Spare9"].ToString();
}
if(dr["Spare10"]!=System.DBNull.Value)
{
entity.Spare10=dr["Spare10"].ToString();
}
return entity;
}
}

View File

@ -1,627 +0,0 @@
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using AIMSModel;
using AIMSObjectQuery;
using System.Collections.Generic;
namespace AIMSDAL
{
internal partial class DPrintDocument
{
#region
/// <summary>
/// 插入
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(SqlCommand cmd, PrintDocument printDocument)
{
cmd.Parameters.Clear();
cmd.CommandText = "insert into PrintDocument (PatientId,TemplateId,XmlFileName,XmlFile,XmlStatic,IsValid,OperatorNo,OperatorDate) values (@PatientId,@TemplateId,@XmlFileName,@XmlFile,@XmlStatic,@IsValid,@OperatorNo,@OperatorDate);select @@identity";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@PatientId",printDocument.PatientId.HasValue?(object)printDocument.PatientId.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@TemplateId",printDocument.TemplateId.HasValue?(object)printDocument.TemplateId.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@XmlFileName",printDocument.XmlFileName==null?(object)DBNull.Value:(object)printDocument.XmlFileName));
cmd.Parameters.Add(new SqlParameter("@XmlFile",printDocument.XmlFile==null?(object)DBNull.Value:(object)printDocument.XmlFile));
cmd.Parameters.Add(new SqlParameter("@XmlStatic",printDocument.XmlStatic==null?(object)DBNull.Value:(object)printDocument.XmlStatic));
cmd.Parameters.Add(new SqlParameter("@IsValid",printDocument.IsValid.HasValue?(object)printDocument.IsValid.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@OperatorNo",printDocument.OperatorNo==null?(object)DBNull.Value:(object)printDocument.OperatorNo));
cmd.Parameters.Add(new SqlParameter("@OperatorDate",printDocument.OperatorDate.HasValue?(object)printDocument.OperatorDate.Value:(object)DBNull.Value));
return Convert.ToInt32(cmd.ExecuteScalar());
}
/// <summary>
/// 不使用事务的插入方法
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(PrintDocument printDocument)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return Insert(cmd, printDocument);
}
}
}
/// <summary>
/// 使用事务的插入方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>标识列值或影响的记录行数</returns>
internal static int Insert(Connection connection,PrintDocument printDocument)
{
return Insert(connection.Command, printDocument);
}
#endregion
#region
/// <summary>
/// 删除
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int ExcuteDeleteCommand(SqlCommand cmd, PrintDocument printDocument)
{
cmd.Parameters.Clear();
cmd.CommandText = "delete from PrintDocument where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@Id", printDocument.Id));
return cmd.ExecuteNonQuery();
}
/// <summary>
/// 不使用事务的删除方法
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Delete(PrintDocument printDocument)
{
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteDeleteCommand(cmd, printDocument);
}
}
}
/// <summary>
/// 使用事务的删除方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Delete(Connection connection,PrintDocument printDocument)
{
return ExcuteDeleteCommand(connection.Command, printDocument);
}
/// <summary>
/// 执行删除命令
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters)
{
//解析过滤部份Sql语句
string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintDocumentMap());
if (filterString != string.Empty)
{
filterString = " where " + filterString;
}
cmd.Parameters.Clear();
cmd.CommandText = "delete from PrintDocument " + filterString;
//添加参数
if (parameters != null)
{
foreach (string key in parameters.Keys)
{
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
}
}
return cmd.ExecuteNonQuery();
}
/// <summary>
/// 不使用事务的删除方法
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int Delete(string oql, ParameterList parameters)
{
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteDeleteCommand(cmd, oql, parameters);
}
}
}
/// <summary>
/// 使用事务的删除方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int Delete(Connection connection, string oql, ParameterList parameters)
{
return ExcuteDeleteCommand(connection.Command, oql, parameters);
}
#endregion
#region
/// <summary>
/// 更新
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, PrintDocument printDocument)
{
cmd.CommandText = "update PrintDocument set PatientId=@PatientId,TemplateId=@TemplateId,XmlFileName=@XmlFileName,XmlFile=@XmlFile,XmlStatic=@XmlStatic,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorDate=@OperatorDate where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@PatientId",printDocument.PatientId.HasValue?(object)printDocument.PatientId.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@TemplateId",printDocument.TemplateId.HasValue?(object)printDocument.TemplateId.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@XmlFileName",printDocument.XmlFileName==null?(object)DBNull.Value:(object)printDocument.XmlFileName));
cmd.Parameters.Add(new SqlParameter("@XmlFile",printDocument.XmlFile==null?(object)DBNull.Value:(object)printDocument.XmlFile));
cmd.Parameters.Add(new SqlParameter("@XmlStatic",printDocument.XmlStatic==null?(object)DBNull.Value:(object)printDocument.XmlStatic));
cmd.Parameters.Add(new SqlParameter("@IsValid",printDocument.IsValid.HasValue?(object)printDocument.IsValid.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@OperatorNo",printDocument.OperatorNo==null?(object)DBNull.Value:(object)printDocument.OperatorNo));
cmd.Parameters.Add(new SqlParameter("@OperatorDate",printDocument.OperatorDate.HasValue?(object)printDocument.OperatorDate.Value:(object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@Id", printDocument.Id));
return cmd.ExecuteNonQuery();
}
/// <summary>
/// 不使用事务的更新方法
/// </summary>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Update(PrintDocument printDocument)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteUpdateCommand(cmd, printDocument);
}
}
}
/// <summary>
/// 使用事务的更新方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="printDocument">实体类对象</param>
/// <returns>影响的记录行数</returns>
internal static int Update(Connection connection,PrintDocument printDocument)
{
return ExcuteUpdateCommand(connection.Command, printDocument);
}
/// <summary>
/// 执行更新命令
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters)
{
//解析过滤部份Sql语句
string updateString = SyntaxAnalyzer.ParseSql(oql, new PrintDocumentMap());
cmd.CommandText = "update PrintDocument set " + updateString;
cmd.Parameters.Clear();
//添加参数
if (parameters != null)
{
foreach (string key in parameters.Keys)
{
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
}
}
return cmd.ExecuteNonQuery();
}
/// <summary>
/// 不使用事务的更新方法
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int Update(string oql, ParameterList parameters)
{
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteUpdateCommand(cmd, oql, parameters);
}
}
}
/// <summary>
/// 使用事务的更新方法
/// </summary>
/// <param name="connection">实现共享Connection的对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>影响的记录行数</returns>
internal static int Update(Connection connection, string oql, ParameterList parameters)
{
return ExcuteUpdateCommand(connection.Command, oql, parameters);
}
#endregion
#region
/// <summary>
/// 执行Command获取对象列表
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象列表</returns>
internal static List<PrintDocument> ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
{
List<PrintDocument> printDocumentList = new List<PrintDocument>();
using (SqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
PrintDocument printDocument = DataReaderToEntity(dr);
printDocumentList.Add(printDocument);
}
}
return printDocumentList;
}
/// <summary>
/// 执行查询命令
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
{
//解析过滤部份Sql语句
string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintDocumentMap());
if (filterString != string.Empty)
{
if(filterString.Trim().ToLower().IndexOf("order ")!=0)
filterString = " where " + filterString;
}
cmd.Parameters.Clear();
cmd.CommandText = "select * from PrintDocument " + filterString;
//添加参数
if (parameters != null)
{
foreach (string key in parameters.Keys)
{
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
}
}
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> Select()
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "select * from PrintDocument";
return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1);
}
}
}
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> Select(RecursiveType recursiveType, int recursiveDepth)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "select * from PrintDocument";
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
}
}
}
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> Select(string oql, ParameterList parameters)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1);
}
}
}
/// <summary>
/// 根据对象查询语句查询实体集合
/// </summary>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
}
}
}
/// <summary>
/// 根据对象查询语句查询实体集合(启用事务)
/// </summary>
/// <param name="connection">连接对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象集合</returns>
internal static List<PrintDocument> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth);
}
#endregion
#region
/// <summary>
/// 递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static PrintDocument ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
{
PrintDocument printDocument=null;
using (SqlDataReader dr = cmd.ExecuteReader())
{
if(dr.Read())
printDocument = DataReaderToEntity(dr);
}
if(printDocument==null)
return printDocument;
return printDocument;
}
/// <summary>
/// 更据对象查询语句递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static PrintDocument ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
{
//解析过滤部份Sql语句
string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintDocumentMap());
if(filterString!=string.Empty)
{
filterString=" where "+filterString;
}
cmd.CommandText = "select * from PrintDocument " + filterString;
cmd.Parameters.Clear();
//添加参数
if (parameters != null)
{
foreach (string key in parameters.Keys)
{
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
}
}
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// 更据对象查询语句递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static PrintDocument SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
}
}
}
/// <summary>
/// 更据对象查询语句查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>实体对象</returns>
internal static PrintDocument SelectSingle(string oql, ParameterList parameters)
{
return SelectSingle(oql,parameters,RecursiveType.Parent,1);
}
/// <summary>
/// 更据对象查询语句并启用事务查询单个实体
/// </summary>
/// <param name="connection">连接对象</param>
/// <param name="oql">对象查询语句</param>
/// <param name="parameters">参数列表</param>
/// <returns>实体对象</returns>
internal static PrintDocument SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
{
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
}
/// <summary>
/// 更据主键值递归查询单个实体
/// </summary>
/// <param name="cmd">Command对象</param>
/// <param name="id">主键值</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体对象</returns>
internal static PrintDocument SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth)
{
cmd.Parameters.Clear();
if(id.HasValue)
{
cmd.CommandText = "select * from PrintDocument where Id=@pk";
cmd.Parameters.Add(new SqlParameter("@pk",id.Value));
}
else
{
cmd.CommandText = "select * from PrintDocument where Id is null";
}
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
}
/// <summary>
/// 按主键字段查询特定实体
/// </summary>
/// <param name="id">主键值</param>
/// <returns>实体类对象</returns>
internal static PrintDocument SelectSingle(int? id)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return SelectSingle(cmd,id,RecursiveType.Parent,1);
}
}
}
/// <summary>
/// 按主键字段查询特定实体
/// </summary>
/// <param name="id">主键值</param>
/// <param name="recursiveType">递归类型</param>
/// <param name="recursiveDepth">递归深度</param>
/// <returns>实体类对象</returns>
internal static PrintDocument SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
{
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
return SelectSingle(cmd,id, recursiveType, recursiveDepth);
}
}
}
/// <summary>
/// 使用事务并按主键字段查询特定实体
/// </summary>
/// <param name="connection">连接对象</param>
/// <param name="id">主键值</param>
/// <returns>实体类对象</returns>
internal static PrintDocument SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth)
{
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
}
#endregion
/// <summary>
/// 从DataReader中取出值生成实体对象
/// </summary>
/// <param name="searcher">查询对象</param>
/// <returns>过滤条件字符串</returns>
private static PrintDocument DataReaderToEntity(SqlDataReader dr)
{
PrintDocument entity = new PrintDocument ();
if(dr["Id"]!=System.DBNull.Value)
{
entity.Id=Convert.ToInt32(dr["Id"]);
}
if(dr["PatientId"]!=System.DBNull.Value)
{
entity.PatientId=Convert.ToInt32(dr["PatientId"]);
}
if(dr["TemplateId"]!=System.DBNull.Value)
{
entity.TemplateId=Convert.ToInt32(dr["TemplateId"]);
}
if(dr["XmlFileName"]!=System.DBNull.Value)
{
entity.XmlFileName=dr["XmlFileName"].ToString();
}
if(dr["XmlFile"]!=System.DBNull.Value)
{
entity.XmlFile=dr["XmlFile"].ToString();
}
if(dr["XmlStatic"]!=System.DBNull.Value)
{
entity.XmlStatic=dr["XmlStatic"].ToString();
}
if(dr["IsValid"]!=System.DBNull.Value)
{
entity.IsValid=Convert.ToBoolean(dr["IsValid"]);
}
if(dr["OperatorNo"]!=System.DBNull.Value)
{
entity.OperatorNo=dr["OperatorNo"].ToString();
}
if(dr["OperatorDate"]!=System.DBNull.Value)
{
entity.OperatorDate=Convert.ToDateTime(dr["OperatorDate"]);
}
return entity;
}
}
}

View File

@ -148,7 +148,7 @@ namespace AIMSDAL
public static DataTable GetDataTable(int PatientId, int DrugTypeId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT fd.Id, d.Id as DrugId, d.Name AS DrugName,fd.Dosage,fd.DosageUnit,fd.DrugChannel, fd.GiveDrugType,fd.DrugBeginTime, Density, DensityUnit, Velocity, VelocityUnit,fd.DrugEndTime,fd.Remark,fd.ParentId FROM FactDrug fd ");
strSql.Append("SELECT fd.Id, d.Id as DrugId, d.Name AS DrugName,fd.Dosage,fd.DosageUnit,fd.DrugChannel, fd.GiveDrugType,fd.DrugBeginTime, Density, DensityUnit, Velocity, VelocityUnit,fd.DrugEndTime,fd.Remark,fd.ParentId,fd.DrugName,fd.Access FROM FactDrug fd ");
strSql.Append("LEFT JOIN Drugs d ON d.Id = fd.DrugId WHERE fd.PatientId=" + PatientId + " AND fd.DrugTypeId=" + DrugTypeId + " order by fd.DrugBeginTime");
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}

View File

@ -67,17 +67,10 @@ namespace AIMSDAL
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdateApplyRoom(int ApplyId, int room)
public static int UpdateApplyRoom(int ApplyId, int room, DateTime PlanOperationTime,int PlanOrder )
{
string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + " WHERE Id =" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdateApplyRoom(int ApplyId, int room, DateTime PlanOperationTime)
{
int PlanOrder = BOperationApply.GetMaxPlanOrder(PlanOperationTime, room) + 1;
string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + ",PlanOrder=" + PlanOrder + " WHERE Id =" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
return HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State)
{
@ -109,18 +102,6 @@ namespace AIMSDAL
HelperDB.DbHelperSQL.ExecNonQuery(strSql);
}
public static void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder)
{
string strSql = "UPDATE OperationApply SET OperationRoomId = " + OperationRoomId + ",PlanOrder=" + MaxPlanOrder + " WHERE Id=" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting)
{
string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "',IsFasting=" + IsFasting + " WHERE id='" + ApplyId + "'";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel)
{
//string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "' WHERE id='" + ApplyId + "'";
@ -135,8 +116,8 @@ namespace AIMSDAL
public static int GetMaxPlanOrder(DateTime PlanOperationTime, int OperationRoomId)
{
string strSql = "SELECT ISNULL((Max(PlanOrder)),0) AS PlanOrder FROM V_OperationFront of1 WHERE of1.[State] in('已排程','预排程','已访视') AND of1.OrderOperationTime>='" + PlanOperationTime.ToString("yyyy-MM-dd 00:00:00") + "' AND of1.OrderOperationTime<'"
+ PlanOperationTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00") + "' AND OperationRoomId=" + OperationRoomId + " ";
string strSql = "SELECT ISNULL((Max(PlanOrder)),0) AS PlanOrder FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + PlanOperationTime.ToString("yyyy-MM-dd 00:00:00") + "' AND of1.OrderOperationTime<'"
+ PlanOperationTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00") + "' AND OperationRoomId=" + OperationRoomId + " ";// of1.[State] in('已排程','预排程','已访视') AND
DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
return int.Parse(dt.Rows[0]["PlanOrder"].ToString());
@ -247,7 +228,7 @@ namespace AIMSDAL
public static DataTable GetOperationFrontDataTableByPatientId(int PatientId)
{
string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.DepartmentId,of1.PatientDepName,of1.ApplyDepName, of1.PatientKind," +
"of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.Sex, of1.Age,of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," +
"of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," +
"of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," +
@ -266,8 +247,8 @@ namespace AIMSDAL
public static DataTable GetOperationFrontDataTable(string BegInData, string EndData)
{
string strSql = "SELECT of1.ApplyId, of1.PatientId,of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," +
"of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
string strSql = "SELECT of1.ApplyId, of1.PatientId,of1.MdrecNo, of1.ArchivesNo, of1.PatientName, of1.PatientName+'('+of1.Sex+of1.Age+')' PatInfo,of1.ApplyDepName, of1.PatientKind," +
"of1.Sex, of1.Age, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," +
"of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," +
"of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," +
@ -287,7 +268,7 @@ namespace AIMSDAL
public static DataTable GetOperationFrontDataTableByPlanOperationTime(string BegInData, string EndData)
{
string strSql = "SELECT of1.ApplyId,of1.PatientId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," +
"of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.Sex, of1.Age,of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," +
"of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," +
"of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," +
@ -303,62 +284,6 @@ namespace AIMSDAL
"FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BegInData + "' and of1.PlanOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetOperationFrontByApplyId(List<int> ApplyIdList)
{
string Temp = "";
for (int i = 0; i < ApplyIdList.Count; i++)
{
Temp += ApplyIdList[i].ToString() + ",";
}
Temp = Temp.Substring(0, Temp.LastIndexOf(","));
string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," +
"of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," +
"of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," +
"of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," +
"of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," +
"of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," +
"of1.OperationLevelName, of1.ApplyOperationCutTypeName," +
"of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," +
"of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," +
"of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," +
"of1.VerifyTime, of1.VerifyOperatorName," +
"of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed ,of1.PlanOrder,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.ApplyId in (" + Temp + ")";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId)
{
string strSql = "SELECT of1.ApplyId, of1.ApplyDepName, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay," +
"of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName, " +
"of1.AnaesthesiaMethodName,of1.OperationDoctor ,of1.OperationType ,of1.PlanOrder,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + PlanOperationTime + "' AND of1.PlanOperationTime<'"
+ PlanOperationTime.AddDays(1) + "' AND OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId)
{
string strSql = "SELECT of1.ApplyId, of1.OperationType, of1.OrderOperationTime ,of1.PlanOperationTime, of1.ApplyDepName, of1.MdrecNo, of1.PatientName," +
"of1.Sex, of1.BirthDay,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName," +
"of1.AnaesthesiaMethodName ,of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3,of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed, " +
"of1.[State], of1.StateId, of1.Remark ,of1.PlanOrder ,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + PlanOperationTime + "' AND " +
"of1.PlanOperationTime<'" + PlanOperationTime.AddDays(1) + "' AND of1.OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static void UpdateOperationRoom(int ApplyId, int OperationRoomId)
{
string strSql = "UPDATE OperationApply SET OperationRoomId =" + OperationRoomId + " WHERE Id=" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static DataTable SelectPlanedOpeByRoom(string whereSql)
{
try
@ -371,6 +296,18 @@ namespace AIMSDAL
return null;
}
}
public static DataTable SelectPlanedOpe(string whereSql)
{
try
{
string sql = @" SELECT * FROM OperationApply where " + whereSql + " ";
return DBHelper.GetDataTable(sql);
}
catch (Exception)
{
return null;
}
}
public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom)
{
try
@ -383,5 +320,10 @@ namespace AIMSDAL
return 0;
}
}
public static void UpdateApplyOrder(int ApplyId, int Order)
{
string strSql = "UPDATE OperationApply SET PlanOrder=" + Order + " WHERE Id =" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
}
}

View File

@ -88,7 +88,7 @@ namespace AIMSDAL
public static DataTable FillDrugData(int PatientId, int DrugTypeId)
{
string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId,d.AnesType,d.Comment FROM FactDrug fd " +
string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId,d.AnesType,d.Comment,fd.Access FROM FactDrug fd " +
"LEFT JOIN Drugs d ON d.Id = fd.DrugId " +
"WHERE fd.PatientId=" + PatientId + " AND fd.DrugTypeId=" + DrugTypeId + " ";

View File

@ -30,7 +30,7 @@ namespace AIMSDAL
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into [OperationTemplate](");
strSql.Append("TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5");
strSql.Append("TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5, Spare6, Spare7, Spare8, Spare9, Spare10");
strSql.Append(")");
strSql.Append(" values (");
strSql.Append("'" + OperationTemplateObj.TemplateName + "',");
@ -52,7 +52,12 @@ namespace AIMSDAL
strSql.Append("'" + OperationTemplateObj.Spare2 + "',");
strSql.Append("'" + OperationTemplateObj.Spare3 + "',");
strSql.Append("'" + OperationTemplateObj.Spare4 + "',");
strSql.Append("'" + OperationTemplateObj.Spare5 + "'");
strSql.Append("'" + OperationTemplateObj.Spare5 + "',");
strSql.Append("'" + OperationTemplateObj.Spare6 + "',");
strSql.Append("'" + OperationTemplateObj.Spare7 + "',");
strSql.Append("'" + OperationTemplateObj.Spare8 + "',");
strSql.Append("'" + OperationTemplateObj.Spare9 + "',");
strSql.Append("'" + OperationTemplateObj.Spare10 + "'");
strSql.Append(")");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
@ -69,7 +74,7 @@ namespace AIMSDAL
OperationTemplate OperationTemplateObj = new OperationTemplate();
StringBuilder strSql = new StringBuilder();
strSql.Append("select ");
strSql.Append("Id,TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5 ");
strSql.Append("Id,TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5 , Spare6, Spare7, Spare8, Spare9 ,Spare10");
strSql.Append(" from OperationTemplate ");
strSql.Append(" where Id=" + Id + "");
DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString());
@ -124,6 +129,11 @@ namespace AIMSDAL
OperationTemplateObj.Spare3 = ds.Tables[0].Rows[0]["Spare3"].ToString();
OperationTemplateObj.Spare4 = ds.Tables[0].Rows[0]["Spare4"].ToString();
OperationTemplateObj.Spare5 = ds.Tables[0].Rows[0]["Spare5"].ToString();
OperationTemplateObj.Spare6 = ds.Tables[0].Rows[0]["Spare6"].ToString();
OperationTemplateObj.Spare7 = ds.Tables[0].Rows[0]["Spare7"].ToString();
OperationTemplateObj.Spare8 = ds.Tables[0].Rows[0]["Spare8"].ToString();
OperationTemplateObj.Spare9 = ds.Tables[0].Rows[0]["Spare9"].ToString();
OperationTemplateObj.Spare10 = ds.Tables[0].Rows[0]["Spare10"].ToString();
}
return OperationTemplateObj;
@ -131,7 +141,7 @@ namespace AIMSDAL
public static DataTable GetDataTable(int TypeId, string OpNo)
{
string strSql = "SELECT DISTINCT TemplateName FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and (isPublic=1 or [OperatorNo]='" + OpNo + "')";
string strSql = "SELECT DISTINCT TemplateName,OperatorNo FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and (isPublic=1 or [OperatorNo]='" + OpNo + "')";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
@ -171,7 +181,7 @@ namespace AIMSDAL
}
public static DataTable GetDataTable(string TemplateName, int TypeId)
{
string strSql = "SELECT TemplateName, ItemKindName,InRoomTime, ItemId, BeginTime, EndTime, [Value], DosageUnit,DrugChannel,GiveDrugType,[OperatorNo],[OperatorName] ,[OperateDate] ,[Ispublic],[Spare1],[Spare2],[Spare3] ,[Spare4],[Spare5] FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and TemplateName='" + TemplateName + "'";
string strSql = "SELECT TemplateName, ItemKindName,InRoomTime, ItemId, BeginTime, EndTime, [Value], DosageUnit,DrugChannel,GiveDrugType,[OperatorNo],[OperatorName] ,[OperateDate] ,[Ispublic],[Spare1],[Spare2],[Spare3] ,[Spare4],[Spare5],[Spare6],[Spare7],[Spare8] ,[Spare9],[Spare10] FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and TemplateName='" + TemplateName + "'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
}

View File

@ -1,13 +0,0 @@
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Generic;
using AIMSModel;
using AIMSObjectQuery;
namespace AIMSDAL
{
internal partial class DPrintDocument
{
}
}

View File

@ -6,6 +6,7 @@ using System.Data;
using System.Xml;
using AIMSModel;
using HelperDB;
using DrawGraph;
namespace AIMSBLL
{
@ -43,17 +44,28 @@ namespace AIMSBLL
return HelperDB.DbHelperSQL.GetDataTable(strSql);
}
public static void GetASALevel(int PatientId, OperationRecord _record)
{
string ASALevel = 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));
}
}
}
/// <summary>
/// 根据模板名称查询文档
/// </summary>
/// <param name="tempName">模板名称</param>
/// <param name="patientId">患者Id</param>
/// <returns></returns>
public static PrintDocument GetDocumentbyName(string tempName, int patientId)
public static string GetDocumentbyName2(string tempName, int patientId)
{
PrintDocument model = new PrintDocument();
string result = string.Empty;
string XmlStatic = "";
try
{
StringBuilder sb = new StringBuilder();
@ -75,28 +87,22 @@ namespace AIMSBLL
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();
XmlStatic = dt.Rows[0]["XmlStatic"].ToString();
}
}
catch (Exception ex)
{
throw ex;
}
return model;
return XmlStatic;
}
public static XmlDocument GetPrintDocumentXml(string tempName, int patientId)
{
PrintDocument model = GetDocumentbyName(tempName, patientId);
string XmlStatic = GetDocumentbyName2(tempName, patientId);
XmlDocument doc = new XmlDocument();
if (model.XmlStatic != null && model.XmlStatic.Length > 0)
if (XmlStatic != null && XmlStatic.Length > 0)
{
doc.LoadXml(model.XmlStatic);
doc.LoadXml(XmlStatic);
}
return doc;
}

View File

@ -45,17 +45,33 @@ namespace AIMSBLL
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetSelectPatientDataTable(DateTime BeginDate, DateTime EndDate, bool isLoginPerson, string person, bool isEnOpe)
{
if (isEnOpe == false)
{
string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " +
"of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," +
"of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse " +
"of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder " +
"FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' ";
if (isLoginPerson == true) {
if (isLoginPerson == true)
{
strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')";
}
if (isEnOpe == true) strSql += " and state ='手术结束'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
else
{
string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " +
"of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," +
"of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse,of1.OperationRoom,of1.PlanOrder,InRoomTime " +
"FROM [V_OperationRecordALL] of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' and SZstate =2 ";
if (isLoginPerson == true)
{
strSql += " and (AnesthesiaDoctor like '%" + person + "%' or InstrumentNurse like '%" + person + "%' or TourNurse like '%" + person + "%')";
}
strSql += " order by convert(nvarchar(10),InRoomTime,120) desc,OperationRoomId asc,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
}
public static DataTable GetSelectPatientChart()
{

View File

@ -16,7 +16,7 @@ namespace AIMSModel
private int? itemId;
private DateTime? beginTime;
private DateTime? endTime;
private Decimal? value;
private Decimal? _value;
private string dosageUnit;
private string drugChannel;
private string giveDrugType;
@ -29,6 +29,11 @@ namespace AIMSModel
private string spare3;
private string spare4;
private string spare5;
private string spare6;
private string spare7;
private string spare8;
private string spare9;
private string spare10;
/// <summary>
@ -36,168 +41,208 @@ namespace AIMSModel
/// </summary>
public int? Id
{
get{ return id; }
set{ id=value; }
get { return id; }
set { id = value; }
}
/// <summary>
///
/// </summary>
public string TemplateName
{
get{ return templateName; }
set{ templateName=value; }
get { return templateName; }
set { templateName = value; }
}
/// <summary>
///
/// </summary>
public int? TypeId
{
get{ return typeId; }
set{ typeId=value; }
get { return typeId; }
set { typeId = value; }
}
/// <summary>
///
/// </summary>
public string ItemKindName
{
get{ return itemKindName; }
set{ itemKindName=value; }
get { return itemKindName; }
set { itemKindName = value; }
}
/// <summary>
///
/// </summary>
public DateTime? InRoomTime
{
get{ return inRoomTime; }
set{ inRoomTime=value; }
get { return inRoomTime; }
set { inRoomTime = value; }
}
/// <summary>
///
/// </summary>
public int? ItemId
{
get{ return itemId; }
set{ itemId=value; }
get { return itemId; }
set { itemId = value; }
}
/// <summary>
///
/// </summary>
public DateTime? BeginTime
{
get{ return beginTime; }
set{ beginTime=value; }
get { return beginTime; }
set { beginTime = value; }
}
/// <summary>
///
/// </summary>
public DateTime? EndTime
{
get{ return endTime; }
set{ endTime=value; }
get { return endTime; }
set { endTime = value; }
}
/// <summary>
///
/// </summary>
public Decimal? Value
{
get{ return value; }
set{ this.value=value; }
get { return _value; }
set { _value = value; }
}
/// <summary>
///
/// </summary>
public string DosageUnit
{
get{ return dosageUnit; }
set{ dosageUnit=value; }
get { return dosageUnit; }
set { dosageUnit = value; }
}
/// <summary>
///
/// </summary>
public string DrugChannel
{
get{ return drugChannel; }
set{ drugChannel=value; }
get { return drugChannel; }
set { drugChannel = value; }
}
/// <summary>
///
/// </summary>
public string GiveDrugType
{
get{ return giveDrugType; }
set{ giveDrugType=value; }
get { return giveDrugType; }
set { giveDrugType = value; }
}
/// <summary>
///
/// </summary>
public string OperatorNo
{
get{ return operatorNo; }
set{ operatorNo=value; }
get { return operatorNo; }
set { operatorNo = value; }
}
/// <summary>
///
/// </summary>
public string OperatorName
{
get{ return operatorName; }
set{ operatorName=value; }
get { return operatorName; }
set { operatorName = value; }
}
/// <summary>
///
/// </summary>
public DateTime? OperateDate
{
get{ return operateDate; }
set{ operateDate=value; }
get { return operateDate; }
set { operateDate = value; }
}
/// <summary>
///
/// </summary>
public int? IsPublic
{
get{ return isPublic; }
set{ isPublic=value; }
get { return isPublic; }
set { isPublic = value; }
}
/// <summary>
///
/// </summary>
public string Spare1
{
get{ return spare1; }
set{ spare1=value; }
get { return spare1; }
set { spare1 = value; }
}
/// <summary>
///
/// </summary>
public string Spare2
{
get{ return spare2; }
set{ spare2=value; }
get { return spare2; }
set { spare2 = value; }
}
/// <summary>
///
/// </summary>
public string Spare3
{
get{ return spare3; }
set{ spare3=value; }
get { return spare3; }
set { spare3 = value; }
}
/// <summary>
///
/// </summary>
public string Spare4
{
get{ return spare4; }
set{ spare4=value; }
get { return spare4; }
set { spare4 = value; }
}
/// <summary>
///
/// </summary>
public string Spare5
{
get{ return spare5; }
set{ spare5=value; }
get { return spare5; }
set { spare5 = value; }
}
/// <summary>
///
/// </summary>
public string Spare6
{
get { return spare6; }
set { spare6 = value; }
}
/// <summary>
///
/// </summary>
public string Spare7
{
get { return spare7; }
set { spare7 = value; }
}
/// <summary>
///
/// </summary>
public string Spare8
{
get { return spare8; }
set { spare8 = value; }
}
/// <summary>
///
/// </summary>
public string Spare9
{
get { return spare9; }
set { spare9 = value; }
}
/// <summary>
///
/// </summary>
public string Spare10
{
get { return spare10; }
set { spare10 = value; }
}
}
}

View File

@ -1,95 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using AIMSDAL;
namespace AIMSModel
{
[Serializable]
public partial class PrintDocument
{
private int? id;
private int? patientId;
private int? templateId;
private string xmlFileName;
private string xmlFile;
private string xmlStatic;
private bool? isValid;
private string operatorNo;
private DateTime? operatorDate;
/// <summary>
/// Id
/// </summary>
public int? Id
{
get{ return id; }
set{ id=value; }
}
/// <summary>
/// 患者ID
/// </summary>
public int? PatientId
{
get{ return patientId; }
set{ patientId=value; }
}
/// <summary>
/// 模板Id
/// </summary>
public int? TemplateId
{
get{ return templateId; }
set{ templateId=value; }
}
/// <summary>
/// 文档名称
/// </summary>
public string XmlFileName
{
get{ return xmlFileName; }
set{ xmlFileName=value; }
}
/// <summary>
/// xml文档
/// </summary>
public string XmlFile
{
get{ return xmlFile; }
set{ xmlFile=value; }
}
/// <summary>
/// 需要统计域
/// </summary>
public string XmlStatic
{
get{ return xmlStatic; }
set{ xmlStatic=value; }
}
/// <summary>
/// 有效性
/// </summary>
public bool? IsValid
{
get{ return isValid; }
set{ isValid=value; }
}
/// <summary>
/// 操作人工号
/// </summary>
public string OperatorNo
{
get{ return operatorNo; }
set{ operatorNo=value; }
}
/// <summary>
/// 操作日期
/// </summary>
public DateTime? OperatorDate
{
get{ return operatorDate; }
set{ operatorDate=value; }
}
}
}

View File

@ -1,10 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using AIMSDAL;
namespace AIMSModel
{
public partial class PrintDocument
{
}
}

View File

@ -61,7 +61,6 @@ namespace AIMSObjectQuery
entitiesMap.Add("personduty",new EntityInfo("PersonDuty",new PersonDutyMap()));
entitiesMap.Add("pharmacology",new EntityInfo("PharmaCology",new PharmaCologyMap()));
entitiesMap.Add("printdoc",new EntityInfo("PrintDoc",new PrintDocMap()));
entitiesMap.Add("printdocument",new EntityInfo("PrintDocument",new PrintDocumentMap()));
entitiesMap.Add("programexception",new EntityInfo("ProgramException",new ProgramExceptionMap()));
entitiesMap.Add("provider",new EntityInfo("Provider",new ProviderMap()));
entitiesMap.Add("role",new EntityInfo("Role",new RoleMap()));

View File

@ -24,6 +24,23 @@ namespace AIMSObjectQuery
dictionary.Add("operatorno", "OperatorNo");
dictionary.Add("operatorname", "OperatorName");
dictionary.Add("operatedate", "OperateDate");
dictionary.Add("density", "Density");
dictionary.Add("densityunit", "DensityUnit");
dictionary.Add("velocity", "Velocity");
dictionary.Add("velocityunit", "VelocityUnit");
dictionary.Add("bloodtype", "BloodType");
dictionary.Add("parentid", "ParentId");
dictionary.Add("drugname", "DrugName");
dictionary.Add("access", "Access");
dictionary.Add("batchno", "BatchNo");
dictionary.Add("payself", "PaySelf");
dictionary.Add("testflag", "TestFlag");
dictionary.Add("limitflag", "LimitFlag");
dictionary.Add("extend1", "Extend1");
dictionary.Add("extend2", "Extend2");
dictionary.Add("extend3", "Extend3");
dictionary.Add("extend4", "Extend4");
dictionary.Add("extend5", "Extend5");
}
#region IMap

View File

@ -30,6 +30,11 @@ namespace AIMSObjectQuery
dictionary.Add("spare3", "Spare3");
dictionary.Add("spare4", "Spare4");
dictionary.Add("spare5", "Spare5");
dictionary.Add("spare6", "Spare6");
dictionary.Add("spare7", "Spare7");
dictionary.Add("spare8", "Spare8");
dictionary.Add("spare9", "Spare9");
dictionary.Add("spare10", "Spare10");
}
#region IMap

View File

@ -1,42 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace AIMSObjectQuery
{
internal partial class PrintDocumentMap:IMap
{
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
public PrintDocumentMap()
{
dictionary.Add("id", "Id");
dictionary.Add("patientid", "PatientId");
dictionary.Add("templateid", "TemplateId");
dictionary.Add("xmlfilename", "XmlFileName");
dictionary.Add("xmlfile", "XmlFile");
dictionary.Add("xmlstatic", "XmlStatic");
dictionary.Add("isvalid", "IsValid");
dictionary.Add("operatorno", "OperatorNo");
dictionary.Add("operatordate", "OperatorDate");
}
#region IMap
public string this[string propertyName]
{
get
{
try
{
return dictionary[propertyName.ToLower()];
}
catch (KeyNotFoundException)
{
throw new Exception(propertyName + "属性不存在");
}
}
}
#endregion
}
}

View File

@ -165,6 +165,42 @@ namespace AIMSExtension
return strAge;
}
public static int GetAgeNum(DateTime Birthday)
{
DateTime NowTime = HelperDB.DbHelperSQL.SystemDate();
int strAge=0;
int intYear = 0;
int intMonth = 0;
int intDay = 0;
intDay = NowTime.Day - Birthday.Day;
if (intDay < 0)
{
NowTime = NowTime.AddMonths(-1);
intDay += DateTime.DaysInMonth(NowTime.Year, NowTime.Month);
}
intMonth = NowTime.Month - Birthday.Month;
if (intMonth < 0)
{
intMonth += 12;
NowTime = NowTime.AddYears(-1);
}
intYear = NowTime.Year - Birthday.Year;
if (intYear >= 1)
{
strAge = intYear ;
}
if (intDay >= 0 && intYear < 1)
{
strAge = 1;
}
return strAge;
}
public static DataTable GetDgvToTable(DataGridView dgv)
{
DataTable dt = new DataTable();

View File

@ -773,42 +773,6 @@ namespace DocumentManagement
}
}
/// <summary>
/// 获取患者信息
/// </summary>
/// <param name="applyId"></param>
/// <param name="patientId"></param>
/// <returns></returns>
public static DataTable GetPatient(int patientId)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" select *");
strSql.Append(" from V_OperationRecordALL where");
strSql.Append(" PatientId = '" + patientId + "'");
return DbHelperSQL.GetDataTable(strSql.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
public static DataTable GetLisResult(string patientNo)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" select *");
strSql.Append(" from V_LisResult where");
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
return DbHelperSQL.GetDataTable(strSql.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
public static DataTable GetLisResultNos(string patientNo)
{
try
@ -837,5 +801,78 @@ namespace DocumentManagement
throw ex;
}
}
/// <summary>
/// 根据模板名称查询文档
/// </summary>
/// <param name="tempName">模板名称</param>
/// <param name="patientId">患者Id</param>
/// <returns></returns>
public static PrintDocument GetDocumentbyName2(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 = GetDocumentbyName2(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

@ -0,0 +1,249 @@
using AIMSExtension;
using DCSoft.Writer.Dom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace DocumentManagement
{
public static class DocumentExtension
{
public static void SetDocumentDefaultValue(string DocName, XTextDocument Document, PatientRecord Patient)
{
if (DocName == "压疮风险评估表")
{
string AnaesthesiaMethodName = Patient.ApplyAnaesthesiaMethodName;
if (Patient.AnaesthesiaMethodName != "") AnaesthesiaMethodName = Patient.AnaesthesiaMethodName;
double BMI = -1;
if (Patient.BMI != null && Patient.BMI != "") BMI = double.Parse(Patient.BMI);
int Age = 0;
if (Patient.BirthDay != null && Patient.BirthDay != "") Age = PublicMethod.GetAgeNum(DateTime.Parse(Patient.BirthDay));
var AnaesthesiaText = Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
&& (x as XTextInputFieldElement).ID == "field6").FirstOrDefault();
var BMItext = Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
&& (x as XTextInputFieldElement).ID == "field7").FirstOrDefault();
var AgeText = Document.Fields.ToArray().Where(x => x is XTextInputFieldElement
&& (x as XTextInputFieldElement).ID == "field8").FirstOrDefault();
foreach (XTextRadioBoxElement item in Document.RadioBoxes)
{
if (AnaesthesiaMethodName != "")
{
if (item.ID == "麻醉方式与手术体位_4" && AnaesthesiaMethodName.Contains("全身")) //|| Patient.OperationBodyPositionName.Contains("截石位")
{
item.Checked = true;
if (AnaesthesiaText != null)
AnaesthesiaText.Text = "4";
}
else if (item.ID == "麻醉方式与手术体位_1" && AnaesthesiaMethodName.Contains("局部")) //|| Patient.OperationBodyPositionName.Contains("仰卧位")
{
item.Checked = true;
if (AnaesthesiaText != null)
AnaesthesiaText.Text = "1";
}
else if (item.ID == "麻醉方式与手术体位_2" && AnaesthesiaMethodName.Contains("阻滞")) //|| Patient.OperationBodyPositionName.Contains("侧卧位")
{
item.Checked = true;
if (AnaesthesiaText != null)
AnaesthesiaText.Text = "2";
}
else if (item.ID == "麻醉方式与手术体位_3" && AnaesthesiaMethodName.Contains("椎管")) //|| Patient.OperationBodyPositionName.Contains("俯卧位")
{
item.Checked = true;
if (AnaesthesiaText != null)
AnaesthesiaText.Text = "3";
}
}
if (BMI != -1)
{
if (item.ID == "体型(BMI)_1" && (BMI >= 18.5 && BMI <= 23.9))
{
item.Checked = true;
if (BMItext != null)
BMItext.Text = "1";
}
else if (item.ID == "体型(BMI)_2" && ((BMI >= 17.5 && BMI < 18.5) || (BMI >= 24 && BMI <= 27.9)))
{
item.Checked = true;
if (BMItext != null)
BMItext.Text = "2";
}
else if (item.ID == "体型(BMI)_3" && ((BMI >= 16 && BMI < 17.5) || (BMI >= 28 && BMI <= 40)))
{
item.Checked = true;
if (BMItext != null)
BMItext.Text = "3";
}
else if (item.ID == "体型(BMI)_4" && (BMI < 16 || BMI > 40))
{
item.Checked = true;
if (BMItext != null)
BMItext.Text = "4";
}
}
if (Age > 0)
{
if (item.ID == "年龄_1" && (Age >= 80 || Age <= 1))
{
item.Checked = true;
if (AgeText != null)
AgeText.Text = "1";
}
else if (item.ID == "年龄_2" && Age < 50)
{
item.Checked = true;
if (AgeText != null)
AgeText.Text = "2";
}
else if (item.ID == "年龄_3" && (Age >= 50 && Age <= 64))
{
item.Checked = true;
if (AgeText != null)
AgeText.Text = "3";
}
else if (item.ID == "年龄_4" && (Age >= 65 && Age <= 79))
{
item.Checked = true;
if (AgeText != null)
AgeText.Text = "4";
}
}
}
}
}
}
}
//var p = element.GetType().GetProperty("ID").GetValue(element, null);
//string pID = p.ToString();
//if (pID != null)
//{
// switch (element.ID)
// {
// case "D2018071115522659588135":
// if (element.Text.Length > 0)
// {
// SetValueByName("手术麻醉史", "Checked", false);
// }
// else
// {
// SetValueByName("手术麻醉史", "Checked", true);
// }
// break;
// case "D2018071115522661909621":
// if (element.Text.Length > 0)
// {
// SetValueByName("心血管系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("高血压")
// && !GetCheckedValueByName("冠心病")
// && !GetCheckedValueByName("瓣膜病")
// && !GetCheckedValueByName("心律失常"))
// {
// SetValueByName("心血管系统正常", "Checked", true);
// }
// break;
// case "D2018071115522620315681":
// if (element.Text.Length > 0)
// {
// SetValueByName("呼吸系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("COPD")
// && !GetCheckedValueByName("哮喘"))
// {
// SetValueByName("呼吸系统正常", "Checked", true);
// }
// break;
// case "D2018071115522648623408":
// if (element.Text.Length > 0)
// {
// SetValueByName("内分泌系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("内分泌系统糖尿病")
// && !GetCheckedValueByName("库兴综合症")
// && !GetCheckedValueByName("内分泌系统甲亢"))
// {
// SetValueByName("内分泌系统正常", "Checked", true);
// }
// break;
// case "D2018071115522634957489":
// if (element.Text.Length > 0)
// {
// SetValueByName("消化系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("肝炎")
// && !GetCheckedValueByName("肝硬化")
// && !GetCheckedValueByName("胃食管返流"))
// {
// SetValueByName("消化系统正常", "Checked", true);
// }
// break;
// case "D2018071115522646181951":
// if (element.Text.Length > 0)
// {
// SetValueByName("泌尿系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("肾病")
// && !GetCheckedValueByName("尿毒症")
// && !GetCheckedValueByName("肾衰"))
// {
// SetValueByName("泌尿系统正常", "Checked", true);
// }
// break;
// case "D2018071115522612984378":
// if (element.Text.Length > 0)
// {
// SetValueByName("神经系统正常", "Checked", false);
// }
// else if (element.Text.Length == 0
// && !GetCheckedValueByName("昏迷")
// && !GetCheckedValueByName("脑梗")
// && !GetCheckedValueByName("老年痴呆")
// && !GetCheckedValueByName("帕金森综合症"))
// {
// SetValueByName("神经系统正常", "Checked", true);
// }
// break;
// default:
// break;
// }
//}
//var p = element.GetType().GetProperty("Name").GetValue(element, null);
//if (p == null)
// return;
//string pName = p.ToString();
//switch (pName)
//{
// case "麻醉方式与手术体位":
// SetValueById("field6", "Text", element.Text);
// break;
// case "体型(BMI)":
// SetValueById("field7", "Text", element.Text);
// break;
// case "年龄":
// SetValueById("field8", "Text", element.Text);
// break;
// case "皮肤":
// SetValueById("field9", "Text", element.Text);
// break;
// case "预计手术时间":
// SetValueById("field10", "Text", element.Text);
// break;
// case "手术施压":
// SetValueById("field11", "Text", element.Text);
// break;
// default:
// break;
//}

View File

@ -1,10 +1,11 @@
using System;
using HelperDB;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace AIMS.DocManager
namespace DocumentManagement
{
/// <summary>
/// V_OperationRecordALL
@ -55,8 +56,8 @@ namespace AIMS.DocManager
public static PatientLisResult GetLisResult(string patientNo)
{
PatientLisResult patient = new PatientLisResult ();
DataTable dt = DocumentManagement.DocumentDAL.GetLisResult (patientNo );
PatientLisResult patient = new PatientLisResult();
DataTable dt = GetLisResultSources(patientNo);
if (dt.Rows.Count > 0)
{
patient.PATIENT_ID = dt.Rows[0]["PATIENT_ID"].ToString();
@ -103,5 +104,21 @@ namespace AIMS.DocManager
}
return patient;
}
public static DataTable GetLisResultSources(string patientNo)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" select *");
strSql.Append(" from V_LisResult where");
strSql.Append(" PATIENT_ID = '" + patientNo + "'");
return DbHelperSQL.GetDataTable(strSql.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
}
}

View File

@ -1,10 +1,11 @@
using System;
using HelperDB;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace AIMS.DocManager
namespace DocumentManagement
{
/// <summary>
/// V_OperationRecordALL
@ -23,6 +24,7 @@ namespace AIMS.DocManager
public String Sex { get; set; }
public String BirthDay { get; set; }
public String Age { get; set; }
public String BMI { get; set; }
public String Height { get; set; }
public String Weight { get; set; }
public String BloodType { get; set; }
@ -109,7 +111,7 @@ namespace AIMS.DocManager
{
PatientRecord patient = new PatientRecord();
#region
DataTable dt = DocumentManagement.DocumentDAL.GetPatient(patientId);
DataTable dt = GetPatientSources(patientId);
if (dt.Rows.Count > 0)
{
patient.PatientId = int.Parse(dt.Rows[0]["PatientId"].ToString());
@ -124,9 +126,17 @@ namespace AIMS.DocManager
patient.ApplyDepName = dt.Rows[0]["ApplyDepName"].ToString();
patient.PatientDepName = dt.Rows[0]["PatientDepName"].ToString();
patient.Age = dt.Rows[0]["Age"].ToString();
patient.BirthDay = dt.Rows[0]["BirthDay"].ToString();
patient.Height = dt.Rows[0]["Height"].ToString();
patient.Weight = dt.Rows[0]["Weight"].ToString();
patient.BMI = dt.Rows[0]["BMI"].ToString();
if (patient.BMI == "" && patient.Height != "" && patient.Weight != "" && patient.Weight != "卧床")
{
double hei = double.Parse(patient.Height) / 100;
double wei = double.Parse(patient.Weight);
double BMI = wei / hei / hei;
patient.BMI = Math.Floor(BMI).ToString();
}
patient.BirthDay = dt.Rows[0]["BirthDay"].ToString();
patient.BloodType = dt.Rows[0]["BloodType"].ToString();
patient.SickBed = dt.Rows[0]["SickBed"].ToString();
patient.OperationType = dt.Rows[0]["OperationType"].ToString();
@ -200,5 +210,27 @@ namespace AIMS.DocManager
#endregion
return patient;
}
/// <summary>
/// 获取患者信息
/// </summary>
/// <param name="applyId"></param>
/// <param name="patientId"></param>
/// <returns></returns>
public static DataTable GetPatientSources(int patientId)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" select *");
strSql.Append(" from V_OperationRecordALL where");
strSql.Append(" PatientId = '" + patientId + "'");
return DbHelperSQL.GetDataTable(strSql.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
}
}

View File

@ -54,8 +54,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DocumentEntity\AppStartOptions.cs" />
<Compile Include="DocumentEntity\DocumentExtension.cs" />
<Compile Include="DocumentEntity\EventCodeCompiler.cs" />
<Compile Include="DocumentEntity\DocumentDAL.cs" />
<Compile Include="DocumentEntity\PatientLisResult.cs" />
<Compile Include="DocumentEntity\PatientRecord.cs" />
<Compile Include="DocumentEntity\PrintTemplateDB.cs" />
<Compile Include="DocumentEntity\UserTempPurviewDB.cs" />
<Compile Include="DocumentEntity\PrintTemplate.cs" />

View File

@ -1375,91 +1375,6 @@ namespace DocumentManagement
}
}
private void mTestInertOldXml_Click(object sender, EventArgs e)
{
string xml = @"<emrtextdoc version='1.0' checkcount='0' senior=''>
<underwritemarks />
<savelogs>
<savelog name='' time='2012-01-10 10:00:22' level='0' />
<savelog name='' time='2012-01-10 10:45:22' level='0' />
</savelogs>
<headstring>&lt;a&gt;&lt;text fontname='仿_GB2312' fontsize='12' bold='bold' center='center'&gt;&lt;/text&gt;&lt;text fontname='仿_GB2312' fontsize='18' bold='bold' center='center'&gt;&lt;/text&gt;&lt;text fontname='仿_GB2312' fontsize='12' center='center'&gt; 78 22 &lt;/text&gt;&lt;line thick='5' &gt;&lt;/line&gt;&lt;/a&gt;</headstring>
<headheight>259</headheight>
<footerstring>&lt;a&gt;&lt;line thick='2'&gt;&lt;/line&gt;&lt;text fontname='_GB2312' fontsize='10' center='center' &gt;[%pageindex%]&lt;/text&gt;&lt;/a&gt;</footerstring>
<footerheight>177</footerheight>
<docsetting title='' id='p7' modifytime='20120110104522' version='1.0' pagesize='Executive' />
<script runpwd='' editpwd=''>
</script>
<text>
19
2012 01 07
11040LOA 2
1140LOA 2
10CM,2cm8cm齿20u0线
Apgar评分为10分
200ml800cm,尿300cm,
</text>
<body id='C2930BD7'>
<text>
19 []
2012 01 07
11040LOA 2
1140LOA 2
10CM,2cm8cm齿20u0线
Apgar评分为10分
200ml800cm,尿300cm,
</text>
<p align='2' />
<span fontname='Microsoft Sans Serif' fontsize='23' fontbold='1'></span>
<p align='2' />
<p align='2' />
<span fontname='Microsoft Sans Serif' fontsize='13'></span>
<select name='' listsource='y0001000020900000002' id='kby0001000020900000002' text='' value='#xm#' />
<span fontname='Microsoft Sans Serif' fontsize='13'> </span>
<select name='' listsource='y0001000020900000004' id='kby0001000020900000004' text='女' value='#xb#' />
<span fontname='Microsoft Sans Serif' fontsize='13'> </span>
<select name='' listsource='y0001000020900000003' id='kby0001000020900000003' text='19' value='#nl#' />
<span fontname='Microsoft Sans Serif' fontsize='13'> </span>
<select name='' listsource='y0001000020900000060' id='kby0001000020900000060' text='' value='#zyks#' />
<span fontname='Microsoft Sans Serif' fontsize='13'> </span>
<p />
<span fontname='Microsoft Sans Serif'> 2012 01 07</span>
<p />
<span fontname='Microsoft Sans Serif'>11040LOA 2</span>
<p />
<span fontname='Microsoft Sans Serif'>1140LOA 2 </span>
<p />
<span fontname='Microsoft Sans Serif'></span>
<p />
<span fontname='Microsoft Sans Serif'> </span>
<p />
<span fontname='Microsoft Sans Serif'> </span>
<p />
<span fontname='Microsoft Sans Serif'>10CM,2cm8cm齿20u0线</span>
<p />
<span fontname='Microsoft Sans Serif'> Apgar评分为10分</span>
<p />
<span fontname='Microsoft Sans Serif'> 200ml800cm,尿300cm,</span>
<p />
<span fontname='Microsoft Sans Serif'> </span>
<p />
</body>
</emrtextdoc>";
myEditControl.ExecuteCommand("InsertOldXml", false, xml);
}
#endregion Click_Event
/// <summary>

View File

@ -992,7 +992,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACO
GAAAAk1TRnQBSQFMAgEBIQEAAZABCQGQAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
GAAAAk1TRnQBSQFMAgEBIQEAAZgBCQGYAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAZADAAEBAQABCAYAASQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -3367,7 +3367,7 @@
<data name="toolStripMenuItem51.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vwAADr8BOAVTJAAAAVZJREFUOE+tkMFLAkEUxv2DBO952EMX8TLnPS2B4EKHOQpdtsvacZcgvAgSSpAY
vgAADr4B6kKxwAAAAVZJREFUOE+tkMFLAkEUxv2DBO952EMX8TLnPS2B4EKHOQpdtsvacZcgvAgSSpAY
22KIB0EYqCQqsUsgiMNCm0W0UHTq8LVvCqGDq4IfDMO8+b7fezOpjWs0GqPpd/F3VJJS4qTl/6st1Mtb
BKdSw3v0MQ94Xh9icL8agORUPHTFrQrI5wgGt0BTqMtV1G4LOE4NYRiifz0EM/h6gJ54UM9onnfALQe6
bq4eJgVBqII0OnXf27fXA5DMUlmFWdFCT6zxgXL2Dbf1CWZNYR9PwEpD6NYI7qmEGL4mgyhsHkXQyxL5
@ -3385,7 +3385,7 @@
<data name="toolStripMenuItem52.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vwAADr8BOAVTJAAAAT5JREFUOE+9kSFPxEAQhftT+hPuJ1RWViIrkSuRK5ErK1eeXFm5ssmZNYSSQNgL
vgAADr4B6kKxwAAAAT5JREFUOE+9kSFPxEAQhftT+hPuJ1RWViIrkSuRK5ErK1eeXFm5ssmZNYSSQNgL
CSFBsA7cY2b27not5CpIeMkzzc733kyLP8v5iOyQ3QdYF/D4/IrDk8vi4aWs82i1xfi0X4dw6lJm6+GH
gFaZdQhXZvkRoOYIMcFYBzckWinb9vTNZd+/fM6BXPekLyAlIL7RIAGW0tuEzbXH7uFjgliqy7IDVack
7SKUjbCUvJTqMnhz5bC7e88Q3peVJD1JOq9h+3xc47LDmNCaKMPssrEHAO3Lw8dkcRfokPO/w28Y7gPB
@ -3402,7 +3402,7 @@
<data name="toolStripMenuItem53.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vwAADr8BOAVTJAAAAZRJREFUOE+1kqFuHDEURecP9hP2ExYWGgYaLjQMNAw0CFgVGQ40XGi40HBQZThS
vgAADr4B6kKxwAAAAZRJREFUOE+1kqFuHDEURecP9hP2ExYWGgYaLjQMNAw0CFgVGQ40XGi40HBQZThS
qtRRChYals3tfXYm2aQbVapUS0eWZuae5/c8w39ZKToIMTj8fHrEy+Pr6/v8DfHoXwneoJ5Do8we9lbB
HyxxbX9+engvlFCtEQupNSCMtu1f7y3y5OCshjM71ETxaQtr9J8CCQv+YBii8OxZ3aFMBnHUMHuF4LbI
foDdfxSEVRDgnWFFQfPoL7CipcDbLjA36r0grALpu7B65tHD5o2RMLiivuw+CEbXh1a4z+w/a9S4gQ9s
@ -3678,7 +3678,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACW
BQAAAk1TRnQBSQFMAwEBAAFQAQQBUAEEARABAAEQAQAE/wEZAQAI/wFCAU0BNgcAATYDAAEoAwABQAMA
BQAAAk1TRnQBSQFMAwEBAAFYAQQBWAEEARABAAEQAQAE/wEZAQAI/wFCAU0BNgcAATYDAAEoAwABQAMA
ARADAAEBAQABGAYAAQwVAAGcAZABigF7AWwBYwFyAWEBWAFxAWABVwFxAWABVwFxAWABVwFxAWABVwFx
AWABVwFxAWABVwFyAWEBWAF7AWwBYwGcAZABigHOAckBxpYAAa4BfAFvAdkBrQGdAdYBqAGaAdMBpgGY
AdIBpAGXAcwBoQGZAckBngGXAcYBnAGWAcQBmQGVAcEBlgGTAbYBkQGLAbgBjgGLAXwBbQFkAb8BtwG0

View File

@ -18,7 +18,7 @@ namespace DrawGraph
case "人员":
if (PersonType == "0")
{
strSql = "SELECT top 10 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='医生' ";
strSql = "SELECT top 20 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='医生' ";
if (HelpCode != "") strSql += " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
if (HelpCode == "" && OpeRecord.DepartmentId != null) strSql += " AND p.DepId='" + OpeRecord.DepartmentId + "' ";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
@ -26,25 +26,25 @@ namespace DrawGraph
}
else if (PersonType == "1")
{
strSql = "SELECT top 10 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType like '%护士%' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
strSql = "SELECT top 20 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType like '%护士%' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
strSql += " order by PersonOrder asc";
}
else if (PersonType == "2")
{
strSql = "SELECT top 10 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉医生' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
strSql = "SELECT top 20 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉医生' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
strSql += " order by PersonOrder asc";
}
else if (PersonType == "3")
{
strSql = "SELECT top 10 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
strSql = "SELECT top 20 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
strSql += " order by PersonOrder asc";
}
else if (PersonType == "4")
{
strSql = "SELECT top 10 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
strSql = "SELECT top 20 p.Id,p.Name,p.No Code FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉护士' AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.No LIKE '%" + HelpCode + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
strSql += " order by PersonOrder asc";
}
@ -64,15 +64,15 @@ namespace DrawGraph
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
break;
case "手术体位":
strSql = "SELECT top 10 p.Id,p.Name,p.Explain Code FROM OperationBodyPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
strSql = "SELECT top 15 p.Id,p.Name,p.Explain Code FROM OperationBodyPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
break;
case "手术部位":
strSql = "SELECT top 10 p.Id,p.Name,p.Explain Code FROM OperationPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
strSql = "SELECT top 15 p.Id,p.Name,p.Explain Code FROM OperationPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
break;
default:
strSql = "SELECT top 10 p.Id,p.Name,p.Remark Code FROM BasicDictionary p WHERE p.IsValid=1 and ParentId in(select Id from BasicDictionary where Name='" + _title + "') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
strSql = "SELECT top 15 p.Id,p.Name,p.Remark Code FROM BasicDictionary p WHERE p.IsValid=1 and ParentId in(select Id from BasicDictionary where Name='" + _title + "') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
break;

View File

@ -29,17 +29,26 @@ namespace DrawGraph
public string OperatorNo { get; set; }
public string OperatorName { get; set; }
public DateTime OperateDate { get; set; }
//private string operatorName;
public decimal Density;
public string DensityUnit;
public decimal Velocity;
public string VelocityUnit;
public string BloodType;
public int ParentId;
public string Access { get; set; }
public string BatchNo { get; set; }
public string PaySelf { get; set; }
public string TestFlag { get; set; }
public string LimitFlag { get; set; }
public string Extend1 { get; set; }
public string Extend2 { get; set; }
public string Extend3 { get; set; }
public string Extend4 { get; set; }
public string Extend5 { get; set; }
public List<FactDrug> ChildFactDrugList;
public bool isZuDrug { get; set; }
public double nowY { get; set; }
public string EqualDose { get; set; }
/// <summary>
@ -102,34 +111,11 @@ namespace DrawGraph
}
public bool isEqual(double y, DateTime time, double lineHeight)
{
bool reValue = false;
if ((y > nowY && y < nowY + lineHeight))
{
if (DrugBeginTime == DrugEndTime)
{
if ((DateTime.Compare(time, DateTime.Parse(DrugBeginTime.ToString())) > 0) && DateTime.Compare(time, DateTime.Parse(DrugBeginTime.ToString()).AddMinutes(10)) < 0)
{
reValue = true;
}
}
else
{
if ((DateTime.Compare(time, DateTime.Parse(DrugBeginTime.ToString())) > 0 && DateTime.Compare(time, DateTime.Parse(DrugEndTime.ToString())) < 0))
{
reValue = true;
}
}
}
return reValue;
}
public bool Equal(object drug1)
{
try
{
if ((this.DosageUnit == ((FactDrug)drug1).DosageUnit) && (this.DrugChannel == ((FactDrug)drug1).DrugChannel) && (this.DrugName == ((FactDrug)drug1).DrugName))// && (this.DrugEffect == ((DrugsRecord)drug1).DrugEffect)&& (this.Remark == ((DrugsRecord)drug1).Remark)
if ((this.DosageUnit == ((FactDrug)drug1).DosageUnit) && (this.DrugChannel == ((FactDrug)drug1).DrugChannel) && (this.DrugName == ((FactDrug)drug1).DrugName) && (this.Access == ((FactDrug)drug1).Access))// && (this.DrugEffect == ((DrugsRecord)drug1).DrugEffect)&& (this.Remark == ((DrugsRecord)drug1).Remark)
{
return true;
}