术中模板子药调整
This commit is contained in:
parent
6c61a961ec
commit
4e5640d286
@ -140,13 +140,13 @@ namespace AIMS.PublicUI.UI
|
|||||||
|
|
||||||
private void Dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
private void Dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
if (_dataGridView.CurrentCell.ColumnIndex == 3)
|
//if (_dataGridView.CurrentCell.ColumnIndex == 3)
|
||||||
{
|
//{
|
||||||
frmPrescriptionDocument document = new frmPrescriptionDocument();
|
// frmPrescriptionDocument document = new frmPrescriptionDocument();
|
||||||
document._operationRecord = _record;
|
// document._operationRecord = _record;
|
||||||
document.CurrentRow = _dataGridView.CurrentRow;
|
// document.CurrentRow = _dataGridView.CurrentRow;
|
||||||
document.ShowDialog();
|
// document.ShowDialog();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Dgv_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
private void Dgv_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
||||||
@ -808,15 +808,17 @@ namespace AIMS.PublicUI.UI
|
|||||||
FactDrug er = _record.FactDrugList.Where(b => b.Id == id).ToList()[0];
|
FactDrug er = _record.FactDrugList.Where(b => b.Id == id).ToList()[0];
|
||||||
er.clearAddObj(zgcAnaesRecord);
|
er.clearAddObj(zgcAnaesRecord);
|
||||||
er.clearIm(zgcAnaesRecord);
|
er.clearIm(zgcAnaesRecord);
|
||||||
//er.IsValid = 0;
|
|
||||||
BFactDrug.Delete(er);
|
BFactDrug.Delete(er);
|
||||||
_record.FactDrugList.Remove(er);
|
_record.FactDrugList.Remove(er);
|
||||||
_dataGridView.Rows.Remove(_dataGridView.CurrentRow);
|
_dataGridView.Rows.Remove(_dataGridView.CurrentRow);
|
||||||
_lineNumber = 0;
|
_lineNumber = 0;
|
||||||
|
|
||||||
|
|
||||||
FullALLDGV();
|
FullALLDGV();
|
||||||
tabDrugs_SelectedTabChanged(null, null);
|
tabDrugs_SelectedTabChanged(null, null);
|
||||||
if (DrugsParam != null) DrugsParam();
|
if (DrugsParam != null) DrugsParam();
|
||||||
|
if (_dataGridView.Rows.Count == 0 || _dataGridView.Rows[_dataGridView.Rows.Count - 1].Cells[3].Value != null)
|
||||||
|
AddNewNullRows();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -824,6 +826,8 @@ namespace AIMS.PublicUI.UI
|
|||||||
{
|
{
|
||||||
_dataGridView.Rows.Remove(_dataGridView.CurrentRow);
|
_dataGridView.Rows.Remove(_dataGridView.CurrentRow);
|
||||||
_lineNumber = 0;
|
_lineNumber = 0;
|
||||||
|
if (_dataGridView.Rows.Count == 0 || _dataGridView.Rows[_dataGridView.Rows.Count - 1].Cells[3].Value != null)
|
||||||
|
AddNewNullRows();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,9 +11,9 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
public partial class BFactDrug
|
public partial class BFactDrug
|
||||||
{
|
{
|
||||||
public static void Add(FactDrug FactDrugObj)
|
public static int Add(FactDrug FactDrugObj)
|
||||||
{
|
{
|
||||||
DFactDrug.Add(FactDrugObj);
|
return DFactDrug.Add(FactDrugObj);
|
||||||
}
|
}
|
||||||
public static bool IsValid(int DrugId)
|
public static bool IsValid(int DrugId)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,12 +47,12 @@ namespace AIMSBLL
|
|||||||
OperationTemplateDrugObj.Spare5 = Drugdt.Rows[i]["ParentId"].ToString();
|
OperationTemplateDrugObj.Spare5 = Drugdt.Rows[i]["ParentId"].ToString();
|
||||||
OperationTemplateDrugObj.Spare6 = Drugdt.Rows[i]["DrugName"].ToString();
|
OperationTemplateDrugObj.Spare6 = Drugdt.Rows[i]["DrugName"].ToString();
|
||||||
OperationTemplateDrugObj.Spare7 = Drugdt.Rows[i]["Access"].ToString();
|
OperationTemplateDrugObj.Spare7 = Drugdt.Rows[i]["Access"].ToString();
|
||||||
|
OperationTemplateDrugObj.Spare8 = Drugdt.Rows[i]["Id"].ToString();
|
||||||
Add(OperationTemplateDrugObj);
|
Add(OperationTemplateDrugObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//事件
|
//事件
|
||||||
|
|
||||||
DataTable Eventdt = BFactEvents.GetDataTable(PatientId, TypeId);
|
DataTable Eventdt = BFactEvents.GetDataTable(PatientId, TypeId);
|
||||||
for (int i = 0; i < Eventdt.Rows.Count; i++)
|
for (int i = 0; i < Eventdt.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
@ -129,7 +129,7 @@ namespace AIMSBLL
|
|||||||
{
|
{
|
||||||
DateTime NewInRoomTime = AIMSExtension.PublicMethod.SystemDate();
|
DateTime NewInRoomTime = AIMSExtension.PublicMethod.SystemDate();
|
||||||
DataTable dt = DOperationTemplate.GetDataTable(TemplateName, TypeId);
|
DataTable dt = DOperationTemplate.GetDataTable(TemplateName, TypeId);
|
||||||
DataRow[] drugdr = dt.Select("ItemKindName='药品'");
|
DataRow[] drugdr = dt.Select("ItemKindName='药品' and Spare5='0' ");
|
||||||
foreach (DataRow dr in drugdr)
|
foreach (DataRow dr in drugdr)
|
||||||
{
|
{
|
||||||
int DrugId = int.Parse(dr["ItemId"].ToString());
|
int DrugId = int.Parse(dr["ItemId"].ToString());
|
||||||
@ -141,9 +141,6 @@ namespace AIMSBLL
|
|||||||
TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString()));
|
TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString()));
|
||||||
TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString()));
|
TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString()));
|
||||||
|
|
||||||
//FactDrugObj.DrugBeginTime = NewInRoomTime.AddSeconds(BeginTimets.TotalSeconds);
|
|
||||||
//FactDrugObj.DrugEndTime = NewInRoomTime.AddSeconds(EndTimets.TotalSeconds);
|
|
||||||
|
|
||||||
FactDrugObj.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds);
|
FactDrugObj.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds);
|
||||||
FactDrugObj.DrugEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds);
|
FactDrugObj.DrugEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds);
|
||||||
|
|
||||||
@ -177,11 +174,63 @@ namespace AIMSBLL
|
|||||||
FactDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
|
FactDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
|
||||||
FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
|
FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName;
|
||||||
FactDrugObj.OperateDate = NewInRoomTime;
|
FactDrugObj.OperateDate = NewInRoomTime;
|
||||||
FactDrugObj.ParentId =int.Parse( dr["Spare5"].ToString());
|
FactDrugObj.ParentId = 0;// int.Parse(dr["Spare5"].ToString());
|
||||||
FactDrugObj.DrugName = dr["Spare6"].ToString();
|
FactDrugObj.DrugName = dr["Spare6"].ToString();
|
||||||
FactDrugObj.Access = dr["Spare7"].ToString();
|
FactDrugObj.Access = dr["Spare7"].ToString();
|
||||||
BFactDrug.Add(FactDrugObj);
|
FactDrugObj.Id = BFactDrug.Add(FactDrugObj);
|
||||||
|
DataRow[] drugchild = dt.Select("ItemKindName='药品' and Spare5='"+dr["Spare8"].ToString()+"' ");
|
||||||
|
foreach (DataRow child in drugchild)
|
||||||
|
{
|
||||||
|
int DrugId2 = int.Parse(child["ItemId"].ToString());
|
||||||
|
if (BFactDrug.IsValid(DrugId2))
|
||||||
|
{
|
||||||
|
FactDrug FactDrugObjChild = new FactDrug();
|
||||||
|
FactDrugObjChild.PatientId = PatientId;
|
||||||
|
FactDrugObjChild.DrugId = DrugId2;
|
||||||
|
TimeSpan BeginTimets2 = DateTime.Parse(child["BeginTime"].ToString()).Subtract(DateTime.Parse(child["InRoomTime"].ToString()));
|
||||||
|
TimeSpan EndTimets2 = DateTime.Parse(child["EndTime"].ToString()).Subtract(DateTime.Parse(child["InRoomTime"].ToString()));
|
||||||
|
|
||||||
|
FactDrugObjChild.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets2.TotalSeconds);
|
||||||
|
FactDrugObjChild.DrugEndTime = InRoomTime.AddSeconds(EndTimets2.TotalSeconds);
|
||||||
|
|
||||||
|
if (child["BeginTime"].ToString() == child["EndTime"].ToString())
|
||||||
|
{
|
||||||
|
FactDrugObjChild.IsContinue = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FactDrugObjChild.IsContinue = 1;
|
||||||
|
}
|
||||||
|
FactDrugObjChild.DrugTypeId = TypeId;
|
||||||
|
if (child["Value"].ToString() != "")
|
||||||
|
{
|
||||||
|
FactDrugObjChild.Dosage = decimal.Parse(child["Value"].ToString());
|
||||||
|
}
|
||||||
|
FactDrugObjChild.DosageUnit = child["DosageUnit"].ToString();
|
||||||
|
if (child["Spare1"].ToString() != "" && child["Spare1"].ToString() != "0" && child["Spare1"].ToString() != "0.00")
|
||||||
|
{
|
||||||
|
FactDrugObjChild.Density = decimal.Parse(child["Spare1"].ToString());
|
||||||
|
FactDrugObjChild.DensityUnit = child["Spare2"].ToString();
|
||||||
|
}
|
||||||
|
if (child["Spare3"].ToString() != "" && child["Spare3"].ToString() != "0" && child["Spare3"].ToString() != "0.00")
|
||||||
|
{
|
||||||
|
FactDrugObjChild.Velocity = decimal.Parse(child["Spare3"].ToString());
|
||||||
|
FactDrugObjChild.VelocityUnit = child["Spare4"].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
FactDrugObjChild.DrugChannel = child["DrugChannel"].ToString();
|
||||||
|
FactDrugObjChild.GiveDrugType = child["GiveDrugType"].ToString();
|
||||||
|
FactDrugObjChild.OperatorNo = AIMSExtension.PublicMethod.OperatorNo;
|
||||||
|
FactDrugObjChild.OperatorName = AIMSExtension.PublicMethod.OperatorName;
|
||||||
|
FactDrugObjChild.OperateDate = NewInRoomTime;
|
||||||
|
FactDrugObjChild.ParentId = FactDrugObj.Id;
|
||||||
|
FactDrugObjChild.DrugName = child["Spare6"].ToString();
|
||||||
|
FactDrugObjChild.Access = child["Spare7"].ToString();
|
||||||
|
BFactDrug.Add(FactDrugObjChild);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,12 +7,13 @@ using AIMSModel;
|
|||||||
using AIMSObjectQuery;
|
using AIMSObjectQuery;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using DrawGraph;
|
using DrawGraph;
|
||||||
|
using HelperDB;
|
||||||
|
|
||||||
namespace AIMSDAL
|
namespace AIMSDAL
|
||||||
{
|
{
|
||||||
internal partial class DFactDrug
|
internal partial class DFactDrug
|
||||||
{
|
{
|
||||||
public static void Add(FactDrug FactDrugObj)
|
public static int Add(FactDrug FactDrugObj)
|
||||||
{
|
{
|
||||||
StringBuilder strSql = new StringBuilder();
|
StringBuilder strSql = new StringBuilder();
|
||||||
strSql.Append("insert into [FactDrug](");
|
strSql.Append("insert into [FactDrug](");
|
||||||
@ -38,8 +39,9 @@ namespace AIMSDAL
|
|||||||
strSql.Append("'" + FactDrugObj.Velocity + "',");
|
strSql.Append("'" + FactDrugObj.Velocity + "',");
|
||||||
strSql.Append("'" + FactDrugObj.VelocityUnit + "',");
|
strSql.Append("'" + FactDrugObj.VelocityUnit + "',");
|
||||||
strSql.Append("'" + FactDrugObj.ParentId + "'");
|
strSql.Append("'" + FactDrugObj.ParentId + "'");
|
||||||
strSql.Append(")");
|
strSql.Append(");select @@identity");
|
||||||
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
|
//HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
|
||||||
|
return Convert.ToInt32(DBHelper.ExecuteScalar(strSql.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsValid(int DrugId)
|
public static bool IsValid(int DrugId)
|
||||||
|
|||||||
@ -65,17 +65,17 @@ namespace DrawGraph
|
|||||||
strSql += " order by UseRate asc";
|
strSql += " order by UseRate asc";
|
||||||
break;
|
break;
|
||||||
case "手术体位":
|
case "手术体位":
|
||||||
strSql = "SELECT top 15 p.Id,p.Name,p.Explain Code FROM OperationBodyPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
strSql = "SELECT top 30 p.Id,p.Name,p.Explain Code FROM OperationBodyPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
||||||
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
||||||
strSql += " order by PositionOrder asc";
|
strSql += " order by PositionOrder asc";
|
||||||
break;
|
break;
|
||||||
case "手术部位":
|
case "手术部位":
|
||||||
strSql = "SELECT top 15 p.Id,p.Name,p.Explain Code FROM OperationPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
strSql = "SELECT top 20 p.Id,p.Name,p.Explain Code FROM OperationPosition p WHERE p.IsValid=1 AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
||||||
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
||||||
strSql += " order by PositionOrder asc";
|
strSql += " order by PositionOrder asc";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
strSql = "SELECT top 15 p.Id,p.Name,p.Remark Code FROM BasicDictionary p WHERE p.IsValid=1 and ParentId in(select Id from BasicDictionary where Name='" + _title + "') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
strSql = "SELECT top 30 p.Id,p.Name,p.Remark Code FROM BasicDictionary p WHERE p.IsValid=1 and ParentId in(select Id from BasicDictionary where Name='" + _title + "') AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%' )";
|
||||||
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
if (SelPerson != "") strSql += " AND p.Id not in (" + SelPerson + ") ";
|
||||||
strSql += " order by p.[Order] asc";
|
strSql += " order by p.[Order] asc";
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user