/// <summary> /// 根据药品的种类获获得药物的编码和药物名称. /// </summary> /// <returns>EssentialDrugMessage.</returns> internal DrugMessage GetDrugCategoryMessage(EnumDrugCategories drugCategory) { var result = new DrugMessage { ProductNumber = DrugMaintenances.ProductNumber, ProductName = DrugMaintenances.ProductName, Cost = DrugMaintenances.UnitCost * Quantity };; switch (drugCategory) { case EnumDrugCategories.ALL_DRUG: break; case EnumDrugCategories.ESSENTIAL_DRUG: if (!IsEssential) { result = null; } break; case EnumDrugCategories.ANTIBIOTIC_DRUG: if (!(DrugMaintenances.AntibioticManageLevelId >= 1 && DrugMaintenances.AntibioticManageLevelId <= 3)) { result = null; } break; default: break; } return(result); }
/// <summary> /// 根据药品的种类获获得药物的编码和药物名称. /// </summary> /// <returns>EssentialDrugMessage.</returns> internal DrugMessage GetDrugCategoryMessage(EnumDrugCategory drugCategory) { var result = new DrugMessage { ProductID = this.Origin_CJID.HasValue ? this.Origin_CJID.Value : -1, ProductName = this.ProductName, Cost = this.ActualPrice }; switch (drugCategory) { case EnumDrugCategory.ALL_DRUG: break; case EnumDrugCategory.ESSENTIAL_DRUG: if (!IsEssential) { result = null; } break; case EnumDrugCategory.ANTIBIOTIC_DRUG: if (!this.IsAntibiotic) { result = null; } break; default: break; } return(result); }
/// <summary> /// 根据药品的种类获获得药物的编码和药物名称. /// </summary> /// <returns>EssentialDrugMessage.</returns> internal DrugMessage GetDrugCategoryMessage(DateTime startTime, DateTime endTime, EnumDrugCategory drugCategory) { var result = new DrugMessage { ProductID = this.Origin_CJID, ProductName = this.ProductName, Cost = this.DrugFees.Sum(d => d.ActualPriceInDuration(startTime, endTime)) }; switch (drugCategory) { case EnumDrugCategory.ALL_DRUG: break; case EnumDrugCategory.ESSENTIAL_DRUG: if (!IsEssential) { result = new DrugMessage(); } break; case EnumDrugCategory.ANTIBIOTIC_DRUG: if (!this.IsAntibioticDrug) { result = new DrugMessage(); } break; default: break; } return(result); }
/// <summary> /// 获得基本药物的编码和药物名称. /// </summary> /// <returns>EssentialDrugMessage.</returns> internal DrugMessage GetEssentialDrugMessage() { DrugMessage result = new DrugMessage(); if (IsEssential) { result = new DrugMessage { ProductID = this.Origin_CJID.HasValue ? this.Origin_CJID.Value : -1, ProductName = this.ProductName, Cost = ActualPrice }; } return(result); }
protected override void OnAfterSelect(TreeViewEventArgs e) { Neusoft.HISFC.Models.Pharmacy.DrugMessage drugMessage = new DrugMessage(); ArrayList al = new ArrayList(); bool isDetail = true; this.GetSelectData(e.Node as DrugMessageTreeNode, ref drugMessage, ref al, ref isDetail); if (al != null) { if (this.SelectDataEvent != null) { this.SelectDataEvent(drugMessage, al, isDetail); } } base.OnAfterSelect(e); }
/// <summary> /// 根据传入的摆药通知数组,显示在tvDrugMessage中 /// 传入参数数组是按照科室、摆药单类型、发送时间(倒序)排序的 /// </summary> /// <param name="alDrugMessage">摆药通知数组</param> /// <param name="showLevel">显示等级</param> public virtual void ShowListForDeptFirst(ArrayList alDrugMessage, int showLevel) { this.Nodes.Clear(); string privBillCode = ""; string privDeptCode = ""; //上一个科室 Neusoft.HISFC.Models.Pharmacy.DrugMessage privInfo = new Neusoft.HISFC.Models.Pharmacy.DrugMessage(); DrugMessageTreeNode nodePatient; DrugMessageTreeNode nodeDept = new DrugMessageTreeNode(); DrugMessageTreeNode nodeBill = new DrugMessageTreeNode(); foreach (DrugMessage info in alDrugMessage) { #region 每次将节点清空重新添加 this.SuspendLayout(); #region 只显示至科室节点 if (info.ApplyDept.ID != privDeptCode) //添加新的科室节点 { nodeDept = GetNodeDept(info, null); privDeptCode = info.ApplyDept.ID; privInfo = new Neusoft.HISFC.Models.Pharmacy.DrugMessage(); privBillCode = ""; } if (showLevel == 0) { continue; //如果只显示一级 则继续 } #endregion if (showLevel != 3) //按原显示方式正常处理 { #region 只显示至摆药单节点 此处不显示患者 if (info.DrugBillClass.ID != privBillCode) //添加新的摆药单节点 { nodeBill = this.GetNodeBill(info, nodeDept); privBillCode = info.DrugBillClass.ID; //保存上一次的摆药单号 } if (showLevel == 1) { continue; //如果不显示患者信息 则继续 } #endregion #region 显示患者信息 如果信息相同则继续 //避免重复添加 if (info.ApplyDept.ID == privInfo.ApplyDept.ID && info.StockDept.ID == privInfo.StockDept.ID && info.DrugBillClass.ID == privInfo.DrugBillClass.ID && info.SendType == privInfo.SendType) { continue; } privInfo = info; List <Neusoft.FrameWork.Models.NeuObject> neuObjectList = this.itemManager.QueryApplyOutPatientList(info); if (neuObjectList == null) { MessageBox.Show("添加患者节点:" + this.itemManager.Err); return; } foreach (Neusoft.FrameWork.Models.NeuObject obj in neuObjectList) { nodePatient = this.GetNodePatient(obj, nodeBill); this.JudgePrint(info.ApplyDept.ID + info.DrugBillClass.ID + obj.ID, info, obj.ID); } #endregion } else { //显示患者明细 并按患者优先显示 即患者下面显示单据明细 DrugMessage tempMessage = info.Clone(); tempMessage.DrugBillClass.ID = "A"; List <Neusoft.FrameWork.Models.NeuObject> neuObjectList = this.itemManager.QueryApplyOutPatientList(tempMessage); if (neuObjectList == null) { MessageBox.Show("添加患者节点:" + this.itemManager.Err); return; } foreach (Neusoft.FrameWork.Models.NeuObject obj in neuObjectList) { nodePatient = this.GetNodePatient(obj, nodeDept); this.JudgePrint(info.ApplyDept.ID + info.DrugBillClass.ID + obj.ID, info, obj.ID); } } this.ResumeLayout(); #endregion } }