系统测试·0.231 11.01文文档问题处理 Bug修复

This commit is contained in:
leomo 2022-11-01 23:47:11 +08:00
parent 54e3ec3fd4
commit f7ac298c33
50 changed files with 1288 additions and 473 deletions

View File

@ -25,12 +25,12 @@ namespace DataDictionary.UI
{
BasicDictionaryObjList = BBasicDictionary.GetModelParentList();
BasicDictionaryObjList.Insert(0, new BasicDictionary { Id = -1, Name = "无", ParentId = 0 });
this.treeView1.BackColor = System.Drawing.Color.Snow;
AIMSExtension.PublicMethod.SetDgvAttribute(dgvBasicDictionary);
this.cboParent.DataSource = BasicDictionaryObjList;
this.cboParent.DisplayMember = "Name";
this.cboParent.ValueMember = "Id";
this.treeView1.BackColor = System.Drawing.Color.Snow;
AIMSExtension.PublicMethod.SetDgvAttribute(dgvBasicDictionary);
AIMSExtension.PublicMethod.EnabledControl(panel4, false);
_state = AIMSExtension.EditState.BROWSE;
InitTreeView();
@ -155,10 +155,18 @@ namespace DataDictionary.UI
AIMSExtension.PublicMethod.ClearControl(panel4);
intOrder.Text = "0";
dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId=" + BasicDictionaryObj.ParentId.Value.ToString());
dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(BasicDictionaryObj.ParentId.Value);
if (BasicDictionaryObj.ParentId == 0)
{
InitTreeView();
BasicDictionaryObjList = BBasicDictionary.GetModelParentList();
BasicDictionaryObjList.Insert(0, new BasicDictionary { Id = -1, Name = "无", ParentId = 0 });
this.cboParent.DataSource = BasicDictionaryObjList;
this.cboParent.DisplayMember = "Name";
this.cboParent.ValueMember = "Id";
}
}
private void tsbExit_Click(object sender, EventArgs e)
{
@ -185,14 +193,14 @@ namespace DataDictionary.UI
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
{
if (this.treeView1.SelectedNode.Level == 0)
{
txtName.Text = "";
}
if (this.treeView1.SelectedNode.Level == 1)
{
dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId=" + int.Parse(treeView1.SelectedNode.Parent.Name));
dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(int.Parse(treeView1.SelectedNode.Parent.Name));
}
}
}

View File

@ -46,6 +46,7 @@
this.IsValidColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PersonOrderColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.cboDepartment = new System.Windows.Forms.ComboBox();
this.cboPersonType = new System.Windows.Forms.ComboBox();
this.label14 = new System.Windows.Forms.Label();
this.txtPassWord = new System.Windows.Forms.TextBox();
@ -83,7 +84,6 @@
this.tsbSava = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.tsbExit = new System.Windows.Forms.ToolStripButton();
this.cboDepartment = new System.Windows.Forms.ComboBox();
this.chkAllShow = new System.Windows.Forms.CheckBox();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPerson)).BeginInit();
@ -285,6 +285,17 @@
this.panel1.Size = new System.Drawing.Size(913, 108);
this.panel1.TabIndex = 6;
//
// cboDepartment
//
this.cboDepartment.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.cboDepartment.FormattingEnabled = true;
this.cboDepartment.Location = new System.Drawing.Point(71, 6);
this.cboDepartment.Margin = new System.Windows.Forms.Padding(2);
this.cboDepartment.Name = "cboDepartment";
this.cboDepartment.Size = new System.Drawing.Size(123, 28);
this.cboDepartment.TabIndex = 575;
this.cboDepartment.TextUpdate += new System.EventHandler(this.cboDepartment_TextUpdate);
//
// cboPersonType
//
this.cboPersonType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -726,18 +737,6 @@
this.tsbExit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tsbExit.Click += new System.EventHandler(this.tsbExit_Click);
//
// cboDepartment
//
this.cboDepartment.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.cboDepartment.FormattingEnabled = true;
this.cboDepartment.Location = new System.Drawing.Point(71, 6);
this.cboDepartment.Margin = new System.Windows.Forms.Padding(2);
this.cboDepartment.Name = "cboDepartment";
this.cboDepartment.Size = new System.Drawing.Size(123, 28);
this.cboDepartment.TabIndex = 575;
this.cboDepartment.Visible = false;
this.cboDepartment.TextUpdate += new System.EventHandler(this.cboDepartment_TextUpdate);
//
// chkAllShow
//
this.chkAllShow.AutoSize = true;

View File

@ -2,11 +2,7 @@
using AIMSModel;
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;
namespace AIMS.PublicUI.UI
@ -134,10 +130,24 @@ namespace AIMS.PublicUI.UI
private void tsbSava_Click(object sender, EventArgs e)
{
if (_state == AIMSExtension.EditState.ADD && BPerson.SelectSingle(" no='" + txtNo.Text + "'", null, RecursiveType.None, 0) != null)
{
MessageBox.Show("该工号已存在,请重新输入!");
txtName.Focus();
return;
}
if (ValidInput())
{
Person PersonObj = new Person();
PersonObj.DepId = int.Parse(cboDepartment.SelectedValue.ToString());
try
{
Department dt = BDepartment.SelectSingle("Name=@name and IsValid='1' ", new ParameterList("@name", cboDepartment.Text));
PersonObj.DepId = dt.Id.Value;
}
catch (Exception)
{
MessageBox.Show("请选择正确的科室!", "系统提示");
}
PersonObj.No = txtNo.Text;
PersonObj.Name = txtName.Text.Trim();
PersonObj.HelpCode = txtHelpCode.Text;
@ -244,7 +254,7 @@ namespace AIMS.PublicUI.UI
private void GetPersonDataTable(string name, string DepartName)
{
dgvPerson.Rows.Clear();
DataTable dt = BPerson.GetPersonDataTable(name,DepartName, chkAllShow.Checked);
DataTable dt = BPerson.GetPersonDataTable(name, DepartName, chkAllShow.Checked);
for (int i = 0; i < dt.Rows.Count; i++)
{
dgvPerson.Rows.Add(dt.Rows[i]["Id"].ToString(),
@ -280,7 +290,7 @@ namespace AIMS.PublicUI.UI
//清空listNew
listNew.Clear();
//遍历全部备查数据
listNew = BDepartment.Select("IsValid=1 and (HCode like '%" + cboDepartment.Text + "%' or Name like '%" + cboDepartment.Text + "%' )", new ParameterList(), RecursiveType.None, 0);
listNew = BDepartment.Select("IsValid=1 and (HelpCode like '%" + cboDepartment.Text + "%' or Name like '%" + cboDepartment.Text + "%' )", new ParameterList(), RecursiveType.None, 0);
if (listNew.Count <= 0)
{
listNew = BDepartment.Select("IsValid=1 ", new ParameterList(), RecursiveType.None, 0);

View File

@ -526,7 +526,7 @@
this.btnqxqd.Name = "btnqxqd";
this.btnqxqd.Size = new System.Drawing.Size(160, 50);
this.btnqxqd.TabIndex = 31;
this.btnqxqd.Text = " 器械清点单";
this.btnqxqd.Text = " 麻醉记录单";
this.btnqxqd.UseVisualStyleBackColor = false;
this.btnqxqd.Click += new System.EventHandler(this.btnqxqd_Click);
//
@ -1986,7 +1986,7 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmAnasRecordBill2";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "器械清点单";
this.Text = "麻醉记录单";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.frmAnasRecordBill2_Load);
this.panel3.ResumeLayout(false);

View File

@ -76,6 +76,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.;
#endregion
//AIMSExtension.PublicMethod.SetLocalDateTime();
panel8.MouseWheel += new System.Windows.Forms.MouseEventHandler(panel8_MouseWheel);
panel82.MouseWheel += new System.Windows.Forms.MouseEventHandler(panel82_MouseWheel);
}
private void frmAnasRecordBill2_Load(object sender, EventArgs e)
@ -802,11 +804,20 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
#region
private void panel8_Scroll(object sender, ScrollEventArgs e)
{
{
templateManage.SetPYL();
}
private void panel82_Scroll(object sender, ScrollEventArgs e)
{
{
templateManage2.SetPYL();
}
private void panel8_MouseWheel(object sender, MouseEventArgs e)
{
templateManage.SetPYL();
}
private void panel82_MouseWheel(object sender, MouseEventArgs e)
{
templateManage2.SetPYL();
}
private void plRefresh_Click(object sender, EventArgs e)
@ -1210,15 +1221,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
try
{
//图表的对象
TextPackObj janCePack = templateManage.GetPackObjectOTag<TextPackObj>("PhysioDataManage_TextPackObj_17");
LinePackObj H5pack = templateManage.GetPackObjectOTag<LinePackObj>("IconManage_LinePackObj_5");
RectangleFramePackObj IconPpack = templateManage.GetPackObjectOTag<RectangleFramePackObj>("IconManage_RectangleFramePackObj_2");
TextPackObj janCePack = templateManage.GetPackObjectOTag<TextPackObj>("PhysioDataManage_TextPackObj_17");
foreach (FactBloodGasAnalysis analysis in _record.FactBloodGasAnalysisList)
{
analysis.clearAddObj(zgcAnaesRecord);
if (analysis.RecordTime.Value >= _record.pageBegin && analysis.RecordTime.Value < _record.lastPageBegin)
{
analysis.setAnasArr(zgcAnaesRecord, H5pack.RealX, IconPpack.RealY, _record.pageBegin, _record.pageBegin.AddMinutes(240));
analysis.setAnasArr(zgcAnaesRecord, janCePack.RealX, janCePack.RealEndY, _record.pageBegin, _record.pageBegin.AddMinutes(240));
analysis.drawText(janCePack.RealEndX, janCePack.RealY);
}
}
@ -1545,7 +1554,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (templateManage != null && isReadOnly == false)
{
SelectWorkerValue.Hidden();
SelectDictValue.Hidden();
SelectDictValue.Hidden();
templateManage.zedControl_MouseDownEvent(sender, e);
}
@ -1726,9 +1735,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
private bool zgcAnaesRecord2_MouseDownEvent(ZedGraphControl sender, MouseEventArgs e)
{
if (templateManage2 != null && isReadOnly == false)
{
SelectWorkerValue.Hidden();
SelectDictValue.Hidden();
{
SelectDictValue2.Hidden();
templateManage2.zedControl_MouseDownEvent(sender, e);
}
@ -1800,9 +1808,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
templateManage.BindOperationRecordValueAll(templateManage.OpeRecord);
templateManage2.BindOperationRecordValueAll(templateManage2.OpeRecord);
reDrawEvent();
reDrawAnalysis();
templateManage.Bind();
templateManage2.Bind();
reDrawAnalysis();
zgcAnaesRecord.Refresh();
zgcAnaesRecord2.Refresh();

View File

@ -25,7 +25,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
#region
public OperationRecord _record;
public TemplateManage templateManage;
public TemplateManage templateManage;
public AIMSModel.OperationRoom NowRoom;
private DataTable _appliance;
private List<ApplianceUseType> _applianceUseType;
@ -168,19 +168,19 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (Inevent != null)
{
_record.FactEventsList.Add(Inevent);
if (Inevent.EventName == "入室")
{
_record.pageCount = 0;
ReviewEvent();
}
else if (Inevent.EventName == "手术开始" || Inevent.EventName == "出室" || Inevent.EventBeginTime > _record.lastPageBegin)
{
ReviewEvent();
}
else
{
//if (Inevent.EventName == "入室")
//{
// _record.pageCount = 0;
// ReviewEvent();
//}
//else if (Inevent.EventName == "手术开始" || Inevent.EventName == "出室" || Inevent.EventBeginTime > _record.lastPageBegin)
//{
// ReviewEvent();
//}
//else
//{
DrawEvent();
}
//}
}
}
/// <summary>
@ -214,19 +214,19 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (Inevent != null)
{
if (Inevent.EventName == "入室")
{
_record.pageCount = 0;
ReviewEvent();
}
else if (Inevent.EventName == "出室" || Inevent.EventName == "手术开始" || Inevent.EventBeginTime > _record.lastPageBegin)
{
ReviewEvent();
}
else
{
//if (Inevent.EventName == "入室")
//{
// _record.pageCount = 0;
// ReviewEvent();
//}
//else if (Inevent.EventName == "出室" || Inevent.EventName == "手术开始" || Inevent.EventBeginTime > _record.lastPageBegin)
//{
// ReviewEvent();
//}
//else
//{
DrawEvent();
}
//}
}
}
/// <summary>
@ -281,7 +281,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
tb.CustomFormat = " ";
tb.Value = DateTime.Now;
tb.Tag = null;
if (Inevent != null && Inevent.EventName == "手术开始")
{
_record.OperationBeginTime = null;
@ -293,7 +293,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.OperationEndTime = null;
this.picOpeEnd.BackgroundImage = global::AIMS.Properties.Resources.;
BOperationRecord.Update(" OperationEndTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
}
}
//if (Inevent != null)
//{
// BOperationRecord.Update("OperationBeginTime=@OperationBegin,OperationEndTime=@OperationEnd,OutRoomTime=@OutRoom where Id=@id", new AIMSModel.ParameterList("@OperationBegin", _record.OperationBeginTime.HasValue ? (object)_record.OperationBeginTime.Value : (object)DBNull.Value, "@OperationEnd", _record.OperationEndTime.HasValue ? (object)_record.OperationEndTime.Value : (object)DBNull.Value, "@OutRoom", _record.OutRoomTime.HasValue ? (object)_record.OutRoomTime.Value : (object)DBNull.Value, "@id", _record.Id));
@ -356,25 +356,25 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.InRoomTime = Inevent.EventBeginTime;
this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update("InRoomTime=@InRoom where Id=@id ", new AIMSModel.ParameterList("@InRoom", _record.InRoomTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
}
}
if (Inevent != null && Inevent.EventName == "手术开始" && _record.OperationBeginTime != Inevent.EventBeginTime)
{
_record.OperationBeginTime = Inevent.EventBeginTime;
this.picOpeBegin.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update("OperationBeginTime=@OperationBegin where Id=@id ", new AIMSModel.ParameterList("@OperationBegin", _record.OperationBeginTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
}
}
if (Inevent != null && Inevent.EventName == "手术结束" && _record.OperationEndTime != Inevent.EventBeginTime)
{
_record.OperationEndTime = Inevent.EventBeginTime;
this.picOpeEnd.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update("OperationEndTime=@OperationEnd where Id=@id ", new AIMSModel.ParameterList("@OperationEnd", _record.OperationEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
}
}
if (Inevent != null && Inevent.EventName == "出室" && _record.OutRoomTime != Inevent.EventBeginTime)
{
_record.OutRoomTime = Inevent.EventBeginTime;
this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update("OutRoomTime=@OutRoom where Id=@id ", new AIMSModel.ParameterList("@OutRoom", _record.OutRoomTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
}
}
}
}
/// <summary>
@ -400,7 +400,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
private void panel8_Scroll(object sender, ScrollEventArgs e)
{
templateManage.SetPYL();
}
}
private void plRefresh_Click(object sender, EventArgs e)
{
@ -413,7 +413,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
#region
private void btnSelectPatient_Click(object sender, EventArgs e)
{
OperationDoing.AnasRecordBill.UI.frmSelectPatientNew frmSelectPatient = new UI.frmSelectPatientNew();
OperationDoing.AnasRecordBill.UI.frmSelectPatientGoodsBill frmSelectPatient = new UI.frmSelectPatientGoodsBill();
frmSelectPatient.isMainOpen = true;
frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed);
frmSelectPatient.ShowDialog();
@ -429,8 +429,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
public void LoadAnesRescue()
{
circularProgress1.IsRunning = true;
circularProgress1.Visible = true;
zgcAnaesRecord.Visible = false;
circularProgress1.Visible = true;
zgcAnaesRecord.Visible = false;
timerLoadAnesRescue = new System.Windows.Forms.Timer(components);
timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE
timerLoadAnesRescue.Interval = 300;
@ -450,26 +450,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.OperationApplyId = ApplyId;
_record.PatientId = PatientId;
_record.RecoverId = RecoverId;
_record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId,1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value);
_record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, 1, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value);
HelperDB.DbHelperSQL.CommitTrans();
ClearTimeText();
btnSelectPatient.Enabled = false;
DrawAnasReordBill.IniDrawAnasReordBill4(_record, zgcAnaesRecord, ref templateManage);
StartTimer();
txtInRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOutRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationBegin.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationEnd.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationBegin.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp);
txtOperationEnd.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp);
txtInRoom.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOutRoom.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOperationBegin.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOperationEnd.LostFocus += new EventHandler(txtDateTime_LostFocus);
}
catch
{
@ -484,8 +470,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (templateManage != null)
{
templateManage.ControlClear();
}
DrawAnasReordBill.IniDrawAnasReordBill4(_record, zgcAnaesRecord , ref templateManage );
}
DrawAnasReordBill.IniDrawAnasReordBill4(_record, zgcAnaesRecord, ref templateManage);
StartTimer();
}
else if (PatientId > 0 && State == AIMSExtension.EditState.BROWSE)
@ -498,8 +484,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (templateManage != null)
{
templateManage.ControlClear();
}
DrawAnasReordBill.IniDrawAnasReordBill4(_record, zgcAnaesRecord , ref templateManage );
}
DrawAnasReordBill.IniDrawAnasReordBill4(_record, zgcAnaesRecord, ref templateManage);
StartTimer();
}
@ -512,7 +498,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
panelQX.Dock = DockStyle.Fill;
pan.Controls.Add(panelQX);
pan.Size = new System.Drawing.Size(templateManage.ZedControl.Width, (int)(templateManage.ZedControl.Height * 0.4));
}
}
plRefresh_Click(null, null);
if (_record.MedicalRecord != null && _record.MedicalRecord != "")
{
@ -529,9 +515,24 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
isReadOnly = true;
}
if (_record.AnesthesiaDoctor == null || _record.AnesthesiaDoctor == "")
{
txtInRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOutRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationBegin.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationEnd.MouseDown += new MouseEventHandler(txtDateTime_MouseDown);
txtOperationBegin.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp);
txtOperationEnd.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp);
txtInRoom.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOutRoom.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOperationBegin.LostFocus += new EventHandler(txtDateTime_LostFocus);
txtOperationEnd.LostFocus += new EventHandler(txtDateTime_LostFocus);
}
circularProgress1.IsRunning = false;
circularProgress1.Visible = false;
zgcAnaesRecord.Visible = true;
zgcAnaesRecord.Visible = true;
}
@ -965,7 +966,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
menuStrip.Items.Add(ModifyApply);
}
private void ModifyApply_Click(object sender, EventArgs e)
{
if (PatientId == 0) return;
@ -995,19 +996,17 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
if (PatientId != 0)
{
templateManage.OpeRecord = BOperationRecord.getRecord(_record, PatientId, RecoverId);
templateManage.BindOperationRecordValueAll(templateManage.OpeRecord);
templateManage.OpeRecord = BOperationRecord.getRecord(_record, PatientId, RecoverId);
templateManage.BindOperationRecordValueAll(templateManage.OpeRecord);
reDrawEvent();
templateManage.Bind();
templateManage.Bind();
if (_record.InstrumentList != null)
if (_record.InstrumentList.ApplianceUseType != null && _record.InstrumentList.ApplianceUseType != "")
{
LoadOperationGoodsBillRecord();
}
else
{
_record.InstrumentList = new OperationRecordInstrumentList();
_record.InstrumentList.OperationRecordId = this._record.Id;
FirstbtnEnter();
}
zgcAnaesRecord.Refresh();
@ -1139,7 +1138,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
btnCancelIn.Enabled = false;
btnSelectPatient.Enabled = true;
DisposeTimer();
ReviewEvent();
//ReviewEvent();
}
catch (Exception exp)
{
@ -1243,7 +1242,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
if (_appliance != null)
FullUcControlsToPanel(panel32, _appliance);
}
#endregion
@ -1459,7 +1458,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
BOperationRecordInstrumentList.Update(_record.InstrumentList);
}
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
BApplianceRecord.InsertListData(_record.InstrumentList.ApplianceRecordList);
BApplianceRecord.InsertListData(_record.InstrumentList.ApplianceRecordList);
if (templateManage != null)
{
@ -1611,7 +1610,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
if (templateManage != null)
{
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
}
mPanes = new List<MasterPane>();
UpPanes = new List<MasterPane>();
@ -1663,7 +1662,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
private void PrintDocPage(object sender, PrintPageEventArgs e)
{
PrintDocPane(e, zgcAnaesRecord, templateManage);
PrintDocPane(e, zgcAnaesRecord, templateManage);
}
@ -1714,7 +1713,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
Panel panel = zedGraph.Parent as Panel;
panel.VerticalScroll.Value = 0;
templateManage.SetPYL(true);
templateManage.SetPYL(true);
foreach (AreaManageBase area in template.ManageList)
{
area.setPrint(true);
@ -1731,7 +1730,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (templateManage != null)
{
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
_record.InstrumentList.ApplianceRecordList = GetApplianceRecord();
}
try
{
@ -1765,7 +1764,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
PublicMethod.WriteLog(exp, "");
}
}
#endregion
#endregion
}
}

View File

@ -36,6 +36,14 @@ namespace AIMS.PublicUI.UI
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmFactOutputLiquidsNew));
this.panel1 = new System.Windows.Forms.Panel();
this.dgvOutput = new DevComponents.DotNetBar.Controls.DataGridViewX();
this.TypeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OutputName = new AIMS.PublicUI.UI.DataGridViewComboEditTipBoxColumn();
this.Dose = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DoseUnit = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.BeginTime = new DevComponents.DotNetBar.Controls.DataGridViewDateTimeInputColumn();
this.Continue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.EndTime = new DevComponents.DotNetBar.Controls.DataGridViewDateTimeInputColumn();
this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel2 = new System.Windows.Forms.Panel();
this.btnDelete = new DevComponents.DotNetBar.ButtonX();
this.btnSave = new DevComponents.DotNetBar.ButtonX();
@ -45,14 +53,6 @@ namespace AIMS.PublicUI.UI
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.calendarColumn1 = new AIMS.OremrUserControl.CalendarColumn();
this.calendarColumn2 = new AIMS.OremrUserControl.CalendarColumn();
this.TypeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OutputName = new AIMS.PublicUI.UI.DataGridViewComboEditTipBoxColumn();
this.Dose = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DoseUnit = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.BeginTime = new DevComponents.DotNetBar.Controls.DataGridViewDateTimeInputColumn();
this.Continue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.EndTime = new DevComponents.DotNetBar.Controls.DataGridViewDateTimeInputColumn();
this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvOutput)).BeginInit();
this.panel2.SuspendLayout();
@ -114,80 +114,10 @@ namespace AIMS.PublicUI.UI
this.dgvOutput.TabIndex = 3;
this.dgvOutput.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvOutput_CellClick);
this.dgvOutput.CurrentCellDirtyStateChanged += new System.EventHandler(this.dgvDrugs_CurrentCellDirtyStateChanged);
this.dgvOutput.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dgvOutput_DataError);
this.dgvOutput.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dgvOutput_EditingControlShowing);
this.dgvOutput.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dgvEvents_RowsAdded);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.btnDelete);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1035, 42);
this.panel2.TabIndex = 0;
//
// btnDelete
//
this.btnDelete.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDelete.Location = new System.Drawing.Point(674, 7);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(86, 30);
this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnSave
//
this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSave.Location = new System.Drawing.Point(766, 7);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(86, 30);
this.btnSave.TabIndex = 1;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.HeaderText = "类型";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.Visible = false;
this.dataGridViewTextBoxColumn1.Width = 60;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.HeaderText = "计量";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.HeaderText = "持续";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.Width = 60;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.HeaderText = "备注";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.Width = 250;
//
// calendarColumn1
//
this.calendarColumn1.HeaderText = "开始时间";
this.calendarColumn1.Name = "calendarColumn1";
this.calendarColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.calendarColumn1.ShowUpDown = false;
this.calendarColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// calendarColumn2
//
this.calendarColumn2.HeaderText = "结束时间";
this.calendarColumn2.Name = "calendarColumn2";
this.calendarColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.calendarColumn2.ShowUpDown = false;
this.calendarColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// TypeName
//
this.TypeName.HeaderText = "类型";
@ -302,6 +232,77 @@ namespace AIMS.PublicUI.UI
this.Remark.Name = "Remark";
this.Remark.Width = 400;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.btnDelete);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1035, 42);
this.panel2.TabIndex = 0;
//
// btnDelete
//
this.btnDelete.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDelete.Location = new System.Drawing.Point(674, 7);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(86, 30);
this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnSave
//
this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSave.Location = new System.Drawing.Point(766, 7);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(86, 30);
this.btnSave.TabIndex = 1;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.HeaderText = "类型";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.Visible = false;
this.dataGridViewTextBoxColumn1.Width = 60;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.HeaderText = "计量";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.HeaderText = "持续";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.Width = 60;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.HeaderText = "备注";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.Width = 250;
//
// calendarColumn1
//
this.calendarColumn1.HeaderText = "开始时间";
this.calendarColumn1.Name = "calendarColumn1";
this.calendarColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.calendarColumn1.ShowUpDown = false;
this.calendarColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// calendarColumn2
//
this.calendarColumn2.HeaderText = "结束时间";
this.calendarColumn2.Name = "calendarColumn2";
this.calendarColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.calendarColumn2.ShowUpDown = false;
this.calendarColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// frmFactOutputLiquidsNew
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@ -10,6 +10,7 @@ using AIMSBLL;
using AIMSModel;
using DrawGraph;
using AIMSExtension;
using DevComponents.DotNetBar.Controls;
namespace AIMS.PublicUI.UI
{
@ -36,7 +37,7 @@ namespace AIMS.PublicUI.UI
/// 计量单位集合
/// </summary>
public List<BasicDictionary> _unitList;
int LastColumnIndex = 0;// e.ColumnIndex
public int OutputLiquidTypeId;
@ -56,17 +57,20 @@ namespace AIMS.PublicUI.UI
{
_unitList = BBasicDictionary.GetBasicDictionaryByName("给药单位").SubItem;
_outputList = BOutputLiquids.Select(" IsValid=1", null);
_unitList.Insert(0, new BasicDictionary() { Id = -1, Name = "" });
#region
foreach (OutputLiquids type in _outputList)
{
int index = this.dgvOutput.Rows.Add();
this.dgvOutput.Rows[index].Cells["OutputName"].Value = type.Name;
this.dgvOutput.Rows[index].Cells["OutputName"].Tag = type.Id;
this.dgvOutput.Rows[index].Cells["DoseUnit"].Value = "ml";
dgvOutput.CurrentCell = this.dgvOutput.Rows[index].Cells[2];
dgvOutput.BeginEdit(true);
if (index == 3) break;
}
#endregion
_outputList.Insert(0, new OutputLiquids() { Id = -1, Name = "" });
_unitList.Insert(0, new BasicDictionary() { Id = -1, Name = "" });
if (_record.FactOutputLiquidsList.Count > 0)
{
FullDGV(_record.FactOutputLiquidsList);
@ -79,7 +83,7 @@ namespace AIMS.PublicUI.UI
if (list.Count > 0)
{
foreach (FactOutputLiquids item in list)
{
{
bool k = false;
foreach (DataGridViewRow row in dgvOutput.Rows)
{
@ -121,7 +125,7 @@ namespace AIMS.PublicUI.UI
}
}
}
if (k) continue;
if (k) continue;
int index = this.dgvOutput.Rows.Add();
this.dgvOutput.Rows[index].Tag = item.Id;
this.dgvOutput.Rows[index].Cells["Remark"].Value = item.Remark;
@ -187,10 +191,7 @@ namespace AIMS.PublicUI.UI
}
}
LastColumnIndex = dgvOutput.CurrentCell.ColumnIndex;
//if (dgvOutput.CurrentCell.ColumnIndex == 2 && dgvOutput.CurrentCell.EditedFormattedValue.ToString() != "")
//{
// dgvOutput.CurrentRow.Cells[4].Value = PublicMethod.ServerTime();
//}
//点击开始时间时显示时间
if (dgvOutput.CurrentCell.ColumnIndex == 4 && dgvOutput.CurrentCell.EditedFormattedValue.ToString() == "")
{
@ -223,7 +224,6 @@ namespace AIMS.PublicUI.UI
//SendKeys.Send("{Tab}");
}
}
//SaveAllOutputLiquidsDose();
}
}
private bool ValidTimeTxt(string dgvTimeTxt, ref string message)
@ -388,7 +388,7 @@ namespace AIMS.PublicUI.UI
BFactOutputLiquids.Update(liquids);
}
}
MessageBox.Show("保存成功!");
//this.Close();
#endregion
@ -547,5 +547,25 @@ namespace AIMS.PublicUI.UI
}
}
private void dgvOutput_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
if (e.Exception.Message == "DataGridViewComboBoxCell 值无效。")
{
//try
//{
// object value = _dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
// if (!((DataGridViewComboBoxCell)_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]).Items.Contains(value))
// {
// ((DataGridViewComboBoxCell)_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]).Items.Add(value);
// e.ThrowException = false;
// }
//}
//catch (Exception)
//{
// e.ThrowException = false;
//}
}
}
}
}

View File

@ -30,6 +30,7 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSelectPatientNew));
this.panel1 = new System.Windows.Forms.Panel();
this.buttonX3 = new DevComponents.DotNetBar.ButtonX();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cboRoom = new System.Windows.Forms.ComboBox();
@ -66,7 +67,6 @@
this.label3 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panel3 = new System.Windows.Forms.Panel();
this.buttonX3 = new DevComponents.DotNetBar.ButtonX();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
@ -90,6 +90,20 @@
this.panel1.Size = new System.Drawing.Size(999, 39);
this.panel1.TabIndex = 0;
//
// buttonX3
//
this.buttonX3.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonX3.Location = new System.Drawing.Point(479, 8);
this.buttonX3.Name = "buttonX3";
this.buttonX3.Size = new System.Drawing.Size(93, 23);
this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.buttonX3.TabIndex = 8;
this.buttonX3.Text = "+新增手术申请";
this.buttonX3.Click += new System.EventHandler(this.buttonX3_Click);
//
// label1
//
this.label1.AutoSize = true;
@ -436,7 +450,7 @@
this.txtType.ForeColor = System.Drawing.Color.Red;
this.txtType.Location = new System.Drawing.Point(22, 52);
this.txtType.Name = "txtType";
this.txtType.Size = new System.Drawing.Size(24, 16);
this.txtType.Size = new System.Drawing.Size(23, 16);
this.txtType.TabIndex = 5;
this.txtType.Text = "急";
//
@ -469,20 +483,6 @@
this.panel3.Size = new System.Drawing.Size(993, 475);
this.panel3.TabIndex = 0;
//
// buttonX3
//
this.buttonX3.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonX3.Location = new System.Drawing.Point(479, 8);
this.buttonX3.Name = "buttonX3";
this.buttonX3.Size = new System.Drawing.Size(93, 23);
this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.buttonX3.TabIndex = 8;
this.buttonX3.Text = "+新增手术申请";
this.buttonX3.Click += new System.EventHandler(this.buttonX3_Click);
//
// frmSelectPatientNew
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@ -10,6 +10,7 @@ using System.Text;
using System.Windows.Forms;
using AIMSModel;
using AIMSBLL;
using DCSoftDotfuscate;
namespace AIMS.OperationDoing.AnasRecordBill.UI
{
@ -38,13 +39,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
this.cboRoom.SelectedIndexChanged += new System.EventHandler(this.cboRoom_SelectedIndexChanged);
}
void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
}
private void btnNext_Click(object sender, EventArgs e)
{
dtpSelectPatientTime.Value = dtpSelectPatientTime.Value.AddDays(1);
@ -107,6 +101,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
public ucPatientCard SelUc;
private void Uc_Clicks(ucPatientCard uc, int PatientId, int applyId, DataRow dr)
{
SelPatientId = PatientId;
@ -118,7 +114,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
txtage.Text = dr["age"].ToString();
txtss.Text = dr["ApplyOperationInfoName"].ToString();
txtmzys.Text = dr["AnesthesiaDoctor"].ToString();
txttime.Text = dr["PlanOperationTime"].ToString();
txttime.Text = dr["OrderOperationTime"].ToString();
txtdept.Text = dr["ApplyDepName"].ToString();
txtzdys.Text = dr["OperationDoctor"].ToString();
txths.Text = dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString();
@ -142,6 +138,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
buttonX1.Text = uc.buttonX1.Text;
panel2.Visible = true;
SelUc = uc;
}
private void Uc_InRoom(ucPatientCard uc, int PatientId, int applyId)
@ -166,15 +163,36 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
if (RoomStr == "") return;
SatrtOperation(uc.buttonX1.Text, PatientId, applyId, int.Parse(RoomStr));
SatrtOperation(uc, PatientId, applyId, int.Parse(RoomStr));
}
private void SatrtOperation(string State, int PatientId, int applyId, int RoomId)
private void SatrtOperation(ucPatientCard uc, int PatientId, int applyId, int RoomId)
{
try
{
if (State == "开始手术")
string State = uc.buttonX1.Text;
if (State == "转入术间")
{
OperationApply operA = BOperationApply.SelectSingle(applyId);
if (operA.State == 11)
{
MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示");
return;
}
//if (operA.OrderOperationTime.Value.Date != DateTime.Now.Date && operA.OrderOperationTime.Value.Hour < 18)
//{
// MessageBox.Show("该手术预约时间不是当前日期 ,请确认后重新选择!", "系统提示");
// return;
//}
DataTable dtOperationRecord = SelectPatient.GetTodayDoOpePatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()));
foreach (DataRow row in dtOperationRecord.Rows)
{
if (row["OperationRoomId"].ToString() == operA.OperationRoomId.ToString())
{
MessageBox.Show("当前有未完成的手术占用手术间,请先选择解锁术中手术!", "系统提示");
return;
}
}
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill frmAnasRecord = new frmAnasRecordBill();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId;
@ -182,6 +200,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
frmAnasRecord.State = AIMSExtension.EditState.ADD;
SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态
uc.label2.Text = "状态:手术中";
uc.buttonX1.Text = "继续手术";
uc.buttonX2.Text = "取消手术";
uc.buttonX1.Visible = true;
uc.buttonX2.Visible = true;
uc.BackColor = Color.OldLace;
if (isMainOpen == false)
{
frmAnasRecord.ShowDialog();
@ -332,7 +357,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
if (RoomStr == "") return;
SatrtOperation(buttonX1.Text, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
SatrtOperation(SelUc, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
}
private void buttonX3_Click(object sender, EventArgs e)
@ -342,4 +367,4 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
frmOperationApplyDetail.ShowDialog();
}
}
}
}

View File

@ -165,7 +165,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAAXJJREFUSEu1lk1KxTAU
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAXJJREFUSEu1lk1KxTAU
hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i
jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR
W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ
@ -222,7 +222,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAAaJJREFUSEu1lkFKw0AY
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAaJJREFUSEu1lkFKw0AY
hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G
mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1
s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK

View File

@ -30,6 +30,7 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSelectPatientNew2));
this.panel1 = new System.Windows.Forms.Panel();
this.buttonX3 = new DevComponents.DotNetBar.ButtonX();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cboRoom = new System.Windows.Forms.ComboBox();
@ -66,7 +67,6 @@
this.label3 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panel3 = new System.Windows.Forms.Panel();
this.buttonX3 = new DevComponents.DotNetBar.ButtonX();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
@ -90,6 +90,20 @@
this.panel1.Size = new System.Drawing.Size(999, 39);
this.panel1.TabIndex = 0;
//
// buttonX3
//
this.buttonX3.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonX3.Location = new System.Drawing.Point(479, 8);
this.buttonX3.Name = "buttonX3";
this.buttonX3.Size = new System.Drawing.Size(93, 23);
this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.buttonX3.TabIndex = 8;
this.buttonX3.Text = "+新增手术申请";
this.buttonX3.Click += new System.EventHandler(this.buttonX3_Click);
//
// label1
//
this.label1.AutoSize = true;
@ -436,7 +450,7 @@
this.txtType.ForeColor = System.Drawing.Color.Red;
this.txtType.Location = new System.Drawing.Point(22, 52);
this.txtType.Name = "txtType";
this.txtType.Size = new System.Drawing.Size(24, 16);
this.txtType.Size = new System.Drawing.Size(23, 16);
this.txtType.TabIndex = 5;
this.txtType.Text = "急";
//
@ -469,20 +483,6 @@
this.panel3.Size = new System.Drawing.Size(993, 475);
this.panel3.TabIndex = 0;
//
// buttonX3
//
this.buttonX3.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonX3.Location = new System.Drawing.Point(479, 8);
this.buttonX3.Name = "buttonX3";
this.buttonX3.Size = new System.Drawing.Size(93, 23);
this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.buttonX3.TabIndex = 8;
this.buttonX3.Text = "+新增手术申请";
this.buttonX3.Click += new System.EventHandler(this.buttonX3_Click);
//
// frmSelectPatientNew2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@ -39,13 +39,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
this.cboRoom.SelectedIndexChanged += new System.EventHandler(this.cboRoom_SelectedIndexChanged);
}
void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
}
private void btnNext_Click(object sender, EventArgs e)
{
dtpSelectPatientTime.Value = dtpSelectPatientTime.Value.AddDays(1);
@ -108,6 +101,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
public ucPatientCard SelUc;
private void Uc_Clicks(ucPatientCard uc, int PatientId, int applyId, DataRow dr)
{
SelPatientId = PatientId;
@ -119,7 +114,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
txtage.Text = dr["age"].ToString();
txtss.Text = dr["ApplyOperationInfoName"].ToString();
txtmzys.Text = dr["AnesthesiaDoctor"].ToString();
txttime.Text = dr["PlanOperationTime"].ToString();
txttime.Text = dr["OrderOperationTime"].ToString();
txtdept.Text = dr["ApplyDepName"].ToString();
txtzdys.Text = dr["OperationDoctor"].ToString();
txths.Text = dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString();
@ -143,6 +138,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
buttonX1.Text = uc.buttonX1.Text;
panel2.Visible = true;
SelUc = uc;
}
private void Uc_InRoom(ucPatientCard uc, int PatientId, int applyId)
@ -167,14 +163,15 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
if (RoomStr == "") return;
SatrtOperation(uc.buttonX1.Text, PatientId, applyId, int.Parse(RoomStr));
SatrtOperation(uc, PatientId, applyId, int.Parse(RoomStr));
}
private void SatrtOperation(string State, int PatientId, int applyId, int RoomId)
private void SatrtOperation(ucPatientCard uc, int PatientId, int applyId, int RoomId)
{
try
{
if (State == "开始手术")
string State = uc.buttonX1.Text;
if (State == "转入术间")
{
OperationApply operA = BOperationApply.SelectSingle(applyId);
if (operA.State == 11)
@ -203,6 +200,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
frmAnasRecord.State = AIMSExtension.EditState.ADD;
SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态
uc.label2.Text = "状态:手术中";
uc.buttonX1.Text = "继续手术";
uc.buttonX2.Text = "取消手术";
uc.buttonX1.Visible = true;
uc.buttonX2.Visible = true;
uc.BackColor = Color.OldLace;
if (isMainOpen == false)
{
frmAnasRecord.ShowDialog();
@ -353,7 +357,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
if (RoomStr == "") return;
SatrtOperation(buttonX1.Text, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
SatrtOperation(SelUc, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
}
private void buttonX3_Click(object sender, EventArgs e)

View File

@ -165,7 +165,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAAXJJREFUSEu1lk1KxTAU
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAXJJREFUSEu1lk1KxTAU
hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i
jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR
W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ
@ -222,7 +222,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAAaJJREFUSEu1lkFKw0AY
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAaJJREFUSEu1lkFKw0AY
hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G
mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1
s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK

View File

@ -62,15 +62,35 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
panel2.Visible = false;
int i = 0, j = 0;
DataTable dt = SelectPatient.GetSelectPatientDataTable
(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString());
foreach (DataRow dr in dt.Rows)
{
ucPatientCard uc = new ucPatientCard(dr);
uc.InRoom += Uc_InRoom;
uc.QxRoom += Uc_QxRoom;
uc.Clicks += Uc_Clicks;
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
panel3.Controls.Add(uc);
j++;
if (j == 5)
{
i++;
j = 0;
}
//防止显示全部卡顿
if (i >= 5) break;
}
DataTable dt2 = SelectPatient.GetRelieveLockingPatientDataTable
(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString());
foreach (DataRow dr in dt2.Rows)
{
ucPatientCard uc = new ucPatientCard(dr);
uc.buttonX2.Visible = false;
uc.buttonX1.Text = "查看手术清点单";
uc.buttonX1.Size = new Size(uc.buttonX1.Size.Width + 40, uc.buttonX1.Size.Height);
uc.buttonX1.Text = "查看记录";
uc.buttonX2.Visible = true;
uc.InRoom += Uc_InRoom;
uc.QxRoom += Uc_QxRoom;
uc.Clicks += Uc_Clicks;
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
panel3.Controls.Add(uc);
@ -86,6 +106,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
public ucPatientCard SelUc;
private void Uc_Clicks(ucPatientCard uc, int PatientId, int applyId, DataRow dr)
{
SelPatientId = PatientId;
@ -97,7 +119,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
txtage.Text = dr["age"].ToString();
txtss.Text = dr["ApplyOperationInfoName"].ToString();
txtmzys.Text = dr["AnesthesiaDoctor"].ToString();
txttime.Text = dr["PlanOperationTime"].ToString();
txttime.Text = dr["OrderOperationTime"].ToString();
txtdept.Text = dr["ApplyDepName"].ToString();
txtzdys.Text = dr["OperationDoctor"].ToString();
txths.Text = dr["InstrumentNurse"].ToString() + " " + dr["TourNurse"].ToString();
@ -107,51 +129,205 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (!txtType.Text.Contains("急")) txtType.ForeColor = Color.DarkGreen;
else txtType.ForeColor = Color.Red;
txtState.Text = dr["State"].ToString();
label5.Text = "手术开始时间";
label23.Text = "术中诊断";
label25.Text = "实施手术";
if (txtState.Text == "手术中" || txtState.Text == "手术结束")
{
label5.Text = "手术开始时间";
label23.Text = "术中诊断";
label25.Text = "实施手术";
}
else
{
label5.Text = "申请预约时间";
label23.Text = "术前诊断";
label25.Text = "拟施手术";
}
buttonX1.Text = uc.buttonX1.Text;
panel2.Visible = true;
SelUc = uc;
}
private void Uc_InRoom(ucPatientCard uc, int PatientId, int applyId)
{
string RoomStr = uc.Tag.ToString();
SatrtOperation(uc.buttonX1.Text, PatientId, applyId, int.Parse(RoomStr));
if (RoomStr == "")
{
frmSeleteRoom seleteRoom = new frmSeleteRoom();
seleteRoom.ShowDialog();
if (seleteRoom.RoomId != null)
{
RoomStr = seleteRoom.RoomId.ToString();
if (RoomStr != null && RoomStr != "")
{
OperationApply opeapply = BOperationApply.SelectSingle(applyId, RecursiveType.None, 0);
opeapply.State = 4;
opeapply.OperationRoomId = int.Parse(seleteRoom.RoomId);
opeapply.PlanOperationTime = dtpSelectPatientTime.Value;
opeapply.PlanOrder = BOperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1;
BOperationApply.Update(opeapply);
}
}
}
if (RoomStr == "") return;
SatrtOperation(uc, PatientId, applyId, int.Parse(RoomStr));
}
private void SatrtOperation(string State, int PatientId, int applyId, int RoomId)
private void SatrtOperation(ucPatientCard uc, int PatientId, int applyId, int RoomId)
{
//try
//{
// OperationRecord _record = new OperationRecord();
// _record = BOperationRecord.getRecord(_record, PatientId, 1);
// if (_record == null || _record.Id == 0) return;
// frmGoodsBillRecord frm = new frmGoodsBillRecord();
// frm._record = _record;
// frm.Show();
// frm.Focus();
// frm.BringToFront();
//}
//catch (Exception ex)
//{
// AIMSExtension.PublicMethod.WriteLog(ex);
//}
try
{
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordInstrument frmAnasRecord = new frmAnasRecordInstrument();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
frmAnasRecord.State = AIMSExtension.EditState.BROWSE;
if (isMainOpen == false)
string State = uc.buttonX1.Text;
if (State == "转入术间")
{
frmAnasRecord.ShowDialog();
FillDgv();
OperationApply operA = BOperationApply.SelectSingle(applyId);
if (operA.State == 11)
{
MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示");
return;
}
if (uc.lblAnesDoctors.Text != "麻醉医生:" && uc.lblAnesDoctors.Text.Trim() != "麻醉医生")
{
MessageBox.Show("当前手术已安排麻醉师,请于麻醉师转入后操作", "系统提示");
return;
}
DataTable dtOperationRecord = SelectPatient.GetTodayDoOpePatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()));
foreach (DataRow row in dtOperationRecord.Rows)
{
if (row["OperationRoomId"].ToString() == operA.OperationRoomId.ToString())
{
MessageBox.Show("当前有未完成的手术占用手术间,请先选择解锁术中手术!", "系统提示");
return;
}
}
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordInstrument frmAnasRecord = new frmAnasRecordInstrument();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
frmAnasRecord.State = AIMSExtension.EditState.ADD;
SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态
uc.label2.Text = "状态:手术中";
uc.buttonX1.Text = "查看记录";
uc.buttonX2.Text = "取消手术";
uc.buttonX1.Visible = true;
uc.buttonX2.Visible = true;
uc.BackColor = Color.OldLace;
if (isMainOpen == false)
{
frmAnasRecord.ShowDialog();
FillDgv();
}
else
{
this.Close();
}
}
else
{
this.Close();
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordInstrument frmAnasRecord = new frmAnasRecordInstrument();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
frmAnasRecord.State = AIMSExtension.EditState.BROWSE;
if (isMainOpen == false)
{
frmAnasRecord.ShowDialog();
FillDgv();
}
else
{
this.Close();
}
}
}
catch (Exception ex)
{
AIMSExtension.PublicMethod.WriteLog(ex);
}
}
private void Uc_QxRoom(ucPatientCard uc, int RecorId, int PatientId, int applyId)
{
try
{
if (uc.lblAnesDoctors.Text != "麻醉医生:" && uc.lblAnesDoctors.Text.Trim() != "麻醉医生")
{
MessageBox.Show("当前手术已有麻醉师,请麻醉师进行操作!", "系统提示");
return;
}
if (uc.buttonX2.Text == "取消手术")
{
//if (BOperationRecord.GetDataCount(RecorId, PatientId, 1) > 0)
//{
// MessageBox.Show("清除数据在进行取消转入操作!");
// return;
//}
if (MessageBox.Show("确认要取消手术吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
try
{
HelperDB.DbHelperSQL.BeginTrans();
BOperationApply.UpdateApplyState(applyId, 4);
BOperationRecord.DeleteOperationRecordData(RecorId, PatientId, 1);
HelperDB.DbHelperSQL.CommitTrans();
if (isMainOpen == false)
{
FillDgv();
}
else
{
this.Close();
}
}
catch
{
HelperDB.DbHelperSQL.RollbackTrans();
}
}
}
else
{
if (MessageBox.Show("确认要返回手术吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
try
{
HelperDB.DbHelperSQL.BeginTrans();
BOperationApply.UpdateApplyState(applyId, 6);
BOperationRecord.UpdateState(PatientId, 1, 1);
BOperationRecord.DeleteEvent(PatientId, 8);
HelperDB.DbHelperSQL.CommitTrans();
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordInstrument frmAnasRecord = new frmAnasRecordInstrument();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString()));
frmAnasRecord.State = AIMSExtension.EditState.EDIT;
frmAnasRecord._record = new OperationRecord();
frmAnasRecord._record.Id = PatientId;
if (isMainOpen == false)
{
frmAnasRecord.ShowDialog();
FillDgv();
}
else
{
this.Close();
}
}
catch
{
HelperDB.DbHelperSQL.RollbackTrans();
}
}
}
}
catch (Exception ex)
@ -168,7 +344,26 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
private void buttonX1_Click(object sender, EventArgs e)
{
string RoomStr = txtRoom.Tag.ToString();
SatrtOperation(buttonX1.Text, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
if (RoomStr == "")
{
frmSeleteRoom seleteRoom = new frmSeleteRoom();
seleteRoom.ShowDialog();
if (seleteRoom.RoomId != null)
{
RoomStr = seleteRoom.RoomId.ToString();
if (RoomStr != null && RoomStr != "")
{
OperationApply opeapply = BOperationApply.SelectSingle(SelApplyId, RecursiveType.None, 0);
opeapply.State = 4;
opeapply.OperationRoomId = int.Parse(seleteRoom.RoomId);
opeapply.PlanOperationTime = dtpSelectPatientTime.Value;
opeapply.PlanOrder = BOperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1;
BOperationApply.Update(opeapply);
}
}
}
if (RoomStr == "") return;
SatrtOperation(SelUc, SelPatientId, SelApplyId, (int.Parse(RoomStr)));
}
}

View File

@ -884,6 +884,7 @@ namespace AIMS.OperationFront.UI
Oris_PatientObj.Name = txtName.Text.Trim();
Oris_PatientObj.Sex = cboSex.Text.Trim();
Oris_PatientObj.BirthDay = DateTime.Parse(dtpBirthDay.Value.ToString("yyyy-MM-dd"));
Oris_PatientObj.Age = PublicMethod.GetAge(Oris_PatientObj.BirthDay.Value);
Oris_PatientObj.Height = txtHeight.Text.Trim();
Oris_PatientObj.Weight = txtWeight.Text.Trim();
Oris_PatientObj.DepId = int.Parse(cboDepartment.SelectedValue.ToString());
@ -979,6 +980,8 @@ namespace AIMS.OperationFront.UI
if (OperationApplyObj.OrderOperationTime.Value.Day != OperationApplyObj.PlanOperationTime.Value.Day)
{
OperationApplyObj.PlanOperationTime = OperationApplyObj.OrderOperationTime;
OperationApplyObj.PlanOrder = BOperationApply.GetMaxPlanOrder( OperationApplyObj.PlanOperationTime.Value, OperationApplyObj.OperationRoomId.Value) + 1;
}
BOrisPatient.Update(Oris_PatientObj);
BOperationApply.Update(OperationApplyObj);
@ -1619,43 +1622,43 @@ namespace AIMS.OperationFront.UI
{
if (PublicMethod.GetHospitalName().Contains("屯留"))
{
string sqlStr = string.Format("select * from AIMS_PATIENT where IPD_NO like '%{0}%'", txtMdrecNo.Text);
DataTable dt = null;
dt = HisDBHelper.GetDataTable(sqlStr);
if (dt != null && dt.Rows.Count > 0)
{
DataRow row = dt.Rows[0];
txtArchivesNo.Text = row["PATIENT_ID"].ToString();//HIS患者ID
string sqlStr = string.Format("select * from AIMS_PATIENT where IPD_NO like '%{0}%'", txtMdrecNo.Text);
DataTable dt = null;
dt = HisDBHelper.GetDataTable(sqlStr);
if (dt != null && dt.Rows.Count > 0)
{
DataRow row = dt.Rows[0];
txtArchivesNo.Text = row["PATIENT_ID"].ToString();//HIS患者ID
cboDepartment.Text = row["PATIENT_SECTION_NAME"].ToString(); //申请手术科室编码
cboApplyDepId.Text = row["PATIENT_SECTION_NAME"].ToString(); //申请手术科室编码
txtName.Text = row["PATIENT_NAME"].ToString();
cboSex.Text = row["PATIENT_SEX"].ToString();
try
{
dtpBirthDay.Value = Convert.ToDateTime(row["PATIENT_BIRTH"].ToString());
if (row["PATIENT_HEIGHT"].ToString() != "") txtHeight.Text = Convert.ToDecimal(row["PATIENT_HEIGHT"].ToString()).ToString();
if (row["PATIENT_WEIGHT"].ToString() != "") txtWeight.Text = Convert.ToDecimal(row["PATIENT_WEIGHT"].ToString()).ToString();
cboDepartment.Text = row["PATIENT_SECTION_NAME"].ToString(); //申请手术科室编码
cboApplyDepId.Text = row["PATIENT_SECTION_NAME"].ToString(); //申请手术科室编码
txtName.Text = row["PATIENT_NAME"].ToString();
cboSex.Text = row["PATIENT_SEX"].ToString();
try
{
dtpBirthDay.Value = Convert.ToDateTime(row["PATIENT_BIRTH"].ToString());
if (row["PATIENT_HEIGHT"].ToString() != "") txtHeight.Text = Convert.ToDecimal(row["PATIENT_HEIGHT"].ToString()).ToString();
if (row["PATIENT_WEIGHT"].ToString() != "") txtWeight.Text = Convert.ToDecimal(row["PATIENT_WEIGHT"].ToString()).ToString();
}
catch (Exception)
{
}
cboBloodType.Text = row["PATINET_BLOODTYPE"].ToString();
cboRHBloodType.Text = row["PATINET_BLOODTYPE_RH"].ToString();
txtIdentityCard.Text = row["IDNO"].ToString();
cboPatientKind.Text = row["PATIENT_CHARGE_TYPE"].ToString();
txtIlldistrict.Text = row["ROOM_NO"].ToString();
txtSickBed.Text = row["PATIENT_BED"].ToString();
//patient.ADDRESS = row["PATIENT_ADDRESS"].ToString();
txtContacts.Text = row["PATIENT_CONTACTOR"].ToString();
txtContactsPhone.Text = row["PATIENT_CONTACTOR_PHONE"].ToString();
dtpInHosDate.Value = Convert.ToDateTime(row["INHOSPITALTIME"].ToString());
rboZQ.Checked = true;
}
catch (Exception)
else
{
MessageBox.Show("未找到该患者信息!");
}
cboBloodType.Text = row["PATINET_BLOODTYPE"].ToString();
cboRHBloodType.Text = row["PATINET_BLOODTYPE_RH"].ToString();
txtIdentityCard.Text = row["IDNO"].ToString();
cboPatientKind.Text = row["PATIENT_CHARGE_TYPE"].ToString();
txtIlldistrict.Text = row["ROOM_NO"].ToString();
txtSickBed.Text = row["PATIENT_BED"].ToString();
//patient.ADDRESS = row["PATIENT_ADDRESS"].ToString();
txtContacts.Text = row["PATIENT_CONTACTOR"].ToString();
txtContactsPhone.Text = row["PATIENT_CONTACTOR_PHONE"].ToString();
dtpInHosDate.Value = Convert.ToDateTime(row["INHOSPITALTIME"].ToString());
rboZQ.Checked = true;
}
else
{
MessageBox.Show("未找到该患者信息!");
}
}
if (PublicMethod.GetHospitalName().Contains("秦皇岛"))
{

View File

@ -16,6 +16,7 @@ using AIMSModel;
using AIMSExtension;
using AIMSBLL;
using AIMS.OremrUserControl;
using System.Linq.Expressions;
namespace AIMS.OperationFront.UI
{
@ -3598,11 +3599,11 @@ namespace AIMS.OperationFront.UI
{ btnpass.Visible = true; label1.Visible = true; }
else
{ btnpass.Visible = false; label1.Visible = false; }
dtpSearchTime.ValueChanged += new EventHandler(dtpSearchTime_ValueChanged);
this.VisibleChanged += new EventHandler(frmOperationSchedulePlan_VisibleChanged);
navigationPane1.ShowMoreButtons();
dgvApplyOrDoctor.ClearSelection();
dtpSearchTime.Focus();
dtpSearchTime.ValueChanged += new EventHandler(dtpSearchTime_ValueChanged);
this.VisibleChanged += new EventHandler(frmOperationSchedulePlan_VisibleChanged);
}
catch (Exception ex)
{
@ -3808,17 +3809,21 @@ namespace AIMS.OperationFront.UI
#endregion
#region
private readonly static object _Sync = new object();
public void LoadOperationInfo()
{
Task.Factory.StartNew(() =>
{
foreach (ucPlanOperationRoomCard item in ucOpeRooms)
lock (_Sync)
{
item.PlanOperationTime = dtpSearchTime.Value;
DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(NowPatientDataTable, "OperationRoomId ='" + item.OperationRoomId + "' and State <> 'ÍË»Ø' ", "");
item.LoadInfo(Newdt);
foreach (ucPlanOperationRoomCard item in ucOpeRooms)
{
item.PlanOperationTime = dtpSearchTime.Value;
DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(NowPatientDataTable, "OperationRoomId ='" + item.OperationRoomId + "' and State <> 'ÍË»Ø' ", "");
item.LoadInfo(Newdt);
}
SelectPanel.Invalidate();
}
SelectPanel.Invalidate();
});
}
@ -4007,7 +4012,7 @@ namespace AIMS.OperationFront.UI
int res = 0;
if (_workerType == workerType.AnesthesiaDoctor)
{
//BLL.ApplyPersonDuty.Delete(applyId, 5);
BApplyPersonDuty.Delete(applyId, 5, int.Parse(dnIDs));
ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty();
ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId;
ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 5; // 麻醉医生
@ -4021,7 +4026,7 @@ namespace AIMS.OperationFront.UI
{
if (_workerType == workerType.InstrumentNurse)
{
//BLL.ApplyPersonDuty.Delete(applyId, 6);
BApplyPersonDuty.Delete(applyId, 6, int.Parse(dnIDs));
ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty();
ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId;
ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 6;
@ -4034,7 +4039,7 @@ namespace AIMS.OperationFront.UI
}
if (_workerType == workerType.TourNurse)
{
//BLL.ApplyPersonDuty.Delete(applyId, 7);
BApplyPersonDuty.Delete(applyId, 7, int.Parse(dnIDs));
ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty();
ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId;
ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 7;
@ -4079,6 +4084,15 @@ namespace AIMS.OperationFront.UI
{
LoadSelectDate(txtQuery.Text.Trim());
LoadOperationInfo();
//dgvDetail.PrimaryGrid.Rows.Clear();
if (grCurrentSub != null)
{
OperationApply apply = BOperationApply.SelectSingle(int.Parse(selApply));
if (apply.PlanOperationTime == null || apply.PlanOperationTime.Value.ToShortDateString() != dtpSearchTime.Value.ToShortDateString())
{
dgvDetail.PrimaryGrid.Rows.Remove(grCurrentSub);
}
}
//lblcount.Text = "当前" + dgvApplyOrDoctor.Rows.Count + "\\" + OpeCount + "条";
};
frmOperationApplyDetail.ShowDialog();

View File

@ -75,12 +75,12 @@ namespace AIMS.OperationFront.UI
{
UCap.labHospitalName.Text = "手术通知单";
UCap.labName.Text = dt.Rows[i]["PatientName"].ToString();
UCap.labAge.Text = dt.Rows[i]["BirthDay"].ToString();
UCap.labAge.Text = dt.Rows[i]["Age"].ToString();
UCap.labSex.Text = dt.Rows[i]["Sex"].ToString();
UCap.labOperationRoom.Text = dt.Rows[i]["OperationRoom"].ToString();
UCap.labDepartments.Text = dt.Rows[i]["ApplyDepName"].ToString();
UCap.labBed.Text = dt.Rows[i]["SickBed"].ToString();
UCap.labDate.Text = dt.Rows[i]["PlanOperationTime"].ToString() == "" ? dt.Rows[i]["OrderOperationTime"].ToString() : dt.Rows[i]["PlanOperationTime"].ToString();
UCap.labDate.Text = dt.Rows[i]["OrderOperationTime"].ToString() ;
UCap.labDiagnosis.Text = dt.Rows[i]["ApplyDiagnoseInfoName"].ToString();
UCap.labOperation.Text = dt.Rows[i]["ApplyOperationInfoName"].ToString();

View File

@ -29,6 +29,7 @@
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.lbaCon = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.labTabindex = new System.Windows.Forms.Label();
this.labelName = new System.Windows.Forms.Label();
@ -40,7 +41,6 @@
this.buttonX2 = new DevComponents.DotNetBar.ButtonX();
this.buttonX1 = new DevComponents.DotNetBar.ButtonX();
this.label2 = new System.Windows.Forms.Label();
this.lbaCon = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
@ -58,6 +58,18 @@
this.panel1.TabIndex = 0;
this.panel1.Click += new System.EventHandler(this.ucPatientCard_Click);
//
// lbaCon
//
this.lbaCon.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbaCon.ForeColor = System.Drawing.Color.Purple;
this.lbaCon.Location = new System.Drawing.Point(40, 10);
this.lbaCon.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.lbaCon.Name = "lbaCon";
this.lbaCon.Size = new System.Drawing.Size(36, 20);
this.lbaCon.TabIndex = 8;
this.lbaCon.Text = "感染";
this.lbaCon.Visible = false;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@ -194,18 +206,6 @@
this.label2.Text = "状态:手术中";
this.label2.Click += new System.EventHandler(this.labTabindex_Click);
//
// lbaCon
//
this.lbaCon.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbaCon.ForeColor = System.Drawing.Color.Purple;
this.lbaCon.Location = new System.Drawing.Point(40, 10);
this.lbaCon.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.lbaCon.Name = "lbaCon";
this.lbaCon.Size = new System.Drawing.Size(36, 20);
this.lbaCon.TabIndex = 8;
this.lbaCon.Text = "感染";
this.lbaCon.Visible = false;
//
// ucPatientCard
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -229,7 +229,6 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lblNurse2;
private System.Windows.Forms.Label lblNurse;
private System.Windows.Forms.Label lblAnesDoctors;
private System.Windows.Forms.Label lblOpeDoctors;
public System.Windows.Forms.Label labelName;
public System.Windows.Forms.Label labTabindex;
@ -239,5 +238,6 @@
public DevComponents.DotNetBar.ButtonX buttonX2;
public DevComponents.DotNetBar.ButtonX buttonX1;
public System.Windows.Forms.Label lbaCon;
public System.Windows.Forms.Label lblAnesDoctors;
}
}

View File

@ -58,22 +58,26 @@ namespace AIMS.OremrUserControl
label2.Text = "状态:" + dr["State"].ToString();
if (dr["State"].ToString() == "手术中")
{
this.BackColor = Color.OldLace;
buttonX1.Text = "继续手术";
buttonX2.Text = "取消手术";
}
else if (dr["State"].ToString() == "已排程" || dr["State"].ToString() == "已访视")
{
buttonX1.Text = "开始手术";
this.BackColor = Color.WhiteSmoke;
buttonX1.Text = "转入术间";
buttonX2.Visible = false;
}
else if (dr["State"].ToString() == "已审核" || dr["State"].ToString() == "预排程")
{
buttonX1.Text = "开始手术";
this.BackColor = Color.WhiteSmoke;
buttonX1.Text = "转入术间";
buttonX2.Visible = false;
label2.Text = "状态:未排程";
}
else
{
this.BackColor = Color.Honeydew;
buttonX1.Text = "查看手术";
buttonX2.Text = "返回手术";
}

View File

@ -34,10 +34,10 @@
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.tsbExit = new System.Windows.Forms.ToolStripButton();
this.panel2 = new System.Windows.Forms.Panel();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.txtName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.panel2.SuspendLayout();
@ -109,6 +109,28 @@
this.panel2.Size = new System.Drawing.Size(367, 98);
this.panel2.TabIndex = 1;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(175, 17);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(81, 18);
this.radioButton2.TabIndex = 2;
this.radioButton2.Text = "私有模板";
this.radioButton2.UseVisualStyleBackColor = true;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(60, 17);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(81, 18);
this.radioButton1.TabIndex = 2;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "公有模板";
this.radioButton1.UseVisualStyleBackColor = true;
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(97, 41);
@ -125,28 +147,6 @@
this.label1.TabIndex = 0;
this.label1.Text = "模板名称";
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(60, 17);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(81, 18);
this.radioButton1.TabIndex = 2;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "公有模板";
this.radioButton1.UseVisualStyleBackColor = true;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(175, 17);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(81, 18);
this.radioButton2.TabIndex = 2;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "私有模板";
this.radioButton2.UseVisualStyleBackColor = true;
//
// frmCreateTemplate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@ -1,4 +1,5 @@
using AIMSBLL;
using AIMSExtension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -39,8 +40,9 @@ namespace AIMS.PublicUI.UI
MessageBox.Show("保存成功!");
Close();
}
catch
catch (Exception ex)
{
PublicMethod.WriteLog(ex);
MessageBox.Show("保存失败!");
}

View File

@ -74,7 +74,10 @@ namespace AIMS.PublicUI.UI
{
isDelete = true;
}
if (AIMSExtension.PublicMethod.RoleId == 1)
{
isDelete = true;
}
if (isDelete == true)
if (MessageBox.Show("确认要删除[" + dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString() + "]模板吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{

View File

@ -9,10 +9,10 @@ namespace AIMS.ReportManager
{
public static DataTable GetOperationPlanDataTable(DateTime BeginDate,DateTime EndDate,string DepName)
{
string strSql = "SELECT of1.OperationRoom, of1.ApplyDepName,of1.SickBed, of1.Contagion, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay, "+
string strSql = "SELECT CONVERT(VARCHAR(16),OperationRoom)+'-'+CONVERT(VARCHAR(16),PlanOrder ) as OperationRoom , of1.ApplyDepName,of1.SickBed, of1.Contagion, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay, " +
" of1.OrderOperationTime PlanOperationTime,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName,of1.OperationDoctor," +
" of1.AnaesthesiaMethodName , (of1.AnesthesiaDoctor + ' ' +of1.AnesthesiaDoctorSucceed) AS AnesthesiaDoctor,"+
" (of1.InstrumentNurse +' '+ of1.InstrumentNurseSucceed) AS InstrumentNurse,(of1.TourNurse + ' '+of1.TourNurseSucceed) AS TourNurse, of1.Remark "+
" of1.AnaesthesiaMethodName , of1.AnesthesiaDoctor ,"+
" of1.InstrumentNurse AS InstrumentNurse, of1.TourNurse AS TourNurse, of1.Remark "+
" FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BeginDate + "' AND of1.PlanOperationTime<'" + EndDate + "' AND of1.ApplyDepName LIKE '%%'";
return HelperDB.DbHelperSQL.GetDataTable(strSql);
}

View File

@ -19,6 +19,10 @@ namespace AIMSBLL
{
DApplyPersonDuty.Delete(OperationApplyId, PersonDutyId);
}
public static void Delete(int OperationApplyId, int PersonDutyId, int PersonId)
{
DApplyPersonDuty.Delete(OperationApplyId, PersonDutyId,PersonId);
}
public static List<int> GetPersonIdList(int OperationApplyId, int PersonDutyId)
{
return DApplyPersonDuty.GetPersonIdList(OperationApplyId, PersonDutyId);

View File

@ -54,6 +54,14 @@ namespace AIMSBLL
{
_record.InstrumentList.ApplianceRecordList = BApplianceRecord.GetApplianceRecordById(Convert.ToInt32(_record.Id), Convert.ToInt32(_record.InstrumentList.Id));
}
else
{
_record.InstrumentList = new OperationRecordInstrumentList();
_record.InstrumentList.OperationRecordId = _record.Id;
_record.InstrumentList.OperatorNo = PublicMethod.OperatorNo;
_record.InstrumentList.OperatorName = PublicMethod.OperatorName;
_record.InstrumentList.Id = BOperationRecordInstrumentList.Insert(_record.InstrumentList );
}
if (_record.InRoomTime != null)
_record.OperationDate = _record.InRoomTime.Value.ToShortDateString();

View File

@ -44,6 +44,7 @@ namespace AIMSBLL
OperationTemplateDrugObj.Spare2 = Drugdt.Rows[i]["DensityUnit"].ToString();
OperationTemplateDrugObj.Spare3 = Drugdt.Rows[i]["Velocity"].ToString();
OperationTemplateDrugObj.Spare4 = Drugdt.Rows[i]["VelocityUnit"].ToString();
OperationTemplateDrugObj.Spare5 = Drugdt.Rows[i]["ParentId"].ToString();
Add(OperationTemplateDrugObj);
}
@ -62,6 +63,7 @@ namespace AIMSBLL
OperationTemplateEventObj.ItemKindName = "事件";
OperationTemplateEventObj.InRoomTime = InRoomTime;
OperationTemplateEventObj.ItemId = EventId;
OperationTemplateEventObj.Value = 0;
OperationTemplateEventObj.BeginTime = DateTime.Parse(Eventdt.Rows[i]["EventBeginTime"].ToString());
OperationTemplateEventObj.EndTime = DateTime.Parse(Eventdt.Rows[i]["EventEndTime"].ToString());
OperationTemplateEventObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
@ -173,6 +175,7 @@ namespace AIMSBLL
FactDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
FactDrugObj.OperateDate = NewInRoomTime;
FactDrugObj.ParentId =int.Parse( dr["Spare5"].ToString());
BFactDrug.Add(FactDrugObj);
}

View File

@ -20,13 +20,14 @@ namespace AIMSDAL
internal static int Insert(SqlCommand cmd, OrisPatient orisPatient)
{
cmd.Parameters.Clear();
cmd.CommandText = "insert into Oris_Patient (MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate,PatientType,HisPatientId,VisitTimes,Address,Nation,Extend1,Extend2,Extend3,Extend4,Extend5) values (@MdrecNo,@ArchivesNo,@Name,@Sex,@BirthDay,@Height,@Weight,@DepId,@Illdistrict,@SickBed,@BloodType,@RHBloodType,@PatientKind,@InHosDate,@IdentityCard,@Contacts,@ContactsPhone,@OperatorNo,@OperatorName,@OperateDate,@PatientType,@HisPatientId,@VisitTimes,@Address,@Nation,@Extend1,@Extend2,@Extend3,@Extend4,@Extend5);select @@identity";
cmd.CommandText = "insert into Oris_Patient (MdrecNo,ArchivesNo,Name,Sex,BirthDay,Age,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate,PatientType,HisPatientId,VisitTimes,Address,Nation,Extend1,Extend2,Extend3,Extend4,Extend5) values (@MdrecNo,@ArchivesNo,@Name,@Sex,@BirthDay,@Age,@Height,@Weight,@DepId,@Illdistrict,@SickBed,@BloodType,@RHBloodType,@PatientKind,@InHosDate,@IdentityCard,@Contacts,@ContactsPhone,@OperatorNo,@OperatorName,@OperateDate,@PatientType,@HisPatientId,@VisitTimes,@Address,@Nation,@Extend1,@Extend2,@Extend3,@Extend4,@Extend5);select @@identity";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@MdrecNo", orisPatient.MdrecNo == null ? (object)DBNull.Value : (object)orisPatient.MdrecNo));
cmd.Parameters.Add(new SqlParameter("@ArchivesNo", orisPatient.ArchivesNo == null ? (object)DBNull.Value : (object)orisPatient.ArchivesNo));
cmd.Parameters.Add(new SqlParameter("@Name", orisPatient.Name == null ? (object)DBNull.Value : (object)orisPatient.Name));
cmd.Parameters.Add(new SqlParameter("@Sex", orisPatient.Sex == null ? (object)DBNull.Value : (object)orisPatient.Sex));
cmd.Parameters.Add(new SqlParameter("@BirthDay", orisPatient.BirthDay.HasValue ? (object)orisPatient.BirthDay.Value : (object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@Age", orisPatient.Age == null ? (object)DBNull.Value : (object)orisPatient.Age));
cmd.Parameters.Add(new SqlParameter("@Height", orisPatient.Height == null ? (object)DBNull.Value : (object)orisPatient.Height));
cmd.Parameters.Add(new SqlParameter("@Weight", orisPatient.Weight == null ? (object)DBNull.Value : (object)orisPatient.Weight));
cmd.Parameters.Add(new SqlParameter("@DepId", orisPatient.DepId.HasValue ? (object)orisPatient.DepId.Value : (object)DBNull.Value));
@ -196,13 +197,14 @@ namespace AIMSDAL
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, OrisPatient orisPatient)
{
cmd.CommandText = "update Oris_Patient set MdrecNo=@MdrecNo,ArchivesNo=@ArchivesNo,Name=@Name,Sex=@Sex,BirthDay=@BirthDay,Height=@Height,Weight=@Weight,DepId=@DepId,Illdistrict=@Illdistrict,SickBed=@SickBed,BloodType=@BloodType,RHBloodType=@RHBloodType,PatientKind=@PatientKind,InHosDate=@InHosDate,IdentityCard=@IdentityCard,Contacts=@Contacts,ContactsPhone=@ContactsPhone,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,PatientType=@PatientType,HisPatientId=@HisPatientId,VisitTimes=@VisitTimes,Address=@Address,Nation=@Nation,Extend1=@Extend1,Extend2=@Extend2,Extend3=@Extend3,Extend4=@Extend4,Extend5=@Extend5 where Id=@Id";
cmd.CommandText = "update Oris_Patient set MdrecNo=@MdrecNo,ArchivesNo=@ArchivesNo,Name=@Name,Sex=@Sex,BirthDay=@BirthDay,Age=@Age,Height=@Height,Weight=@Weight,DepId=@DepId,Illdistrict=@Illdistrict,SickBed=@SickBed,BloodType=@BloodType,RHBloodType=@RHBloodType,PatientKind=@PatientKind,InHosDate=@InHosDate,IdentityCard=@IdentityCard,Contacts=@Contacts,ContactsPhone=@ContactsPhone,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,PatientType=@PatientType,HisPatientId=@HisPatientId,VisitTimes=@VisitTimes,Address=@Address,Nation=@Nation,Extend1=@Extend1,Extend2=@Extend2,Extend3=@Extend3,Extend4=@Extend4,Extend5=@Extend5 where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@MdrecNo", orisPatient.MdrecNo == null ? (object)DBNull.Value : (object)orisPatient.MdrecNo));
cmd.Parameters.Add(new SqlParameter("@ArchivesNo", orisPatient.ArchivesNo == null ? (object)DBNull.Value : (object)orisPatient.ArchivesNo));
cmd.Parameters.Add(new SqlParameter("@Name", orisPatient.Name == null ? (object)DBNull.Value : (object)orisPatient.Name));
cmd.Parameters.Add(new SqlParameter("@Sex", orisPatient.Sex == null ? (object)DBNull.Value : (object)orisPatient.Sex));
cmd.Parameters.Add(new SqlParameter("@BirthDay", orisPatient.BirthDay.HasValue ? (object)orisPatient.BirthDay.Value : (object)DBNull.Value));
cmd.Parameters.Add(new SqlParameter("@Age", orisPatient.Age == null ? (object)DBNull.Value : (object)orisPatient.Age));
cmd.Parameters.Add(new SqlParameter("@Height", orisPatient.Height == null ? (object)DBNull.Value : (object)orisPatient.Height));
cmd.Parameters.Add(new SqlParameter("@Weight", orisPatient.Weight == null ? (object)DBNull.Value : (object)orisPatient.Weight));
cmd.Parameters.Add(new SqlParameter("@DepId", orisPatient.DepId.HasValue ? (object)orisPatient.DepId.Value : (object)DBNull.Value));
@ -652,6 +654,10 @@ namespace AIMSDAL
{
entity.BirthDay = Convert.ToDateTime(dr["BirthDay"]);
}
if (dr["Age"] != System.DBNull.Value)
{
entity.Age = dr["Age"].ToString();
}
if (dr["Height"] != System.DBNull.Value)
{
entity.Height = dr["Height"].ToString();

View File

@ -35,6 +35,13 @@ namespace AIMSDAL
strSql.Append(" where PersonDutyId ="+PersonDutyId+" and OperationApplyId=" + OperationApplyId + "");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void Delete(int OperationApplyId, int PersonDutyId, int PersonId)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete ApplyPersonDuty ");
strSql.Append(" where PersonDutyId ="+PersonDutyId+" and PersonId ="+PersonId+" and OperationApplyId=" + OperationApplyId + "");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static List<int> GetPersonIdList(int OperationApplyId,int PersonDutyId)
{
List<int> PersonIdList = new List<int>();

View File

@ -147,8 +147,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");
strSql.Append("fd.DrugEndTime,fd.Remark 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 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

@ -251,7 +251,7 @@ namespace AIMSDAL
"of1.VerifyTime, of1.VerifyOperatorName," +
"of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.ASA,of1.HeartFunctionLevel,of1.IsFasting, of1.Remark,ApplyDiagnoseInfoId,ApplyOperationInfoId ,of1.PlanOrder,of1.OperationRoomId ,of1.MedicalRecord " +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.ASA,of1.HeartFunctionLevel,of1.IsFasting, of1.Remark,ApplyDiagnoseInfoId,ApplyOperationInfoId ,of1.PlanOrder,of1.OperationRoomId ,of1.MedicalRecord,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.PatientId='" + PatientId + "'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
@ -271,7 +271,7 @@ namespace AIMSDAL
"of1.VerifyTime, of1.VerifyOperatorName," +
"of1.PlanOperationTime, of1.OperationRoom, of1.OperationRoomId, of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BegInData + "' and of1.OrderOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
@ -291,7 +291,7 @@ namespace AIMSDAL
"of1.VerifyTime, of1.VerifyOperatorName," +
"of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BegInData + "' and of1.PlanOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
@ -318,7 +318,7 @@ namespace AIMSDAL
"of1.VerifyTime, of1.VerifyOperatorName," +
"of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," +
"of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed ,of1.PlanOrder " +
"of1.InstrumentNurseSucceed, of1.TourNurseSucceed ,of1.PlanOrder,of1.PatientType " +
"FROM V_OperationFront of1 WHERE of1.ApplyId in (" + Temp + ")";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
@ -327,7 +327,7 @@ namespace AIMSDAL
{
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.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());
@ -340,7 +340,7 @@ namespace AIMSDAL
"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.[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());

View File

@ -50,7 +50,7 @@ namespace AIMSDAL
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationInfo WHERE PatientId=" + PatientId + "");
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationPosition WHERE PatientId=" + PatientId + "");
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + "");
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + "");
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " ");
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecordInfo WHERE OperationRecordId=" + RecorId);
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM PhysioData WHERE PatientId =" + RecorId);
HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecordInstrumentList WHERE OperationRecordId =" + RecorId);

View File

@ -40,7 +40,7 @@ namespace AIMSDAL
strSql.Append("" + OperationTemplateObj.ItemId + ",");
strSql.Append("'" + OperationTemplateObj.BeginTime + "',");
strSql.Append("'" + OperationTemplateObj.EndTime + "',");
strSql.Append("" + OperationTemplateObj.Value + ",");
strSql.Append("'" + OperationTemplateObj.Value + "',");
strSql.Append("'" + OperationTemplateObj.DosageUnit + "',");
strSql.Append("'" + OperationTemplateObj.DrugChannel + "',");
strSql.Append("'" + OperationTemplateObj.GiveDrugType + "',");
@ -171,7 +171,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 static],[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] FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and TemplateName='" + TemplateName + "'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
}

View File

@ -16,7 +16,7 @@ namespace AIMSDAL
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into [Oris_Patient](");
strSql.Append("MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate");
strSql.Append("MdrecNo,ArchivesNo,Name,Sex,BirthDay,Age,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate,PatientType");
strSql.Append(")");
strSql.Append(" values (");
strSql.Append("'" + Oris_PatientObj.MdrecNo + "',");
@ -24,6 +24,7 @@ namespace AIMSDAL
strSql.Append("'" + Oris_PatientObj.Name + "',");
strSql.Append("'" + Oris_PatientObj.Sex + "',");
strSql.Append("'" + Oris_PatientObj.BirthDay + "',");
strSql.Append("'" + Oris_PatientObj.Age + "',");
strSql.Append("'" + Oris_PatientObj.Height + "',");
strSql.Append("'" + Oris_PatientObj.Weight + "',");
strSql.Append("" + Oris_PatientObj.DepId + ",");
@ -39,44 +40,17 @@ namespace AIMSDAL
strSql.Append("'" + Oris_PatientObj.OperatorNo + "',");
strSql.Append("'" + Oris_PatientObj.OperatorName + "',");
strSql.Append("'" + Oris_PatientObj.OperateDate + "'");
strSql.Append("'" + Oris_PatientObj.PatientType + "',");
strSql.Append(")");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
//public static void Update(OrisPatient Oris_PatientObj)
//{
// StringBuilder strSql = new StringBuilder();
// strSql.Append("update Oris_Patient set ");
// strSql.Append("MdrecNo='" + Oris_PatientObj.MdrecNo + "',");
// strSql.Append("ArchivesNo='" + Oris_PatientObj.ArchivesNo + "',");
// strSql.Append("Name='" + Oris_PatientObj.Name + "',");
// strSql.Append("Sex='" + Oris_PatientObj.Sex + "',");
// strSql.Append("BirthDay='" + Oris_PatientObj.BirthDay + "',");
// strSql.Append("Height='" + Oris_PatientObj.Height + "',");
// strSql.Append("Weight='" + Oris_PatientObj.Weight + "',");
// strSql.Append("DepId=" + Oris_PatientObj.DepId + ",");
// strSql.Append("Illdistrict='" + Oris_PatientObj.Illdistrict + "',");
// strSql.Append("SickBed='" + Oris_PatientObj.SickBed + "',");
// strSql.Append("BloodType='" + Oris_PatientObj.BloodType + "',");
// strSql.Append("RHBloodType='" + Oris_PatientObj.RHBloodType + "',");
// strSql.Append("PatientKind='" + Oris_PatientObj.PatientKind + "',");
// strSql.Append("InHosDate='" + Oris_PatientObj.InHosDate + "',");
// strSql.Append("IdentityCard='" + Oris_PatientObj.IdentityCard + "',");
// strSql.Append("Contacts='" + Oris_PatientObj.Contacts + "',");
// strSql.Append("ContactsPhone='" + Oris_PatientObj.ContactsPhone + "',");
// strSql.Append("OperatorNo='" + Oris_PatientObj.OperatorNo + "',");
// strSql.Append("OperatorName='" + Oris_PatientObj.OperatorName + "',");
// strSql.Append("OperateDate='" + Oris_PatientObj.OperateDate + "'");
// strSql.Append(" where Id=" + Oris_PatientObj.Id + " ");
// HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
//}
public static OrisPatient GetModel(int Id)
{
OrisPatient Oris_PatientObj = new OrisPatient();
StringBuilder strSql = new StringBuilder();
strSql.Append("select ");
strSql.Append("Id,MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate ");
strSql.Append("Id,MdrecNo,ArchivesNo,Name,Sex,BirthDay,Age,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate,PatientType ");
strSql.Append(" from Oris_Patient ");
strSql.Append(" where Id=" + Id + "");
DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString());
@ -86,6 +60,7 @@ namespace AIMSDAL
{
Oris_PatientObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
}
Oris_PatientObj.PatientType = ds.Tables[0].Rows[0]["PatientType"].ToString();
Oris_PatientObj.MdrecNo = ds.Tables[0].Rows[0]["MdrecNo"].ToString();
Oris_PatientObj.ArchivesNo = ds.Tables[0].Rows[0]["ArchivesNo"].ToString();
Oris_PatientObj.Name = ds.Tables[0].Rows[0]["Name"].ToString();
@ -94,6 +69,7 @@ namespace AIMSDAL
{
Oris_PatientObj.BirthDay = DateTime.Parse(ds.Tables[0].Rows[0]["BirthDay"].ToString());
}
Oris_PatientObj.Age = ds.Tables[0].Rows[0]["Age"].ToString();
Oris_PatientObj.Height = ds.Tables[0].Rows[0]["Height"].ToString();
Oris_PatientObj.Weight = ds.Tables[0].Rows[0]["Weight"].ToString();
if (ds.Tables[0].Rows[0]["DepId"].ToString() != "")
@ -125,7 +101,7 @@ namespace AIMSDAL
public static DataTable GetDataTable(string strWhere)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select [Id],[MdrecNo],[ArchivesNo],[Name],[Sex],[BirthDay],[Height],[Weight],[DepId],[Illdistrict],[SickBed],[BloodType],[RHBloodType],[PatientKind],[InHosDate],[IdentityCard],[Contacts],[ContactsPhone] ");
strSql.Append("select [Id],[MdrecNo],[ArchivesNo],[Name],[Sex],[BirthDay],[Height],[Weight],[DepId],[Illdistrict],[SickBed],[BloodType],[RHBloodType],[PatientKind],[InHosDate],[IdentityCard],[Contacts],[ContactsPhone],PatientType ");
strSql.Append(" FROM Oris_Patient ");
if (strWhere.Trim() != "")
{

View File

@ -24,7 +24,7 @@ namespace AIMSBLL
{
string strSql = "SELECT of1.ApplyId Id, of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " +
"of1.ApplyOperationInfoName, of1.OperationDoctor, " +
"of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion " +
"of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom ,of1.Contagion,of1.OrderOperationTime " +
"FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + BeginDate.AddDays(1) + "'";
if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
@ -37,7 +37,7 @@ namespace AIMSBLL
}
public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate, string Room)
{
string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1";
string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion,of1.OrderOperationTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1";
if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'";
strSql += " order by [StateId] asc";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());

View File

@ -101,7 +101,7 @@ namespace AIMSModel
public Decimal? Value
{
get{ return value; }
set{ value=value; }
set{ this.value=value; }
}
/// <summary>
///

View File

@ -13,6 +13,7 @@ namespace AIMSModel
private string archivesNo;
private string name;
private string sex;
private string age;
private DateTime? birthDay;
private string height;
private string weight;
@ -91,6 +92,14 @@ namespace AIMSModel
}
/// <summary>
///
/// </summary>
public string Age
{
get{ return age; }
set{ age=value; }
}
/// <summary>
///
/// </summary>
public string Height
{

View File

@ -40,7 +40,7 @@ namespace BeginScreen
{
try
{
string sql = "select ApplyDepName 科室, CONVERT(VARCHAR(16),OperationRoom.Name )+'-'+CONVERT(VARCHAR(16),PlanOrder ) as 术间,case CONVERT(VARCHAR(16), PlanOrder ) when 1 then '10:00' else '接台' end as 时间,PatientName as 姓名,Sex as 性别,BirthDay as 年龄, MdrecNo as 住院号,SickBed as 床号,ApplyDiagnoseInfoName as 术前诊断,ApplyOperationInfoName as 拟施手术,OperationDoctor as 手术者,Assistant1 as 一助,Assistant2 as 二助,Assistant3 as 三助,AnaesthesiaMethodName as 拟施麻醉,AnesthesiaDoctor as 麻醉医生,InstrumentNurse as 洗手,TourNurse as 巡回 from [dbo].[V_OperationFront] left join OperationRoom on OperationRoom.Id = OperationRoomId where " + whereSql + " Order By OperationRoom.Id,PlanOrder" ;
string sql = "select ApplyDepName 科室, OperationRoom.Name as 术间, PlanOrder as 台次,case CONVERT(VARCHAR(16), PlanOrder ) when 1 then '10:00' else '接台' end as 时间,PatientName as 姓名,Sex as 性别,Age as 年龄, MdrecNo as 住院号,SickBed as 床号,ApplyDiagnoseInfoName as 术前诊断,ApplyOperationInfoName as 拟施手术,OperationDoctor as 手术者,Assistant1 as 一助,Assistant2 as 二助,Assistant3 as 三助,AnaesthesiaMethodName as 拟施麻醉,AnesthesiaDoctor as 麻醉医生,InstrumentNurse as 洗手,TourNurse as 巡回 from [dbo].[V_OperationFront] left join OperationRoom on OperationRoom.Id = OperationRoomId where " + whereSql + " Order By ApplyDepName,OperationRoom.Id,PlanOrder" ;
return DBHelper.GetDataTable(sql);
}
catch (Exception)

View File

@ -51,7 +51,7 @@ namespace BeginScreen
//}
//else
//{
string wheresql = "OrderOperationTime>='" + DateTime.Parse(tbJxrq2.Value).ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + DateTime.Parse(tbJxrq2.Value).ToString("yyyy-MM-dd 23:59:59") + "' and StateId <6 ";
string wheresql = "OrderOperationTime>='" + DateTime.Parse(tbJxrq2.Value).ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + DateTime.Parse(tbJxrq2.Value).ToString("yyyy-MM-dd 23:59:59") + "' and StateId >3 ";
if (ddlDep.SelectedValue.Trim() != "") wheresql += " and ( ApplyDepName like '%" + ddlDep.SelectedValue.Trim() + "%' ) ";
if (ddlPeo.SelectedValue.Trim() != "") wheresql += " and ( OperationDoctor like '%" + ddlPeo.SelectedValue.Trim() + "%') ";
//if (ddlList.SelectedValue != "") wheresql += " and ( dtp.name='" + ddlList.Text + "') ";

View File

@ -148,7 +148,7 @@ namespace DrawGraph
ope_Click(aEdit1, e);
break;
case "OperationRecord.OrtherDoctorId":
Worker_Click(aEdit1, e, 3);
Worker_Click(aEdit1, e, 4);
break;
//default:
// //在此处写日志

View File

@ -41,14 +41,10 @@ namespace DrawGraph
}
else if (PersonType == "4")
{
strSql = "SELECT top 10 p.Id,p.Name,p.IcdCode Code FROM Operation p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
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 + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
}
else if (PersonType == "5")
{
strSql = "SELECT top 10 p.Id,p.Name,p.IcdCode Code FROM Disease p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')";
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
}
strSql += " order by PersonOrder asc";
}
break;
case "手术":
strSql = "SELECT top 20 p.Id,p.Name,p.IcdCode Code FROM Operation p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' OR p.IcdCode LIKE '%" + HelpCode + "%')";

View File

@ -47,7 +47,6 @@ namespace DrawGraph
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeletePhysios));
this.panel1 = new System.Windows.Forms.Panel();
this.btnDelete = new DevComponents.DotNetBar.ButtonX();
this.btnSave = new DevComponents.DotNetBar.ButtonX();
@ -80,7 +79,7 @@ namespace DrawGraph
this.btnSave.Text = "取消";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// frmDeletePhysios
// DeletePhysios
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@ -88,10 +87,10 @@ namespace DrawGraph
this.Controls.Add(this.btnDelete);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmDeletePhysios";
this.Name = "DeletePhysios";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "选择删除的生命体征";
this.Text = "选择删除";
this.Load += new System.EventHandler(this.frmDeletePhysio_Load);
this.ResumeLayout(false);

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -114,9 +114,7 @@ namespace DrawGraph
{
float fontSize = 6f;
double ySpan = 0.008;
string tagName = "";
//左边写气血分析名
double x = leftColRatio;
string tagName = "";
if (bloodGasType == "动脉血气" || bloodGasType == null)
{
drawBloodGasDoseObj(y, Id + "XQFX", this.recordTime.Value, this.recordTime.Value, "动脉血气", fontSize);

View File

@ -168,7 +168,16 @@ namespace DrawGraph
if (Dosage != 0)
DoseStr = (((double)this.Dosage).ToString());
string RemarkStr = this.Remark;//
string s = "";
string DensityStr = Density == 0 ? "" : ((double)this.Density).ToString();
string VelocityStr = Velocity == 0 ? "" : ((double)this.Velocity).ToString();
string s = "";
if (DensityStr != "" || VelocityStr != "")
{
if (this.DensityUnit != null && this.DensityUnit != "") DensityStr += this.DensityUnit ;
s = (DensityStr + " " + VelocityStr).Trim();
if (DensityStr != "" && VelocityStr != "") s = DensityStr + "/" + VelocityStr;
if (this.VelocityUnit != null && this.VelocityUnit != "") s += this.VelocityUnit;
}
if ((EqualDose == null || EqualDose == ""))
{
if (Dosage != 0)

View File

@ -108,7 +108,20 @@ namespace DrawGraph
Value = aEdit.PackText;
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), "", aEdit.ControlTitleText, type.ToString(), Key);
dgvZd.DataSource = dt;
dgvZd.Location = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y + aEdit.CControl.Height);
System.Drawing.Point point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - aEdit.CControl.Height);
if (_type == "手术" || _type == "诊断")
{
dgvZd.Size = new System.Drawing.Size(400, 210);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 220);
}
else
{
dgvZd.Size = new System.Drawing.Size(200, 290);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 300);
}
dgvZd.Location = point;
if (_type == "手术" || _type == "诊断")
{
dgvZd.Size = new System.Drawing.Size(400, 210);

View File

@ -0,0 +1,253 @@
using DrawGraph;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DrawGraph
{
public class SelectDictValue2
{
private volatile static SelectDictValue2 _instance = null;
private static readonly object lockHelper = new object();
public delegate void SetValueHandler(string key,string Value,AbleEditPackObj aEdit);
public static event SetValueHandler SetValue ;
private SelectDictValue2() { }
public static SelectDictValue2 CreateInstance()
{
if (_instance == null)
{
lock (lockHelper)
{
if (_instance == null)
{
_instance = new SelectDictValue2();
System.Windows.Forms.DataGridViewTextBoxColumn id = new System.Windows.Forms.DataGridViewTextBoxColumn();
id.HeaderText = "id";
id.Name = "id";
id.DataPropertyName = "id";
id.ReadOnly = true;
id.Visible = false;
System.Windows.Forms.DataGridViewTextBoxColumn Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
Name.HeaderText = "名称";
Name.Name = "Name";
Name.DataPropertyName = "Name";
Name.ReadOnly = true;
System.Windows.Forms.DataGridViewTextBoxColumn Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
Code.HeaderText = "编码";
Code.Name = "Code";
Code.DataPropertyName = "Code";
Code.ReadOnly = true;
dgvZd = new System.Windows.Forms.DataGridView();
dgvZd.AllowUserToAddRows = false;
dgvZd.AllowUserToDeleteRows = false;
dgvZd.BackgroundColor = System.Drawing.Color.White;
DataGridViewCellStyle dgvStyle1 = new DataGridViewCellStyle();
dgvStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dgvStyle1.BackColor = System.Drawing.Color.White;
dgvStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dgvStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dgvStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dgvStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dgvStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
dgvZd.ColumnHeadersDefaultCellStyle = dgvStyle1;
dgvZd.ColumnHeadersHeight = 30;
dgvZd.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
id,
Name,
Code});
DataGridViewCellStyle dgvStyle2 = new DataGridViewCellStyle();
dgvStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dgvStyle2.BackColor = System.Drawing.SystemColors.Window;
dgvStyle2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dgvStyle2.ForeColor = System.Drawing.Color.Black;
dgvStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dgvStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dgvStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
dgvZd.DefaultCellStyle = dgvStyle2;
dgvZd.EnableHeadersVisualStyles = false;
dgvZd.Name = "dgvZd";
dgvZd.ReadOnly = true;
dgvZd.RowHeadersVisible = false;
dgvZd.RowTemplate.Height = 30;
dgvZd.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
dgvZd.Size = new System.Drawing.Size(200, 290);
dgvZd.TabIndex = 17;
dgvZd.AllowUserToResizeRows = false;
dgvZd.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dgvZd_CellClick);
}
}
}
return _instance;
}
static System.Windows.Forms.DataGridView dgvZd;
static AbleEditPackObj aEdit;
static string type;
public static TemplateManage template;
public static object OpeRecord;
public static string Key;
public static string Value;
public static bool isRadio;
public void Show(TemplateManage _template, object _OpeRecord, AbleEditPackObj _aEdit, string _type, bool _isRadio)
{
type = _type;
aEdit = _aEdit;
template = _template;
isRadio = _isRadio;
OpeRecord = _OpeRecord;
if (aEdit == null) return;
Key = aEdit.PackValue;
Value = aEdit.PackText;
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), "", aEdit.ControlTitleText, type.ToString(), Key);
dgvZd.DataSource = dt;
System.Drawing.Point point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - aEdit.CControl.Height);
if (_type == "手术" || _type == "诊断")
{
dgvZd.Size = new System.Drawing.Size(400, 210);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 220);
}
else
{
dgvZd.Size = new System.Drawing.Size(200, 290);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 300);
}
dgvZd.Location = point;
if (dgvZd.Parent == null)
aEdit.CControl.Parent.Controls.Add(dgvZd);
else
{
aEdit.CControl.Parent.Controls.Remove(dgvZd);
aEdit.CControl.Parent.Controls.Add(dgvZd);
}
dgvZd.Visible = true;
dgvZd.BringToFront();
}
public void ShowSel(Control CControl, object _OpeRecord)
{
OpeRecord = _OpeRecord;
if (aEdit == null) return;
Key = aEdit.PackValue;
Value = aEdit.PackText;
string text = CControl.Text;
text = text.Replace(Value + ",", "");
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), text, aEdit.ControlTitleText, type.ToString(), Key);
dgvZd.DataSource = dt;
dgvZd.BringToFront();
}
public void DelSel(Control CControl, object _OpeRecord)
{
OpeRecord = _OpeRecord;
if (aEdit == null) return;
if (CControl.Text.Trim() != "" && CControl.Text != Value)
{
string[] strs = CControl.Text.Split(',');
string[] names = Value.Split(',');
string[] ids = Key.Split(',');
List<string> namevalue = new List<string>();
List<string> idvalue = new List<string>();
for (int i = 0; i < strs.Length; i++)
{
for (int j = 0; j < names.Length; j++)
{
if (strs[i] == names[j] && !namevalue.Contains(names[j]))
{
namevalue.Add(names[j]);
idvalue.Add(ids[j]);
}
}
}
if (idvalue.Count > 0)
{
Value = string.Join(",", namevalue);
Key = string.Join(",", idvalue);
}
else
{
Value = "";
Key = "";
}
dgvZd.Visible = false;
//aEdit.IsVisible = !aEdit.IsVisible;
//设置属性的值
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, true);
}
else
{
Value = "";
Key = "";
dgvZd.Visible = false;
//aEdit.IsVisible = !aEdit.IsVisible;
//设置属性的值
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, true);
}
}
public static void Hidden(bool isShow = false)
{
if (aEdit != null)
{
aEdit.CControl.Parent.Controls.Remove(dgvZd);
dgvZd.Visible = false;
//aEdit.IsVisible =false;
}
}
static void dgvZd_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
SetContent(e.RowIndex);
}
}
static void SetContent(int index)
{
if (dgvZd.Rows[index].Cells["Name"].EditedFormattedValue.ToString() != "")
{
int id = int.Parse(dgvZd.Rows[index].Cells["id"].Value.ToString());
string name = dgvZd.Rows[index].Cells["Name"].Value.ToString();
string code = dgvZd.Rows[index].Cells["code"].Value.ToString();
if (isRadio == true)
{
Key = id.ToString();
Value = name;
}
else
{
if (Key != null && Key.Trim() != "")
{
Key = Key + "," + id;
Value = Value + "," + name;
}
else
{
Key = id.ToString();
Value = name;
}
}
index = 0;
dgvZd.Visible = false;
//设置属性的值
//aEdit.IsVisible = !aEdit.IsVisible;
//template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, true);
SetValue(Key, Value,aEdit);
}
}
}
}

View File

@ -108,11 +108,20 @@ namespace DrawGraph
Value = aEdit.PackText;
DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), "", aEdit.ControlTitleText, type.ToString(), Key);
dgvZd.DataSource = dt;
dgvZd.Location = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y + aEdit.CControl.Height);
System.Drawing.Point point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - aEdit.CControl.Height);
if (_type == "手术" || _type == "诊断")
{
dgvZd.Size = new System.Drawing.Size(400, 210);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 220);
}
else
{
dgvZd.Size = new System.Drawing.Size(200, 290);
if (_aEdit.RealEndY > 0.8)
point = new System.Drawing.Point(aEdit.CControl.Location.X, aEdit.CControl.Location.Y - 300);
}
dgvZd.Location = point;
if (dgvZd.Parent == null)
aEdit.CControl.Parent.Controls.Add(dgvZd);
else
@ -267,7 +276,7 @@ namespace DrawGraph
{
//设置属性的值
aEdit.IsVisible = !aEdit.IsVisible;
}
}
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Value, Key, isUpdate);
}
}

View File

@ -1,11 +1,13 @@
using AIMSExtension;
using DevComponents.Editors.DateTimeAdv;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using static System.Net.Mime.MediaTypeNames;
namespace DrawGraph
{
@ -16,7 +18,6 @@ namespace DrawGraph
{
private OperationRecord myOpeRecord = null;
private bool valChang = false; //值不变
AbleEditPackObj ableEdit2;
AbleEditPackObj ableEdit3;
@ -55,6 +56,7 @@ namespace DrawGraph
public override void editAr_Click(object sender, EventArgs e)
{
SelectDictValue2.Hidden();
//传过来的数据是不是可编辑的
AbleEditPackObj editPack = sender as AbleEditPackObj;
if (editPack == null) return;
@ -65,8 +67,11 @@ namespace DrawGraph
txt_DoubleClick(aEdit1.CControl, null);
}
public SelectDictValue2 aSyncSelectDict = null;
public override void Bind()
{
aSyncSelectDict = SelectDictValue2.CreateInstance();
SelectDictValue2.SetValue += ASyncSelectDict_SetValue;
base.Bind();
init();
if (ableEdit2 != null)
@ -107,8 +112,8 @@ namespace DrawGraph
{
ableEdit.CControl.DoubleClick -= new EventHandler(txt_DoubleClick);
ableEdit.CControl.DoubleClick += new EventHandler(txt_DoubleClick);
ableEdit.CControl.TextChanged -= new EventHandler(txt_Leave);
ableEdit.CControl.TextChanged += new EventHandler(txt_Leave);
//ableEdit.CControl.TextChanged -= new EventHandler(txt_Leave);
//ableEdit.CControl.TextChanged += new EventHandler(txt_Leave);
}
else if (ableEdit.ControlType == EControlType.CheckBox)
{
@ -133,7 +138,7 @@ namespace DrawGraph
{
foreach (Control conl in pan.Controls)
{
CheckBox chBox = conl as CheckBox ;
CheckBox chBox = conl as CheckBox;
if (chBox != null)
{
chBox.CheckedChanged -= new EventHandler(txt_Leave);
@ -152,7 +157,7 @@ namespace DrawGraph
ableEdit.CControl.KeyDown += new KeyEventHandler(text_keyDown);
ableEdit.CControl.GotFocus -= new EventHandler(txt_Focus);
ableEdit.CControl.GotFocus += new EventHandler(txt_Focus);
((TextBox) ableEdit.CControl).BorderStyle = BorderStyle.Fixed3D;
((TextBox)ableEdit.CControl).BorderStyle = BorderStyle.Fixed3D;
}
ableEdit.CControl.Leave -= new EventHandler(txt_Leave);
@ -163,6 +168,7 @@ namespace DrawGraph
}
}
private void txt_Focus(object sender, EventArgs e)
{
TextBox control = (TextBox)sender;
@ -286,7 +292,7 @@ namespace DrawGraph
/// 设置可编辑组件的显示样式
/// </summary>
/// <param name="ableEdit"></param>
private void SetAbleEditView(AbleEditPackObj ableEdit,bool isUpdate=false)
private void SetAbleEditView(AbleEditPackObj ableEdit, bool isUpdate = false)
{
string span = "";
double spanSum = Math.Round((float)(ableEdit.OneUnitCount / 18));
@ -363,14 +369,7 @@ namespace DrawGraph
else
{
value = ableEdit.PackValue;
string typeName = ableEdit.ControlTitleText;
//如果是“人员,2”这种需要把人员取出来
if (ableEdit.ControlTitleText.Contains(",") || ableEdit.ControlTitleText.Contains(""))
{
string[] strs = ableEdit.ControlTitleText.Replace("", ",").Split(',');
typeName = strs[0];
}
text = DocumentEntityMethod.GetDictionaryValuesById(ableEdit.PackValue, typeName);
text = DBManage.GetDictionaryValuesById(ableEdit.PackValue, ableEdit.ControlTitleText);
}
break;
default:
@ -421,6 +420,9 @@ namespace DrawGraph
value = DateTime.Now.ToString();
control.Text = text;
break;
case EControlType.Directory:
TYZD_Click(ableEdit, e, true);
break;
default:
text = ableEdit.CControl.Text;
value = ableEdit.CControl.Text;
@ -434,7 +436,7 @@ namespace DrawGraph
{
template.ZedControl.Refresh();
}
}
}
private void txt_Leave(object sender, EventArgs e)
{
@ -446,21 +448,21 @@ namespace DrawGraph
bool updateOk = true;
try
{
SetAbleEditView(ableEdit,true);
SetAbleEditView(ableEdit, true);
if (ableEdit.ControlType == EControlType.RadioButtonList)
{
{
if ((sender as CheckBox).Checked == true)
{
foreach (CheckBox chk in (sender as CheckBox).Parent.Controls)
{
chk.CheckedChanged -= new EventHandler(txt_Leave);
chk.CheckedChanged -= new EventHandler(txt_Leave);
if (chk != sender)
{
chk.Checked = false;
}
chk.CheckedChanged += new EventHandler(txt_Leave);
chk.CheckedChanged += new EventHandler(txt_Leave);
}
}
}
}
}
catch (Exception ex)
@ -492,5 +494,110 @@ namespace DrawGraph
}
}
}
//通用字典分组窗体打开
private void TYZD_Click(AbleEditPackObj sender, EventArgs e, bool isRadio = false)
{
AbleEditPackObj ableEdit = sender;
if (ableEdit == null) return;
try
{
if (myOpeRecord != null)
{
SelDict(sender, e, ableEdit.ControlTitleText, isRadio);
}
}
catch (Exception ex)
{
AIMSExtension.PublicMethod.WriteLog(ex);
}
}
private void SelDict(AbleEditPackObj sender, EventArgs e, string _DictType, bool isRadio = false)
{
AbleEditPackObj ableEdit = sender;
if (ableEdit == null) return;
ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged);
ableEdit.CControl.TextChanged += new EventHandler(CControl_TextChanged);
ableEdit.CControl.MouseDown -= new MouseEventHandler(CControl_MouseDown);
ableEdit.CControl.MouseDown += new MouseEventHandler(CControl_MouseDown);
ableEdit.CControl.KeyUp -= new KeyEventHandler(CControl_KeyUp);
ableEdit.CControl.KeyUp += new KeyEventHandler(CControl_KeyUp);
if (myOpeRecord != null)
{
Control conl = sender.CControl;
if (conl is TextBox)
{
((TextBox)conl).BorderStyle = BorderStyle.Fixed3D;
((TextBox)conl).Focus();
if (sender.PackValue != null && sender.PackValue.Trim() != "" && isRadio == false)
{
if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length)
((TextBox)conl).Text = ((TextBox)conl).Text + ",";
}
((TextBox)conl).Select(((TextBox)conl).Text.Length, 1);
}
aSyncSelectDict.Show(template, OpeRecord, sender, _DictType, isRadio);
//SetAbleEditView(ableEdit);
}
}
private void ASyncSelectDict_SetValue(string Value, string Text, AbleEditPackObj aEdit)
{
aEdit.PackValue = Value;
aEdit.PackText = Text;
template.SetObjValue(OpeRecord, aEdit.ClassDataSourceName, Text, Value, true);
}
private void CControl_TextChanged(object sender, EventArgs e)
{
if (myOpeRecord != null)
{
Control conl = sender as Control;
aSyncSelectDict.ShowSel(conl, OpeRecord);
}
}
private void CControl_KeyUp(object sender, KeyEventArgs e)
{
if (myOpeRecord != null)
{
Control conl = sender as Control;
if (conl.Text != SelectDictValue2.Value)
if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
{
aSyncSelectDict.DelSel(conl, OpeRecord);
}
}
}
private void CControl_MouseDown(object sender, MouseEventArgs e)
{
if (myOpeRecord != null)
{
TextBox conl = sender as TextBox;
string leftStr = conl.Text.Substring(0, conl.SelectionStart);
string rightStr = conl.Text.Substring(conl.SelectionStart, conl.Text.Length - conl.SelectionStart);
int startIndex = 0;
int endLength = conl.Text.Length;
if (leftStr.Contains(","))
{
int beginindex = leftStr.LastIndexOf(',');
startIndex = beginindex + 1;
if (rightStr.Contains(","))
{
endLength = rightStr.IndexOf(",") + (leftStr.Length - beginindex);
}
}
else
{
if (rightStr.Contains(","))
{
endLength = rightStr.IndexOf(",") + leftStr.Length + 1;
}
}
conl.Select(startIndex, endLength);
}
}
}
}

View File

@ -68,6 +68,7 @@
<SubType>Form</SubType>
</Compile>
<Compile Include="AreaManage\OutputManage.cs" />
<Compile Include="AreaManage\SelectDictValue2.cs" />
<Compile Include="AreaManage\TempDataManage.cs" />
<Compile Include="AreaManage\OperationRecordInfo.cs" />
<Compile Include="AreaManage\OperationRecordInstrumentList.cs" />
@ -238,6 +239,9 @@
<Compile Include="Graph\ZException.cs" />
<Compile Include="Graph\ZoomState.cs" />
<Compile Include="Graph\ZoomStateStack.cs" />
<EmbeddedResource Include="AreaManage\DeletePhysios.resx">
<DependentUpon>DeletePhysios.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>