药品维护 剂量单位换算 医疗文书元数据二次加载

This commit is contained in:
leomon 2022-11-12 17:05:40 +08:00
parent 1396b0762c
commit 29d5b3c82d
31 changed files with 366 additions and 283 deletions

View File

@ -781,6 +781,7 @@
</EmbeddedResource>
<EmbeddedResource Include="DataDictionary\frmDrugs.resx">
<DependentUpon>frmDrugs.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DataDictionary\frmEvents.resx">
<DependentUpon>frmEvents.cs</DependentUpon>

View File

@ -28,11 +28,11 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("麻醉药");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("精神I类");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("精神II类");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("普通药");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("血液制品");
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("麻醉药");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("精神I类");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("精神II类");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("普通药");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("血液制品");
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbAdd = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@ -44,14 +44,20 @@
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.tsbExit = new System.Windows.Forms.ToolStripButton();
this.panel4 = new System.Windows.Forms.Panel();
this.txtUseDose3 = new AIMS.OremrUserControl.NumTextBox();
this.txtUseDose2 = new AIMS.OremrUserControl.NumTextBox();
this.txtUseDose1 = new AIMS.OremrUserControl.NumTextBox();
this.txtUseRate = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.txtUnit = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtChannel = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.cboDosageUnit = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtStand = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
@ -71,12 +77,7 @@
this.treeView1 = new System.Windows.Forms.TreeView();
this.panel2 = new System.Windows.Forms.Panel();
this.panel6 = new System.Windows.Forms.Panel();
this.txtUseDose1 = new AIMS.OremrUserControl.NumTextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtUseDose2 = new AIMS.OremrUserControl.NumTextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtUseDose3 = new AIMS.OremrUserControl.NumTextBox();
this.label10 = new System.Windows.Forms.Label();
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -91,7 +92,9 @@
this.UseRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Channel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Comment = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsValidColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.txtComment = new System.Windows.Forms.TextBox();
this.toolStrip1.SuspendLayout();
this.panel4.SuspendLayout();
this.panel1.SuspendLayout();
@ -214,9 +217,11 @@
this.panel4.Controls.Add(this.cboDosageUnit);
this.panel4.Controls.Add(this.label7);
this.panel4.Controls.Add(this.label1);
this.panel4.Controls.Add(this.txtComment);
this.panel4.Controls.Add(this.txtStand);
this.panel4.Controls.Add(this.label11);
this.panel4.Controls.Add(this.txtHelpCode);
this.panel4.Controls.Add(this.label10);
this.panel4.Controls.Add(this.label12);
this.panel4.Controls.Add(this.cboDrugKind);
this.panel4.Controls.Add(this.chkIsValid);
@ -232,6 +237,27 @@
this.panel4.Size = new System.Drawing.Size(691, 179);
this.panel4.TabIndex = 0;
//
// txtUseDose3
//
this.txtUseDose3.Location = new System.Drawing.Point(485, 100);
this.txtUseDose3.Name = "txtUseDose3";
this.txtUseDose3.Size = new System.Drawing.Size(80, 23);
this.txtUseDose3.TabIndex = 564;
//
// txtUseDose2
//
this.txtUseDose2.Location = new System.Drawing.Point(290, 100);
this.txtUseDose2.Name = "txtUseDose2";
this.txtUseDose2.Size = new System.Drawing.Size(80, 23);
this.txtUseDose2.TabIndex = 564;
//
// txtUseDose1
//
this.txtUseDose1.Location = new System.Drawing.Point(102, 100);
this.txtUseDose1.Name = "txtUseDose1";
this.txtUseDose1.Size = new System.Drawing.Size(80, 23);
this.txtUseDose1.TabIndex = 564;
//
// txtUseRate
//
this.txtUseRate.Location = new System.Drawing.Point(484, 129);
@ -280,6 +306,15 @@
this.txtChannel.Size = new System.Drawing.Size(121, 22);
this.txtChannel.TabIndex = 558;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(408, 105);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 14);
this.label9.TabIndex = 557;
this.label9.Text = "常用剂量3";
//
// label5
//
this.label5.AutoSize = true;
@ -289,6 +324,15 @@
this.label5.TabIndex = 557;
this.label5.Text = "途径";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(215, 105);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(70, 14);
this.label8.TabIndex = 557;
this.label8.Text = "常用剂量2";
//
// cboDosageUnit
//
this.cboDosageUnit.FormattingEnabled = true;
@ -297,6 +341,15 @@
this.cboDosageUnit.Size = new System.Drawing.Size(121, 22);
this.cboDosageUnit.TabIndex = 558;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(31, 105);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(63, 14);
this.label7.TabIndex = 557;
this.label7.Text = "常用剂量";
//
// label1
//
this.label1.AutoSize = true;
@ -443,6 +496,7 @@
this.UseRate,
this.Remark,
this.Channel,
this.Comment,
this.IsValidColumn});
this.dgv.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgv.Location = new System.Drawing.Point(0, 0);
@ -469,27 +523,27 @@
this.treeView1.Font = new System.Drawing.Font("宋体", 11F);
this.treeView1.Location = new System.Drawing.Point(0, 0);
this.treeView1.Name = "treeView1";
treeNode6.Name = "麻醉药";
treeNode6.Text = "麻醉药";
treeNode6.ToolTipText = "麻醉药";
treeNode7.Name = "精神I类";
treeNode7.Text = "精神I类";
treeNode7.ToolTipText = "精神I类";
treeNode8.Name = "精神II类";
treeNode8.Text = "精神II类";
treeNode8.ToolTipText = "精神II类";
treeNode9.Name = "普通药";
treeNode9.Text = "普通药";
treeNode9.ToolTipText = "普通药";
treeNode10.Name = "血液制品";
treeNode10.Text = "血液制品";
treeNode10.ToolTipText = "血液制品";
treeNode1.Name = "麻醉药";
treeNode1.Text = "麻醉药";
treeNode1.ToolTipText = "麻醉药";
treeNode2.Name = "精神I类";
treeNode2.Text = "精神I类";
treeNode2.ToolTipText = "精神I类";
treeNode3.Name = "精神II类";
treeNode3.Text = "精神II类";
treeNode3.ToolTipText = "精神II类";
treeNode4.Name = "普通药";
treeNode4.Text = "普通药";
treeNode4.ToolTipText = "普通药";
treeNode5.Name = "血液制品";
treeNode5.Text = "血液制品";
treeNode5.ToolTipText = "血液制品";
this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode6,
treeNode7,
treeNode8,
treeNode9,
treeNode10});
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5});
this.treeView1.Size = new System.Drawing.Size(181, 427);
this.treeView1.TabIndex = 0;
this.treeView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseDoubleClick);
@ -512,53 +566,14 @@
this.panel6.Size = new System.Drawing.Size(872, 47);
this.panel6.TabIndex = 9;
//
// txtUseDose1
// label10
//
this.txtUseDose1.Location = new System.Drawing.Point(102, 100);
this.txtUseDose1.Name = "txtUseDose1";
this.txtUseDose1.Size = new System.Drawing.Size(80, 23);
this.txtUseDose1.TabIndex = 564;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(31, 105);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(63, 14);
this.label7.TabIndex = 557;
this.label7.Text = "常用剂量";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(215, 105);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(70, 14);
this.label8.TabIndex = 557;
this.label8.Text = "常用剂量2";
//
// txtUseDose2
//
this.txtUseDose2.Location = new System.Drawing.Point(290, 100);
this.txtUseDose2.Name = "txtUseDose2";
this.txtUseDose2.Size = new System.Drawing.Size(80, 23);
this.txtUseDose2.TabIndex = 564;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(408, 105);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 14);
this.label9.TabIndex = 557;
this.label9.Text = "常用剂量3";
//
// txtUseDose3
//
this.txtUseDose3.Location = new System.Drawing.Point(485, 100);
this.txtUseDose3.Name = "txtUseDose3";
this.txtUseDose3.Size = new System.Drawing.Size(80, 23);
this.txtUseDose3.TabIndex = 564;
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(424, 49);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(49, 14);
this.label10.TabIndex = 551;
this.label10.Text = "表达式";
//
// Id
//
@ -659,6 +674,11 @@
this.Channel.HeaderText = "途径";
this.Channel.Name = "Channel";
//
// Comment
//
this.Comment.HeaderText = "表达式";
this.Comment.Name = "Comment";
//
// IsValidColumn
//
this.IsValidColumn.DataPropertyName = "IsValid";
@ -667,6 +687,13 @@
this.IsValidColumn.ReadOnly = true;
this.IsValidColumn.Width = 75;
//
// txtComment
//
this.txtComment.Location = new System.Drawing.Point(484, 46);
this.txtComment.Name = "txtComment";
this.txtComment.Size = new System.Drawing.Size(123, 23);
this.txtComment.TabIndex = 554;
//
// frmDrugs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -740,6 +767,8 @@
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtComment;
private System.Windows.Forms.DataGridViewTextBoxColumn Id;
private System.Windows.Forms.DataGridViewTextBoxColumn Code;
private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn;
@ -754,6 +783,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn UseRate;
private System.Windows.Forms.DataGridViewTextBoxColumn Remark;
private System.Windows.Forms.DataGridViewTextBoxColumn Channel;
private System.Windows.Forms.DataGridViewTextBoxColumn Comment;
private System.Windows.Forms.DataGridViewTextBoxColumn IsValidColumn;
}
}

View File

@ -68,6 +68,7 @@ namespace DataDictionary.UI
txtUseDose1.Text = dgv.CurrentRow.Cells["UseDose1"].Value.ToString();
txtUseDose2.Text = dgv.CurrentRow.Cells["UseDose2"].Value.ToString();
txtUseDose3.Text = dgv.CurrentRow.Cells["UseDose3"].Value.ToString();
txtComment.Text = dgv.CurrentRow.Cells["Comment"].Value.ToString();
if (dgv.CurrentRow.Cells["IsValidColumn"].Value.ToString() == "有效")
{
@ -114,6 +115,7 @@ namespace DataDictionary.UI
DrugsObj.UseDose1 = txtUseDose1.Text.Trim();
DrugsObj.UseDose2 = txtUseDose2.Text.Trim();
DrugsObj.UseDose3 = txtUseDose3.Text.Trim();
DrugsObj.Comment = txtComment.Text.Trim();
if (chkIsValid.Checked)
{
DrugsObj.IsValid = 1;
@ -144,6 +146,7 @@ namespace DataDictionary.UI
dgv.CurrentRow.Cells["UseDose1"].Value = txtUseDose1.Text;
dgv.CurrentRow.Cells["UseDose2"].Value = txtUseDose2.Text;
dgv.CurrentRow.Cells["UseDose3"].Value = txtUseDose3.Text;
dgv.CurrentRow.Cells["Comment"].Value = txtComment.Text;
dgv.CurrentRow.Cells["Channel"].Value = txtChannel.Text;
dgv.CurrentRow.Cells["IsValidColumn"].Value = chkIsValid.Checked == true ? "有效" : "无效";
AIMSExtension.PublicMethod.EnabledControl(panel4, false);
@ -184,6 +187,7 @@ namespace DataDictionary.UI
dt.Rows[i]["UseRate"].ToString(),
dt.Rows[i]["Remark"].ToString(),
dt.Rows[i]["Channel"].ToString(),
dt.Rows[i]["Comment"].ToString(),
dt.Rows[i]["IsValid"].ToString());
dgv.Rows[i].Cells["Id"].Selected = false;
}

View File

@ -162,6 +162,9 @@
<metadata name="Channel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Comment.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IsValidColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -102,6 +102,7 @@ namespace AIMS.DocManager
public String SysTime { get; set; }
public String OpeTime { get; set; }
public String MedicalRecord { get; set; }
public String MedicalHistory { get; set; }
public PatientLisResult LisResult { get; set; }
public static PatientRecord GetPatientRecord(int patientId)
@ -193,6 +194,7 @@ namespace AIMS.DocManager
patient.SysTime = dt.Rows[0]["SysTime"].ToString();
patient.OpeTime = dt.Rows[0]["OpeTime"].ToString();
patient.MedicalRecord = dt.Rows[0]["MedicalRecord"].ToString();
patient.MedicalHistory = dt.Rows[0]["MedicalHistory"].ToString();
}
patient.LisResult = PatientLisResult.GetLisResult(patient.MdrecNo);
#endregion

View File

@ -1329,24 +1329,17 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
foreach (DataRow dr in dtPhysioData.Rows)
{
try
{
if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue;
if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue;
if (!isCgtime(addPP.Name, dtTime)) continue;
PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = dtTime;
pdTemp.Value = Double.Parse(dr["ParamValue"].ToString());
pdTemp.YAisx = addPP.YAisx;
pdTemp.PhysioDataConfigId = addPP.Id;
pdTemp.PatientId = _record.Id.Value;
physioDatas.Add(pdTemp);
continue;
}
catch (Exception)
{
continue;
}
if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue;
if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue;
if (!isCgtime(addPP.Name, dtTime)) continue;
PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = dtTime;
pdTemp.Value = Double.Parse(dr["ParamValue"].ToString());
pdTemp.YAisx = addPP.YAisx;
pdTemp.PhysioDataConfigId = addPP.Id;
pdTemp.PatientId = _record.Id.Value;
physioDatas.Add(pdTemp);
continue;
}
}
}
@ -1391,9 +1384,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
catch (Exception)
catch (Exception ex)
{
//getPhysioData_Click(null, null);
PublicMethod.WriteLog(ex);
}
}
@ -1698,11 +1691,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
menuStrip.Items.Add(mnuAddDrug);
}
/// <summary>
/// 生命体征修改痕迹
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSyatemPhysion_Click(object sender, EventArgs e)
{
if (PatientId == 0) return;
@ -1721,6 +1709,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
_record.RoomId = int.Parse(RoomStr);
BOperationRecord.Update("RoomId=@RoomId where Id=@id ", new AIMSModel.ParameterList("@RoomId", _record.RoomId, "@id", _record.Id));
BOperationApply.UpdateApplyRoom(_record.OperationApplyId.Value, _record.RoomId.Value, _record.PlanOperationTime);
NowRoom = AIMSBLL.BOperationRoom.SelectSingle(_record.RoomId);
lblRoom.Text = NowRoom.Name;
}
@ -1884,9 +1873,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{
if (PatientId != 0)
{
SelectWorkerValue.Hidden();
SelectDictValue.Hidden();
SelectDictText.Hidden();
templateManage.OpeRecord = BOperationRecord.getRecord(_record, PatientId, RecoverId);
templateManage2.OpeRecord = templateManage.OpeRecord;
templateManage.BindOperationRecordValueAll(templateManage.OpeRecord);
@ -1901,6 +1887,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
templateManage2.Bind();
reDrawAnalysis();
SelectWorkerValue.Hidden();
SelectDictValue.Hidden();
SelectDictText.Hidden();
zgcAnaesRecord.Refresh();
zgcAnaesRecord2.Refresh();
}

View File

@ -1070,11 +1070,11 @@ namespace AIMS.PublicUI.UI
try
{
btnSave.Focus();
if (SaveValid(dgvDrugsSQ, 1)) Save(dgvDrugsSQ, 1);
if (SaveValid(dgvDrugsSQ, 0)) Save(dgvDrugsSQ, 0);
else return;
if (SaveValid(dgvDrugsSZ, 2)) Save(dgvDrugsSZ, 2);
if (SaveValid(dgvDrugsSZ, 1)) Save(dgvDrugsSZ, 1);
else return;
if (SaveValid(dgvDrugsSH, 3)) Save(dgvDrugsSH, 3);
if (SaveValid(dgvDrugsSH, 2)) Save(dgvDrugsSH, 2);
else return;
new frmMessageBox().Show();

View File

@ -4145,7 +4145,7 @@ namespace AIMS.OperationFront.UI
try
{
OperationRoom opeRoom = (sender as ToolStripItem).Tag as OperationRoom;
BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value);
BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value, dtpSearchTime.Value);
outMsg = string.Format("{2} 更换 患者:{0} 手术间{1} 成功!", grCurrentSub.Cells["Patient"].Value, opeRoom, RoomCardManage.lastSelectOpeRoom.operationRoom.Name);
RoomCardManage.WriteMsg(rtbLog, outMsg);
LoadOperationInfo(RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value);
@ -4423,7 +4423,7 @@ namespace AIMS.OperationFront.UI
private List<string> lstOrderStr = new List<string> { "台", "患者", "住院号", "床号", "手术医生", "手术名称", "手术时间" };
private void dgvWorkers_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (RoomCardManage.lastSelectOpeRoom == null) return;
if (RoomCardManage.lastSelectOpeRoom == null) return;
if (RoomCardManage.SelectIds == null) RoomCardManage.SelectIds = new List<int>();
int id = Convert.ToInt32(RoomCardManage.SelectDgv.CurrentRow.Cells[1].Value);

View File

@ -91,6 +91,27 @@ namespace AIMS.OremrUserControl
//加载文档
DModel = DocumentDAL.GetDocumentbyId(DModel.Id);
myEditControl.LoadDocumentFromString(DModel.XmlFile, "xml");
//患者基本信息二次赋值
var query = from XTextElement in myEditControl.Document.Fields.ToArray()
where XTextElement is XTextInputFieldElement
&& (XTextElement as XTextInputFieldElement).FieldSettings != null
&& (XTextElement as XTextInputFieldElement).FieldSettings.EditStyle != InputFieldEditStyle.Date
&& (XTextElement as XTextInputFieldElement).FieldSettings.ListSource != null
select XTextElement as XTextInputFieldElement;
DataRow[] dr = DocumentDAL.GetReflectionList("V_OperationRecordALL").Select("KB_SEQ <> '' and Reload=1");
var p = typeof(PatientRecord).GetProperties();
for (int i = 0; i < dr.Count(); i++)
{
var name = dr[i].ItemArray[0].ToString();
var value = dr[i].ItemArray[1].ToString();
XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault();
PropertyInfo info = p.Where(px => px.Name == name).FirstOrDefault();
if (element != null && info != null)
{
element.Text = info.GetValue(Patient, null).ToString();
}
}
}
else
{

Binary file not shown.

View File

@ -23,11 +23,11 @@ namespace AIMSBLL
string sql = string.Empty;
if (str == "")
{
sql = string.Format("select Id,HelpCode,Name,Id code,Stand,UseDose1,UseDose2,UseDose3 from Drugs where IsValid = 1");
sql = string.Format("select Id,HelpCode,Name,Id code,Stand,UseDose1,UseDose2,UseDose3,Comment from Drugs where IsValid = 1");
}
else
{
sql = string.Format("SELECT Top 26 e.Id,e.Name,Id code, Stand,UseDose1,UseDose2,UseDose3 FROM Drugs e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1", str);
sql = string.Format("SELECT Top 26 e.Id,e.Name,Id code, Stand,UseDose1,UseDose2,UseDose3,Comment FROM Drugs e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1", str);
}
return DBHelper.GetDataTable(sql);
}

View File

@ -75,9 +75,9 @@ namespace AIMSBLL
{
DOperationApply.UpdateApplyState(ApplyId, State);
}
public static void UpdateApplyRoom(int ApplyId, int room)
public static void UpdateApplyRoom(int ApplyId, int room,DateTime PlanOperationTime)
{
DOperationApply.UpdateApplyRoom(ApplyId, room);
DOperationApply.UpdateApplyRoom(ApplyId, room,PlanOperationTime);
}
public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State)
{

View File

@ -248,6 +248,7 @@ namespace AIMSBLL
FactDrug.OperatorName = DrugAllData.Rows[i]["OperatorName"].ToString();
FactDrug.OperateDate = DateTime.Parse(DrugAllData.Rows[i]["OperateDate"].ToString());
FactDrug.AnesType = DrugAllData.Rows[i]["AnesType"].ToString();
FactDrug.Comment = DrugAllData.Rows[i]["Comment"].ToString();
_record.FactDrugList.Add(FactDrug);
}
}

View File

@ -178,7 +178,7 @@ namespace AIMSDAL
/// <returns>影响的记录行数</returns>
internal static int ExcuteUpdateCommand(SqlCommand cmd, Drugs drugs)
{
cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel,UseDose1=@UseDose1,UseDose2=@UseDose2,UseDose3=@UseDose3 where Id=@Id";
cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel,UseDose1=@UseDose1,UseDose2=@UseDose2,UseDose3=@UseDose3,Comment=@Comment where Id=@Id";
//从实体中取出值放入Command的参数列表
cmd.Parameters.Add(new SqlParameter("@Name", drugs.Name == null ? (object)DBNull.Value : (object)drugs.Name));
cmd.Parameters.Add(new SqlParameter("@HelpCode", drugs.HelpCode == null ? (object)DBNull.Value : (object)drugs.HelpCode));
@ -196,6 +196,7 @@ namespace AIMSDAL
cmd.Parameters.Add(new SqlParameter("@UseDose1", drugs.UseDose1 == null ? (object)DBNull.Value : (object)drugs.UseDose1));
cmd.Parameters.Add(new SqlParameter("@UseDose2", drugs.UseDose2 == null ? (object)DBNull.Value : (object)drugs.UseDose2));
cmd.Parameters.Add(new SqlParameter("@UseDose3", drugs.UseDose3 == null ? (object)DBNull.Value : (object)drugs.UseDose3));
cmd.Parameters.Add(new SqlParameter("@Comment", drugs.Comment == null ? (object)DBNull.Value : (object)drugs.Comment));
cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id));
return cmd.ExecuteNonQuery();
}
@ -664,6 +665,10 @@ namespace AIMSDAL
{
entity.UseDose3 = dr["UseDose3"].ToString();
}
if (dr["Comment"] != System.DBNull.Value)
{
entity.Comment = dr["Comment"].ToString();
}
return entity;
}
}

View File

@ -116,7 +116,7 @@ namespace AIMSDAL
}
else
{
strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc";
strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '%" + HelpCode + "%' OR d.Name LIKE '%" + HelpCode + "%' OR d.HelpCode LIKE '%" + HelpCode + "%') order by UseRate desc";
}
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}

View File

@ -15,7 +15,7 @@ namespace AIMSDAL
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into [Drugs](");
strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Remark,Channel,UseDose1,UseDose2,UseDose3 ");
strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment ");
strSql.Append(")");
strSql.Append(" values (");
strSql.Append("'" + DrugsObj.Name + "',");
@ -33,7 +33,8 @@ namespace AIMSDAL
strSql.Append("'" + DrugsObj.Channel + "',");
strSql.Append("'" + DrugsObj.UseDose1 + "',");
strSql.Append("'" + DrugsObj.UseDose2 + "',");
strSql.Append("'" + DrugsObj.UseDose3 + "'");
strSql.Append("'" + DrugsObj.UseDose3 + "',");
strSql.Append("'" + DrugsObj.Comment + "'");
strSql.Append(")");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
@ -44,7 +45,7 @@ namespace AIMSDAL
Drugs DrugsObj = new Drugs();
StringBuilder strSql = new StringBuilder();
strSql.Append("select ");
strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3 ");
strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment ");
strSql.Append(" from Drugs ");
strSql.Append(" where Id=" + Id + "");
DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString());
@ -76,6 +77,7 @@ namespace AIMSDAL
DrugsObj.UseDose1 = ds.Tables[0].Rows[0]["UseDose1"].ToString();
DrugsObj.UseDose2 = ds.Tables[0].Rows[0]["UseDose2"].ToString();
DrugsObj.UseDose3 = ds.Tables[0].Rows[0]["UseDose3"].ToString();
DrugsObj.Comment = ds.Tables[0].Rows[0]["Comment"].ToString();
if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "")
{
DrugsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString());
@ -87,7 +89,7 @@ namespace AIMSDAL
public static DataTable GetDataTable(string DrugKind)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3");
strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment");
strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%'");
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
@ -95,7 +97,7 @@ namespace AIMSDAL
public static DataTable GetDataTable(string DrugKind, string Name)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3");
strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment");
strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%' " + (Name == "" ? "" : "and (NAME LIKE '%" + Name + "%' OR HelpCode LIKE '%" + Name + "%') "));
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
@ -103,20 +105,20 @@ namespace AIMSDAL
public static DataTable GetDosageUnitDataTable(int UnitType)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid ,Code,Remark,Channel,UseDose1,UseDose2,UseDose3");
strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid ,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment");
strSql.Append(" FROM DosageUnit WHERE UnitType=" + UnitType + " and IsValid=1");
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetDataTableByHelpCode(string HelpCode)
{
string strSql = "SELECT Id,Name,Stand,DosageUnit,UseDose1,UseDose2,UseDose3 FROM dbo.Drugs WHERE (NAME LIKE '%" + HelpCode + "%' OR HelpCode LIKE '%" + HelpCode + "%')";
string strSql = "SELECT Id,Name,Stand,DosageUnit,UseDose1,UseDose2,UseDose3,Comment FROM dbo.Drugs WHERE (NAME LIKE '%" + HelpCode + "%' OR HelpCode LIKE '%" + HelpCode + "%')";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable GetDrugsDataTable()
{
string strSql = "SELECT TOP 21 e.Id, e.Name,e.Stand,e.UseDose1,e.UseDose2,e.UseDose3 FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC ";
string strSql = "SELECT TOP 21 e.Id, e.Name,e.Stand,e.UseDose1,e.UseDose2,e.UseDose3,Comment FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC ";
return HelperDB.DbHelperSQL.GetDataTable(strSql);
}

View File

@ -91,7 +91,7 @@ namespace AIMSDAL
}
else
{
strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc";
strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '%" + HelpCode + "%' OR d.Name LIKE '%" + HelpCode + "%' OR d.HelpCode LIKE '%" + HelpCode + "%') order by UseRate desc";
}
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}

View File

@ -8,6 +8,7 @@ using AIMSObjectQuery;
using HelperDB;
using System.Reflection;
using System.Text;
using AIMSBLL;
namespace AIMSDAL
{
@ -71,6 +72,13 @@ namespace AIMSDAL
string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + " WHERE Id =" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdateApplyRoom(int ApplyId, int room, DateTime PlanOperationTime)
{
int PlanOrder = BOperationApply.GetMaxPlanOrder(PlanOperationTime, room) + 1;
string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + ",PlanOrder=" + PlanOrder + " WHERE Id =" + ApplyId + "";
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State)
{
//HHe 申请状态从 4改为3 3. 预排程 4 已排程
@ -363,7 +371,7 @@ namespace AIMSDAL
return null;
}
}
public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom)
public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom)
{
try
{

View File

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

View File

@ -118,7 +118,7 @@ namespace AIMSDAL
}
public static DataTable GetDataTable(string HelpCode)
{
string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')";
string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '%" + HelpCode + "%') OR (HelpCode LIKE '%" + HelpCode + "%')";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}

View File

@ -22,7 +22,7 @@ namespace AIMSBLL
" od.OperationBodyPositionName, od.OperationPositionName," +
" od.OperationDoctor, od.Assistant, od.AnesthesiaDoctor," +
" od.Nurse, od.Remarks,of1.MedicalRecord,of1.MedicalRecordTime FROM V_OperationDoing od" +
" LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '" + PatientName + "%')" +
" LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '%" + PatientName + "%')" +
" AND od.OperationBeginTime >='" + OperationBeginTime + "' AND od.OperationBeginTime <'" + OperationEndTime + "' AND " +
" od.[State] IN ('手术结束','麻醉恢复结束')";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());

View File

@ -21,6 +21,7 @@ namespace AIMSModel
private string operatorName;
private DateTime? operateDate;
public string Comment { get; set; }
public string Code { get; set; }
public string Remark { get; set; }
public string Channel { get; set; }

View File

@ -26,6 +26,7 @@ namespace AIMSObjectQuery
dictionary.Add("usedose1", "UseDose1");
dictionary.Add("usedose2", "UseDose2");
dictionary.Add("usedose3", "UseDose3");
dictionary.Add("comment", "Comment");
}
#region IMap

View File

@ -197,7 +197,8 @@ namespace DocumentManagement
KB_VALUE ,
KB_Reflection,
KB_STYLE ,
ListIndex
ListIndex ,
Reload
From KB_List
where IsValid = 1
Order By KB_PARENT , LISTINDEX , KB_NAME");
@ -218,6 +219,7 @@ namespace DocumentManagement
{
item.Style = KBEntryStyle.List;
}
item.SpellCode = dt.Rows[i][7].ToString();
//if (dt.Rows[i][5].ToString() == KBEntryStyle.ListSQL.ToString())
//{
// item.Style = KBEntryStyle.ListSQL;
@ -341,8 +343,8 @@ namespace DocumentManagement
public static DataTable GetReflectionList(string Vw_Info)
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" Select name,isnull(kb.KB_SEQ,'')as KB_SEQ FROM SysColumns syscn ");
strSql.Append(" left join (select KB_SEQ,KB_Reflection from KB_LIST where isvalid =1) kb ");
strSql.Append(" Select name,isnull(kb.KB_SEQ,'')as KB_SEQ,kb.ReLoad FROM SysColumns syscn ");
strSql.Append(" left join (select KB_SEQ,KB_Reflection,ReLoad from KB_LIST where isvalid =1) kb ");
strSql.Append(" on syscn.name = kb.KB_Reflection ");
strSql.Append(" Where id=Object_Id('" + Vw_Info + "') ");
DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString());
@ -366,7 +368,8 @@ namespace DocumentManagement
strSql.Append(" (select isnull(MAX(listindex),0)+1 from [KB_LIST] where KB_PARENT = '" + entry.ParentID + "' and IsValid = 1),");
strSql.Append(" 1,");
strSql.Append(" '" + AIMSExtension.PublicMethod.OperatorNo + "',");
strSql.Append(" getdate()");
strSql.Append(" getdate(),");
strSql.Append(" '" + entry.SpellCode + "'");
strSql.Append(" )");
DbHelperSQL.ExecNonQuery(strSql.ToString());
if (entry.Style != KBEntryStyle.ListSQL && entry.ListItems != null)
@ -413,7 +416,8 @@ namespace DocumentManagement
strSql.Append(" [KB_Reflection] = '" + entry.Text2 + "',");
strSql.Append(" [KB_STYLE] = '" + Convert.ToInt32(entry.Style) + "',");
strSql.Append("OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "',");
strSql.Append("OperateDate= getdate()");
strSql.Append("OperateDate= getdate(),");
strSql.Append("Reload='" + entry.SpellCode + "'");
strSql.Append(" where KB_SEQ = '" + entry.ID + "'");
DbHelperSQL.ExecNonQuery(strSql.ToString());
if (entry.Style != KBEntryStyle.ListSQL)

View File

@ -54,10 +54,13 @@
this.btnSave = new System.Windows.Forms.Button();
this.btnDel = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cboReLoad = new System.Windows.Forms.CheckBox();
this.btnSelect = new System.Windows.Forms.Button();
this.txtParentName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtViewName = new System.Windows.Forms.TextBox();
this.txtName = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.tvwKB = new DCSoft.Writer.Controls.KBTreeView();
@ -66,8 +69,6 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.txtViewName = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.groupBox4.SuspendLayout();
@ -88,7 +89,7 @@
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1136, 562);
this.panel1.TabIndex = 1;
@ -100,7 +101,7 @@
this.panel3.Controls.Add(this.groupBox1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(288, 0);
this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel3.Margin = new System.Windows.Forms.Padding(2);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(848, 562);
this.panel3.TabIndex = 2;
@ -179,7 +180,7 @@
this.panel5.Controls.Add(this.dgvItems);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(3, 68);
this.panel5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel5.Margin = new System.Windows.Forms.Padding(2);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(842, 217);
this.panel5.TabIndex = 10;
@ -193,7 +194,7 @@
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
this.panel6.Font = new System.Drawing.Font("宋体", 10.5F);
this.panel6.Location = new System.Drawing.Point(467, 0);
this.panel6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel6.Margin = new System.Windows.Forms.Padding(2);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(375, 217);
this.panel6.TabIndex = 11;
@ -203,7 +204,7 @@
//
this.btnReflection.Font = new System.Drawing.Font("宋体", 9F);
this.btnReflection.Location = new System.Drawing.Point(224, 11);
this.btnReflection.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnReflection.Margin = new System.Windows.Forms.Padding(2);
this.btnReflection.Name = "btnReflection";
this.btnReflection.Size = new System.Drawing.Size(56, 20);
this.btnReflection.TabIndex = 15;
@ -232,7 +233,7 @@
//
this.rtbSQL.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbSQL.Location = new System.Drawing.Point(467, 0);
this.rtbSQL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rtbSQL.Margin = new System.Windows.Forms.Padding(2);
this.rtbSQL.Name = "rtbSQL";
this.rtbSQL.Size = new System.Drawing.Size(375, 217);
this.rtbSQL.TabIndex = 0;
@ -281,7 +282,7 @@
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Font = new System.Drawing.Font("宋体", 10.5F);
this.panel4.Location = new System.Drawing.Point(3, 19);
this.panel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel4.Margin = new System.Windows.Forms.Padding(2);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(842, 49);
this.panel4.TabIndex = 9;
@ -290,7 +291,7 @@
//
this.rdReflection.AutoSize = true;
this.rdReflection.Location = new System.Drawing.Point(297, 18);
this.rdReflection.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rdReflection.Margin = new System.Windows.Forms.Padding(2);
this.rdReflection.Name = "rdReflection";
this.rdReflection.Size = new System.Drawing.Size(81, 18);
this.rdReflection.TabIndex = 2;
@ -302,7 +303,7 @@
//
this.rdSQL.AutoSize = true;
this.rdSQL.Location = new System.Drawing.Point(168, 18);
this.rdSQL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rdSQL.Margin = new System.Windows.Forms.Padding(2);
this.rdSQL.Name = "rdSQL";
this.rdSQL.Size = new System.Drawing.Size(74, 18);
this.rdSQL.TabIndex = 1;
@ -315,7 +316,7 @@
this.rdList.AutoSize = true;
this.rdList.Checked = true;
this.rdList.Location = new System.Drawing.Point(40, 18);
this.rdList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rdList.Margin = new System.Windows.Forms.Padding(2);
this.rdList.Name = "rdList";
this.rdList.Size = new System.Drawing.Size(53, 18);
this.rdList.TabIndex = 0;
@ -348,6 +349,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.cboReLoad);
this.groupBox1.Controls.Add(this.btnSelect);
this.groupBox1.Controls.Add(this.txtParentName);
this.groupBox1.Controls.Add(this.label1);
@ -363,11 +365,21 @@
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
// cboReLoad
//
this.cboReLoad.AutoSize = true;
this.cboReLoad.Location = new System.Drawing.Point(476, 65);
this.cboReLoad.Name = "cboReLoad";
this.cboReLoad.Size = new System.Drawing.Size(110, 18);
this.cboReLoad.TabIndex = 13;
this.cboReLoad.Text = "是否二次加载";
this.cboReLoad.UseVisualStyleBackColor = true;
//
// btnSelect
//
this.btnSelect.Font = new System.Drawing.Font("宋体", 9F);
this.btnSelect.Location = new System.Drawing.Point(239, 25);
this.btnSelect.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(56, 20);
this.btnSelect.TabIndex = 12;
@ -392,6 +404,13 @@
this.label1.TabIndex = 9;
this.label1.Text = "父节点:";
//
// txtViewName
//
this.txtViewName.Location = new System.Drawing.Point(319, 60);
this.txtViewName.Name = "txtViewName";
this.txtViewName.Size = new System.Drawing.Size(151, 23);
this.txtViewName.TabIndex = 5;
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(84, 60);
@ -399,6 +418,15 @@
this.txtName.Size = new System.Drawing.Size(151, 23);
this.txtName.TabIndex = 5;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(243, 64);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(70, 14);
this.label8.TabIndex = 4;
this.label8.Text = "试图名称:";
//
// label3
//
this.label3.AutoSize = true;
@ -414,7 +442,7 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.panel2.Padding = new System.Windows.Forms.Padding(3);
this.panel2.Size = new System.Drawing.Size(288, 562);
this.panel2.TabIndex = 1;
//
@ -422,12 +450,11 @@
//
this.tvwKB.Dock = System.Windows.Forms.DockStyle.Fill;
this.tvwKB.Font = new System.Drawing.Font("宋体", 10.5F);
this.tvwKB.HideSelection = false;
this.tvwKB.Location = new System.Drawing.Point(3, 3);
this.tvwKB.Name = "tvwKB";
this.tvwKB.Size = new System.Drawing.Size(282, 556);
this.tvwKB.TabIndex = 1;
this.tvwKB.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvwKB_NodeMouseDoubleClick);
this.tvwKB.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvwKB_AfterSelect);
this.tvwKB.MouseClick += new System.Windows.Forms.MouseEventHandler(this.tvwKB_MouseClick);
//
// contextMenuStrip2
@ -469,29 +496,13 @@
this.ToolStripMenuItem.Text = "下移";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// txtViewName
//
this.txtViewName.Location = new System.Drawing.Point(319, 60);
this.txtViewName.Name = "txtViewName";
this.txtViewName.Size = new System.Drawing.Size(151, 23);
this.txtViewName.TabIndex = 5;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(243, 64);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(70, 14);
this.label8.TabIndex = 4;
this.label8.Text = "试图名称:";
//
// frmKB
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1136, 562);
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "frmKB";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "知识库";
@ -558,5 +569,6 @@
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtViewName;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.CheckBox cboReLoad;
}
}

View File

@ -28,6 +28,8 @@ namespace DocumentManagement
tvwKB.KBLibrary = DocumentDAL.Lib;
tvwKB.RefreshView();
tvwKB.ExpandAll();
tvwKB.SelectedNode = tvwKB.Nodes[0] ;
}
private void btnClear_Click(object sender, EventArgs e)
@ -202,7 +204,7 @@ namespace DocumentManagement
entry.ID = "KB" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
entry.Text = txtName.Text.Trim();
entry.ParentID = txtParentName.Tag == null ? null : ((KBEntry)txtParentName.Tag).ID;
//entry.SpellCode = txtReflection.Text;
entry.SpellCode = cboReLoad.Checked == true ? "1" : "0";
//判断是List还是ListSQL
if (rdSQL.Checked == true)
{
@ -270,14 +272,6 @@ namespace DocumentManagement
RefreshKB();
}
private void tvwKB_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip2.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void rd_CheckedChanged(object sender, EventArgs e)
{
RadioButton rd = sender as RadioButton;
@ -306,45 +300,6 @@ namespace DocumentManagement
}
}
private void tvwKB_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
btnClear_Click(null, null);
if (tvwKB.SelectedNode == null)
{
return;
}
KBEntry entry = (KBEntry)tvwKB.SelectedNode.Tag;
if (tvwKB.SelectedNode.Parent != null)
{
txtParentName.Tag = (KBEntry)tvwKB.SelectedNode.Parent.Tag;
txtParentName.Text = tvwKB.SelectedNode.Parent.Text;
}
else
{
txtParentName.Text = "无";
}
txtName.Text = entry.Text;
txtName.Tag = entry;
//判断节点的Style
if (entry.Style == KBEntryStyle.List && entry.ListItems != null && entry.ListItems.Count > 0)
{
rdList.Checked = true;
foreach (ListItem item in entry.ListItems)
{
dgvItems.Rows.Add(item.Text, item.Value);
}
}
else if (entry.Style == KBEntryStyle.ListSQL)
{
rdSQL.Checked = true;
rtbSQL.Text = entry.Value;
}
else if (entry.Text2 != null)
{
this.rdReflection.Checked = true;
txtReflection.Text = entry.Text2.ToString();
}
}
private void btnSelect_Click(object sender, EventArgs e)
{
@ -375,5 +330,53 @@ namespace DocumentManagement
MessageBox.Show("删除成功!");
}
}
private void tvwKB_MouseClick(object sender, MouseEventArgs e)
{
}
private void tvwKB_AfterSelect(object sender, TreeViewEventArgs e)
{
if (tvwKB.SelectedNode == null)
{
return;
}
btnClear_Click(null, null);
KBEntry entry = (KBEntry)tvwKB.SelectedNode.Tag;
if (tvwKB.SelectedNode.Parent != null)
{
txtParentName.Tag = (KBEntry)tvwKB.SelectedNode.Parent.Tag;
txtParentName.Text = tvwKB.SelectedNode.Parent.Text;
}
else
{
txtParentName.Text = "无";
}
txtName.Text = entry.Text;
txtName.Tag = entry;
if (entry.SpellCode == "1")
cboReLoad.Checked = true;
else
cboReLoad.Checked = false;
//判断节点的Style
if (entry.Style == KBEntryStyle.List && entry.ListItems != null && entry.ListItems.Count > 0)
{
rdList.Checked = true;
foreach (ListItem item in entry.ListItems)
{
dgvItems.Rows.Add(item.Text, item.Value);
}
}
else if (entry.Style == KBEntryStyle.ListSQL)
{
rdSQL.Checked = true;
rtbSQL.Text = entry.Value;
}
else if (entry.Text2 != null)
{
this.rdReflection.Checked = true;
txtReflection.Text = entry.Text2.ToString();
}
}
}
}

View File

@ -159,7 +159,7 @@ namespace DrawGraph
//存在氧气从第二行开始画
if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药").ToList().Count > 0) rowDrugsIndex = 1;
//加药按加药时间排序
//_FactDrugList.Sort(new FactDrugComparer());
_FactDrugList.Sort(new FactDrugComparer());
for (int i = 0; i < _FactDrugList.Count; i++)
@ -334,7 +334,7 @@ namespace DrawGraph
isSap = true;
}
}
if (record.DosageUnit != null && record.DosageUnit.Trim().ToLower() == "u" && record.DrugKind == "血制品")
if (record.BloodType != null && record.BloodType != "")
{
isSap = true;
}
@ -348,10 +348,8 @@ namespace DrawGraph
if (linePack == null) return;
double x = linePack.RealX;
RectangleFramePackObj remarkPpack = template.GetPackObjectOTag<RectangleFramePackObj>("RemarkManage_RectangleFramePackObj_2");
float fontsize = 7f;
int DrawIndex = 0;
double y;
int remarkcount = 6;
double StartRemarkRatio = remarkPpack.RealY;
double EndRemarkRatio = remarkPpack.RealEndY;
try
@ -360,22 +358,34 @@ namespace DrawGraph
double allDrugDose = 0; double allOutDose = 0;
myOpeRecord.FactDrugList.ForEach(drug =>
{
//if (drug.DrugEffectId != null && drug.DrugEffectId != 252)
//{
if (drug.Dosage > 0)//&& (drug.DrugAccess != null && drug.DrugAccess > 0)
if (drug.DrugChannel == "ivgtt" || drug.DrugChannel == "iv")
{
double drugDose = 0;
if (drug.DosageUnit.Trim().ToLower() == "ml") drugDose = Convert.ToDouble(drug.Dosage);
if (drug.DrugChannel == "ivgtt" || drug.DrugChannel == "iv")
if (drug.DosageUnit.Trim().ToLower() == "ml")
{
if (drugDose >= 50)
if (drug.Dosage >= 50)
{
allDrugDose += drugDose;
drugDose = Convert.ToDouble(drug.Dosage);
}
}
else if (drug.Comment != null && drug.Comment != "")
{
List<string> strings = drug.Comment.Split('|').ToList();
foreach (var items in strings)
{
//单位=100|治疗量=200|U=200|u=200
List<string> item = items.Split('=').ToList();
if (item[0] == drug.DosageUnit.Trim())
{
double dose = Convert.ToDouble(drug.Dosage) * Convert.ToDouble(item[1]);
allDrugDose += dose;
break;
}
}
}
allDrugDose += drugDose;
}
//}
});
template.SetObjValue(myOpeRecord, "OperationRecord.InAmount", allDrugDose.ToString(), allDrugDose.ToString(), allDrugDose.ToString() != myOpeRecord.InAmount ? true : false);
DrawIndex++;

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
using System.Drawing;
using System.Linq;
using System.Text;
@ -23,6 +24,7 @@ namespace DrawGraph
public string Remark;
public string DrugKind;
public string AnesType;
public string Comment;
public string OperatorNo { get; set; }
public string OperatorName { get; set; }
@ -35,7 +37,6 @@ namespace DrawGraph
public string VelocityUnit;
public string BloodType;
public int ParentId;
public List<FactDrug> ChildFactDrugList;
public bool isZuDrug { get; set; }
@ -174,7 +175,7 @@ namespace DrawGraph
string s = "";
if (DensityStr != "" || VelocityStr != "")
{
if (this.DensityUnit != null && this.DensityUnit != "") DensityStr += this.DensityUnit ;
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;
@ -262,4 +263,14 @@ namespace DrawGraph
}
}
/// <summary>
/// 加药排序类
/// </summary>
public class FactDrugComparer : IComparer<FactDrug>
{
public int Compare(FactDrug x, FactDrug y)
{
return (x.DrugBeginTime.CompareTo(y.DrugBeginTime));
}
}
}

View File

@ -188,4 +188,15 @@ namespace DrawGraph
}
/// <summary>
/// 事件排序类
/// </summary>
public class FactEventsComparer : IComparer<FactEvents>
{
public int Compare(FactEvents x, FactEvents y)
{
return (x.EventBeginTime.Value.CompareTo(y.EventBeginTime.Value));
}
}
}

View File

@ -125,9 +125,7 @@ namespace DrawGraph
double span = getYPositionByListIndex(1, eventy, eventendy, 2);
List<string> eventListstr = new List<string>();
eventListstr.Add("【事件】");
//myOpeRecord.FactEventsList.Sort(new FactEventsComparer());
//List<string> eventlist =
//.GetNode(EVENTPARAMPATH, "name");
myOpeRecord.FactEventsList.Sort(new FactEventsComparer());
//循环加药集体
for (int i = 0; i < myOpeRecord.FactEventsList.Count; i++)
{
@ -146,43 +144,12 @@ namespace DrawGraph
eventListstr.Add(string.Format("{0}{1}->{2} {3} {4}{5}", getNumber(i), temp.EventBeginTime.Value.ToShortTimeString(), temp.EventEndTime.Value.ToShortTimeString(), temp.EventName, "", temp.Remark == null ? "" : temp.Remark.ToString()));
}
//设置事件对象的相应属性,只达到了基本解耦,封装有限,有待完善
temp.setAnasArr(ZedControl, eventstartX, eventendX, myOpeRecord.pageBegin, myOpeRecord.pageBegin.AddMinutes(EVERY_PAGE_TIME_SPAN));
try
{
//循环XML文件,文件中的内容是只画图不写字的事件对旬
//DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + temp.EventName + "' ", "");
//if (dr.Length > 0)
//{
// temp.clearDNAndDT(ZedControl);
// string tagName = dr[0]["imgPath"].ToString();
// temp.drawIMG(ZedControl, tagName, eventy, 0.013);
//}
//else
//{
// int DValue = 0;
// string drawNumber = "";
// if (drawDatetime != null && temp.EventBeginTime > drawDatetime.Value.AddMinutes(-1) && temp.EventBeginTime < drawDatetime.Value.AddMinutes(10) && LastNumber != "" && drawEvent != null)
// {
// drawEvent.clearDNAndDT(ZedControl);
// drawEvent = temp;
// drawNumber = LastNumber + "-" + getNumber(i);// (i + 1).ToString();//
// DValue = (int)(((TimeSpan)(temp.EventBeginTime - drawDatetime.Value)).TotalMinutes / 2);
// }
// else
// {
// LastNumber = getNumber(i);// (i + 1).ToString();//
// drawNumber = LastNumber;
// drawEvent = temp;
// drawDatetime = temp.EventBeginTime.Value;
// }
// //画图上的序号
// temp.drawNumber(ZedControl, drawNumber, eventy + span - 0.001, DValue, Color.DarkBlue);
//}
//rowIndex++;
//循环XML文件,文件中的内容是只画图不写字的事件对旬
DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + temp.EventName + "' ", "");
string EventName = temp.EventName;
if (EventName == "喉罩") EventName = "插管";
DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + EventName + "' ", "");
if (dr.Length > 0)
{
temp.clearDNAndDT(ZedControl);

View File

@ -144,7 +144,7 @@ namespace DrawGraph
});
List<FactDrug> _FactDrugList = myOpeRecord.FactDrugList.Where(s => IfInTimeExist(s.DrugBeginTime, s.End) == true).ToList();
//加药按加药时间排序
//_FactDrugList.Sort(new FactDrugComparer());
_FactDrugList.Sort(new FactDrugComparer());
for (int i = 0; i < _FactDrugList.Count; i++)
{
@ -323,10 +323,6 @@ namespace DrawGraph
isSap = true;
}
}
if (record.DosageUnit != null && record.DosageUnit.Trim().ToLower() == "u" && record.DrugKind == "血制品")
{
isSap = true;
}
if (record.BloodType != null && record.BloodType != "")
{
isSap = true;