コード例 #1
0
        private void SetTabPageShow(Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            //if (this.tempDrugBill.PrintType.ID.ToString() == drugBillClass.PrintType.ID.ToString())
            //{
            //    return;
            //}

            switch (drugBillClass.PrintType.ID.ToString())
            {
            case "D":
            case "R":
                if (!this.neuTabControl1.TabPages.Contains(this.tabPage1))
                {
                    this.neuTabControl1.TabPages.Add(this.tabPage1);
                }
                if (this.neuTabControl1.TabPages.Contains(this.tabPage2))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage2);
                }
                if (this.neuTabControl1.TabPages.Contains(this.tabPage3))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage3);
                }
                break;

            case "T":
                if (this.neuTabControl1.TabPages.Contains(this.tabPage1))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage1);
                }
                if (!this.neuTabControl1.TabPages.Contains(this.tabPage2))
                {
                    this.neuTabControl1.TabPages.Add(this.tabPage2);
                }
                if (this.neuTabControl1.TabPages.Contains(this.tabPage3))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage3);
                }
                break;

            case "H":
                if (this.neuTabControl1.TabPages.Contains(this.tabPage1))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage1);
                }
                if (this.neuTabControl1.TabPages.Contains(this.tabPage2))
                {
                    this.neuTabControl1.TabPages.Remove(this.tabPage2);
                }
                if (!this.neuTabControl1.TabPages.Contains(this.tabPage3))
                {
                    this.neuTabControl1.TabPages.Add(this.tabPage3);
                }
                break;
            }
        }
コード例 #2
0
 /// <summary>
 /// 树选择事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tvSelectType_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node.ToolTipText == "摆药单")
     {
         this.billClass = this.drugstoreManager.GetDrugBillClass(e.Node.Tag.ToString());
         this.QueryDrugList();
     }
     else
     {
         this.ClearData();
     }
 }
コード例 #3
0
        /// <summary>
        /// 用于摆药核准时 显示出库申请数据
        /// </summary>
        /// <param name="arrayApplyOut">出库申请数据</param>
        /// <param name="drugBillClass">摆药通知信息</param>
        /// <returns>成功返回1 失败返回-1</returns>
        public void ShowData(ArrayList arrayApplyOut, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            this.myDrugBillClass = drugBillClass;

            this.ShowData(arrayApplyOut);

            //显示摆药单
            if (this.IsShowBillPreview && Function.IDrugPrint != null)
            {
                Function.IDrugPrint.AddAllData(this.GetCheckData(), this.myDrugBillClass);
            }
        }
コード例 #4
0
 /// <summary>
 /// 摆药单列表选择事件(单个摆药单数据显示)
 /// </summary>
 /// <param name="drugBillClass"></param>
 private void ucApproveList1_SelectBillEvent(Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
 {
     if (drugBillClass != null)
     {
         //this.ucDrugBillApprove1.ShowData( drugBillClass.DrugBillNO.ToString() ,true );
         if (!drugBillClass.Name.Contains("补打"))
         {
             drugBillClass.Name += "  补打";//{DE81F86D-5AD1-41d6-9F2D-A60D4D19AEFF}
         }
         this.ucDrugBillApprove1.ShowData(drugBillClass);
     }
 }
コード例 #5
0
        /// <summary>
        /// 打印/预览
        /// </summary>
        /// <param name="isPreview">是否预览</param>
        private void Print(bool isPreview)
        {
            ArrayList alCheckData = this.GetCheckData();
            int       i           = 0;

            foreach (Neusoft.HISFC.Models.Pharmacy.DrugMessage message in alCheckData)
            {
                ArrayList al = this.itemManager.QueryApplyOutList(message);
                if (al == null)
                {
                    MessageBox.Show(Language.Msg("根据摆药通知信息获取摆药申请明细信息发生错误 ") + this.itemManager.Err);
                    return;
                }

                Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass = this.drugstoreManager.GetDrugBillClass(message.DrugBillClass.ID);
                drugBillClass.Memo = message.DrugBillClass.Memo;//摆药单号

                Function.Print(al, drugBillClass, false, this.IsPrintLabel, this.IsSelectPreview(i));
                i++;
            }
        }
コード例 #6
0
        /// <summary>
        /// 摆药保存
        /// </summary>
        /// <param name="drugMessage">摆药通知信息</param>
        public int Save(Neusoft.HISFC.Models.Pharmacy.DrugMessage drugMessage)
        {
            if (this.neuSpread1_Sheet1.Rows.Count == 0)
            {
                MessageBox.Show(Language.Msg("没有可以核准的数据。"));
                return(-1);
            }

            if (this.BeginSaveEvent != null)
            {
                this.BeginSaveEvent(drugMessage, null);
            }

            ArrayList alCheckData = this.GetCheckData();

            if (alCheckData.Count <= 0)
            {
                MessageBox.Show(Language.Msg("请选择要核准的数据。"));
                return(-1);
            }
            //提示是否摆药 {152EF737-99B9-410f-BE97-B11C02B6F330} wbo 2010-09-22
            if (MessageBox.Show("是否确定摆药?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return(-1);
            }
            //提示正在摆药 {43593D0F-C93E-4a59-9037-F1FF3E0D5381} wbo 2010-09-22
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在摆药,请稍后... ...");
            Application.DoEvents();
            int iIndex = 0;

            foreach (Neusoft.HISFC.Models.Pharmacy.DrugMessage message in alCheckData)
            {
                #region 对选中的申请数据进行保存

                message.SendFlag = 1;                    //摆药通知中的数据全部被核准SendFlag=1,更新摆药通知信息。
                message.SendType = drugMessage.SendType; //处理此摆药通知中的摆药申请数据时,取摆药台的发送类型。

                //检索科室摆药申请明细数据
                ArrayList al = this.itemManager.QueryApplyOutList(message);
                if (al == null)
                {
                    //提示正在摆药 {43593D0F-C93E-4a59-9037-F1FF3E0D5381} wbo 2010-09-22
                    Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                    MessageBox.Show(Language.Msg("根据摆药通知信息获取摆药申请明细信息发生错误 ") + this.itemManager.Err);
                    return(-1);
                }
                //提示正在摆药 {43593D0F-C93E-4a59-9037-F1FF3E0D5381} wbo 2010-09-22
                Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在摆药,请稍后... ...");
                if (message.DrugBillClass.ID == "R")
                {
                    if (DrugStore.Function.DrugReturnConfirm(al, message, this.ArkDept, this.ApproveDept) != 1)
                    {
                        //提示正在摆药 {43593D0F-C93E-4a59-9037-F1FF3E0D5381} wbo 2010-09-22
                        Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                        return(-1);
                    }
                }
                else
                {
                    if (DrugStore.Function.DrugConfirm(al, message, this.ArkDept, this.ApproveDept) != 1)
                    {
                        //提示正在摆药 {43593D0F-C93E-4a59-9037-F1FF3E0D5381} wbo 2010-09-22
                        Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                        return(-1);
                    }
                }

                //提示打印进度 {C9ADA757-AA2D-4674-8BEE-F647EE683A59} wbo 2010-09-22
                //Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在打印... ...");
                Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass = this.drugstoreManager.GetDrugBillClass(message.DrugBillClass.ID);

                //保存摆药单号
                drugBillClass.Memo       = message.DrugBillClass.Memo;//摆药单号
                drugBillClass.DrugBillNO = message.DrugBillClass.Memo;

                Function.Print(al, drugBillClass, this.IsAutoPrint, this.IsPrintLabel, this.IsSelectPreview(iIndex));
                iIndex++;

                #endregion
            }
            if (this.EndSaveEvent != null)
            {
                this.EndSaveEvent(drugMessage, null);
            }

            //提示打印进度 {C9ADA757-AA2D-4674-8BEE-F647EE683A59} wbo 2010-09-22
            //Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
            //MessageBox.Show("打印完毕!");

            return(1);
        }
コード例 #7
0
        void Neusoft.HISFC.BizProcess.Interface.Pharmacy.IDrugPrint.AddAllData(System.Collections.ArrayList al, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            this.SetTabPageShow(drugBillClass);

            switch (drugBillClass.PrintType.ID.ToString())
            {
            case "D":               //明细打印
            case "R":               //处方单
                ArrayList alDetail = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alDetail = al;
                }
                else
                {
                    alDetail = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                    if (alDetail == null || alDetail.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误") + this.itemManager.Err);
                        return;
                    }

                    System.Collections.Hashtable hsOriginal = new Hashtable();
                    foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut temp in al)
                    {
                        if (hsOriginal.ContainsKey(temp.User01 + temp.User02))
                        {
                        }
                        else
                        {
                            hsOriginal.Add(temp.User01 + temp.User02, temp.PatientNO);
                        }
                    }

                    foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut detail in alDetail)
                    {
                        if (hsOriginal.ContainsKey((detail.User02).Substring(4) + detail.User01))
                        {
                            detail.PatientNO = hsOriginal[(detail.User02).Substring(4) + detail.User01] as string;
                        }
                    }
                }

                this.ucDrugBillDetail1.Clear();
                this.ucDrugBillDetail1.IfBPrint = "已发";
                this.ucDrugTotal1.IfBPrint      = "已发";
                this.ucDrugBillDetail1.ShowData(alDetail, drugBillClass);
                break;

            case "T":               //汇总打印
                ArrayList alTotal = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alTotal = al;
                }
                else
                {
                    alTotal = this.itemManager.QueryDrugBillTotal(drugBillClass.DrugBillNO);
                    if (alTotal == null || alTotal.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单汇总信息发生错误"));
                        return;
                    }
                }

                this.ucDrugTotal1.Clear();
                this.ucDrugTotal1.IfBPrint      = "已发";
                this.ucDrugBillDetail1.IfBPrint = "已发";
                this.ucDrugTotal1.ShowData(alTotal, drugBillClass);

                ArrayList alDetailTemp = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alDetailTemp = al;
                }
                else
                {
                    alDetailTemp = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                    if (alDetailTemp == null || alDetailTemp.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误") + this.itemManager.Err);
                        return;
                    }
                }

                this.ucDrugBillDetail1.Clear();
                this.ucDrugBillDetail1.ShowData(alDetailTemp, drugBillClass);
                break;

            case "H":               //草药单
                ArrayList alHerbalDetail = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alHerbalDetail = al;
                }
                else
                {
                    alHerbalDetail = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                    if (alHerbalDetail == null || alHerbalDetail.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误"));
                        return;
                    }
                }

                this.ucDrugHerbal1.Clear();
                this.ucDrugHerbal1.ShowData(alHerbalDetail, drugBillClass);
                break;
            }

            this.tempDrugBill = drugBillClass;
        }
コード例 #8
0
 public void AddAllData(System.Collections.ArrayList al, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #9
0
        /// <summary>
        /// 数据显示
        /// </summary>
        /// <param name="alData"></param>
        /// <param name="drugBillClass"></param>
        public void ShowData(ArrayList alData, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            if (ucDrugHerbal.hsDept.Count == 0)
            {
                Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
                ArrayList alDept = deptManager.GetDeptmentAll();
                foreach (Neusoft.HISFC.Models.Base.Department dept in alDept)
                {
                    ucDrugHerbal.hsDept.Add(dept.ID, dept.Name);
                }
            }
            this.SuspendLayout();

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new Neusoft.FrameWork.Management.DataBaseManger();
            this.lbPrintTime.Text = "打印时间:" + dataManager.GetDateTimeFromSysDateTime().ToString();

            this.lbPrintTime.Text = "打印时间:" + drugBillClass.Oper.OperTime.ToString();

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).BeginInit();

            int     iRow    = 0;
            string  comboNO = "-1";
            decimal subTot  = 0;
            decimal tot     = 0;

            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in alData)
            {
                if (ucDrugHerbal.hsDept.ContainsKey(info.ApplyDept.ID))
                {
                    this.lbTitle.Text = "                       " + ucDrugHerbal.hsDept[info.ApplyDept.ID] + drugBillClass.Name;
                }
                else
                {
                    this.lbTitle.Text = "                       " + info.ApplyDept.Name + drugBillClass.Name;
                }

                this.neuSpread1_Sheet1.Rows.Add(iRow, 1);

                if (comboNO == info.CombNO)         //相同组合号
                {
                    this.neuSpread1_Sheet1.Cells[iRow, 0].Text = "[" + info.User02 + "]" + info.User01;
                    this.neuSpread1_Sheet1.Cells[iRow, 1].Text = info.Item.Name + "[" + info.Item.Specs + "]";
                    this.neuSpread1_Sheet1.Cells[iRow, 2].Text = info.Operation.ApplyQty.ToString();
                    this.neuSpread1_Sheet1.Cells[iRow, 3].Text = (info.Operation.ApplyQty * info.Days).ToString();
                    this.neuSpread1_Sheet1.Cells[iRow, 4].Text = info.Item.MinUnit;
                    this.neuSpread1_Sheet1.Cells[iRow, 5].Text = info.Frequency.ID;
                    this.neuSpread1_Sheet1.Cells[iRow, 6].Text = info.PlaceNO;
                    this.neuSpread1_Sheet1.Cells[iRow, 7].Text = info.Item.PriceCollection.RetailPrice.ToString();

                    subTot = subTot + (info.Operation.ApplyQty * info.Days / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                    this.neuSpread1_Sheet1.Cells[iRow, 8].Value = (info.Operation.ApplyQty * info.Days / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                    this.neuSpread1_Sheet1.Cells[iRow, 9].Text  = info.Memo;
                }
                else                              //不同组合号
                {
                    if (comboNO != "-1")
                    {
                        this.neuSpread1_Sheet1.Cells[iRow, 1].Text = "小计";
                        this.neuSpread1_Sheet1.Cells[iRow, 8].Text = subTot.ToString();
                        this.neuSpread1_Sheet1.Rows[iRow].Font     = new Font("宋体", 9.5F, FontStyle.Bold);
                        iRow++;
                        this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                    }

                    this.neuSpread1_Sheet1.Cells[iRow, 1].Text            = "剂数";
                    this.neuSpread1_Sheet1.Cells[iRow, 1].Text            = info.Days.ToString();
                    this.neuSpread1_Sheet1.Cells[iRow, 1].ColumnSpan      = 7;
                    this.neuSpread1_Sheet1.Columns[1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
                    this.neuSpread1_Sheet1.Rows[iRow].Font = new Font("宋体", 9.5F, FontStyle.Bold);
                    iRow++;
                    this.neuSpread1_Sheet1.Rows.Add(iRow, 1);

                    tot     = tot + subTot;
                    subTot  = 0;
                    comboNO = info.CombNO;

                    this.neuSpread1_Sheet1.Cells[iRow, 0].Text = "[" + info.User02 + "]" + info.User01;
                    this.neuSpread1_Sheet1.Cells[iRow, 1].Text = info.Item.Name + "[" + info.Item.Specs + "]";
                    this.neuSpread1_Sheet1.Cells[iRow, 2].Text = info.Operation.ApplyQty.ToString();
                    this.neuSpread1_Sheet1.Cells[iRow, 3].Text = (info.Operation.ApplyQty * info.Days).ToString();
                    this.neuSpread1_Sheet1.Cells[iRow, 4].Text = info.Item.MinUnit;
                    this.neuSpread1_Sheet1.Cells[iRow, 5].Text = info.Frequency.ID;
                    this.neuSpread1_Sheet1.Cells[iRow, 6].Text = info.PlaceNO;
                    this.neuSpread1_Sheet1.Cells[iRow, 7].Text = info.Item.PriceCollection.RetailPrice.ToString();

                    subTot = subTot + (info.Operation.ApplyQty * info.Days / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                    this.neuSpread1_Sheet1.Cells[iRow, 8].Value = (info.Operation.ApplyQty * info.Days / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                    this.neuSpread1_Sheet1.Cells[iRow, 9].Text  = info.Memo;
                }

                iRow++;
            }

            this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
            this.neuSpread1_Sheet1.Cells[iRow, 1].Text = "小计";
            this.neuSpread1_Sheet1.Cells[iRow, 8].Text = subTot.ToString();
            this.neuSpread1_Sheet1.Rows[iRow].Font     = new Font("宋体", 9.5F, FontStyle.Bold);
            iRow++;
            this.neuSpread1_Sheet1.Rows.Add(iRow, 1);

            tot = tot + subTot;
            this.neuSpread1_Sheet1.Cells[iRow, 1].Text = "合计";
            this.neuSpread1_Sheet1.Cells[iRow, 8].Text = tot.ToString();
            this.neuSpread1_Sheet1.Rows[iRow].Font     = new Font("宋体", 9.5F, FontStyle.Bold);

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).EndInit();

            this.ResumeLayout(true);
        }
コード例 #10
0
        /// <summary>
        /// 数据显示
        /// </summary>
        /// <param name="alOriginalData"></param>
        /// <param name="drugBillClass"></param>
        public void ShowData(ArrayList alOriginalData, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            ArrayList alData = new ArrayList();

            this.AlterApplyData(alOriginalData, ref alData);

            CompareApplyOut compare = new CompareApplyOut();

            alData.Sort(compare);

            #region 静态科室帮助信息获取

            if (ucDrugTotal.hsDept.Count == 0)
            {
                Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
                ArrayList alDept = deptManager.GetDeptmentAll();
                foreach (Neusoft.HISFC.Models.Base.Department dept in alDept)
                {
                    ucDrugTotal.hsDept.Add(dept.ID, dept.Name);
                }
            }

            #endregion

            this.SuspendLayout();

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new Neusoft.FrameWork.Management.DataBaseManger();
            this.lbPrintTime.Text = "打印时间:" + dataManager.GetDateTimeFromSysDateTime().ToString();

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).BeginInit();

            int     iRow    = 0;
            int     iCount  = 0;
            decimal totCost = 0;//总金额{65581D3C-D84E-4d4d-AF93-B58077F10DD5}
            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in alData)
            {
                iCount++;
                if (iCount == 6)
                {
                    this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                    iRow++;
                    iCount = 0;
                }
                #region 数据赋值

                if (ucDrugTotal.hsDept.ContainsKey(info.ApplyDept.ID))
                {
                    this.lbTitl.Text = "                       " + ucDrugTotal.hsDept[info.ApplyDept.ID] + drugBillClass.Name + "(汇总)" + "      " + this.ifBPrint;
                }
                else
                {
                    this.lbTitl.Text = "                       " + info.ApplyDept.Name + drugBillClass.Name + "(汇总)" + "     " + this.ifBPrint;
                }

                this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                info.Item.NameCollection.RegularName       = itemManager.GetItem(info.Item.ID).NameCollection.RegularName;//{8CA1AEE7-F038-4c32-BD3E-ECCC8DFE687B}
                this.neuSpread1_Sheet1.Cells[iRow, 0].Text = info.PlaceNO;
                //屏蔽剂型的显示
                this.neuSpread1_Sheet1.Cells[iRow, 1].Text = info.Item.NameCollection.Name + "(" + info.Item.Name + ")" + "[ " + info.Item.Specs + " ]";
                char[] ca = this.neuSpread1_Sheet1.Cells[iRow, 1].Text.ToCharArray(); //{8CA1AEE7-F038-4c32-BD3E-ECCC8DFE687B}
                int    j  = System.Text.Encoding.Default.GetByteCount(ca, 0, ca.Length);
                if (j / 40 >= 1 && j % 40 == 0)                                       //大于一行并且正好等于下一行
                {
                    this.neuSpread1_Sheet1.Rows[iRow].Height = (j / 40) * Neusoft.FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Rows.Default.Height);
                }
                else if (j / 40 >= 1 && j % 40 > 0)//大于一行,并且延伸到下一行
                {
                    this.neuSpread1_Sheet1.Rows[iRow].Height = ((j / 40) + 1) * Neusoft.FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Rows.Default.Height);
                }
                this.neuSpread1_Sheet1.Cells[iRow, 2].Text = info.Operation.ApplyQty.ToString();
                this.neuSpread1_Sheet1.Cells[iRow, 3].Text = info.Item.MinUnit;
                this.neuSpread1_Sheet1.Cells[iRow, 4].Text = info.Item.PriceCollection.RetailPrice.ToString();
                if (info.Item.User01 == "1")            //传入的数量为包装单位
                {
                    this.neuSpread1_Sheet1.Cells[iRow, 5].Value = (info.Operation.ApplyQty * info.Item.PriceCollection.RetailPrice);
                }
                else
                {
                    this.neuSpread1_Sheet1.Cells[iRow, 5].Value = (info.Operation.ApplyQty / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                }
                totCost += Neusoft.FrameWork.Function.NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[iRow, 5].Value);
                iRow++;

                #endregion
            }

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).EndInit();

            #region 汇总量计算

            try
            {
                if (this.neuSpread1_Sheet1.Rows.Count > 0)
                {
                    this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                    this.neuSpread1_Sheet1.Cells[iRow, 0].ColumnSpan = 6;
                    this.neuSpread1_Sheet1.Cells[iRow, 0].Text       = "领药:         发药:         复准:         制表人:" + (Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee).Name + "      累计:" + totCost.ToString();
                    //this.neuSpread1_Sheet1.Cells[iRow, 5].Formula = string.Format("SUM(E1:E{0})", iRow.ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            this.ResumeLayout(true);

            #endregion
        }
コード例 #11
0
        /// <summary>
        /// 数据显示
        /// </summary>
        /// <param name="alData"></param>
        /// <param name="drugBillClass"></param>
        public void ShowData(ArrayList alData, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            if (ucDrugBillDetail.hsDept.Count == 0)
            {
                Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
                ArrayList alDept = deptManager.GetDeptmentAll();
                foreach (Neusoft.HISFC.Models.Base.Department dept in alDept)
                {
                    ucDrugBillDetail.hsDept.Add(dept.ID, dept.Name);
                }
            }

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new Neusoft.FrameWork.Management.DataBaseManger();
            this.lbPrintTime.Text = "打印时间:" + dataManager.GetDateTimeFromSysDateTime().ToString();

            //this.lbPrintTime.Text = "打印时间:" + drugBillClass.Oper.OperTime.ToString();

            #region 对同一医嘱按用药时间组合显示

            DateTime dt = dataManager.GetDateTimeFromSysDateTime();

            string orderId = "";//必须得按医嘱流水号排序
            Neusoft.HISFC.Models.Pharmacy.ApplyOut objLast = null;
            //合并
            for (int i = alData.Count - 1; i >= 0; i--)
            {
                Neusoft.HISFC.Models.Pharmacy.ApplyOut obj = (alData[i] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                if (orderId == "")
                {
                    orderId        = obj.OrderNO;
                    objLast        = obj;
                    objLast.User03 = this.FormatDateTime(Neusoft.FrameWork.Function.NConvert.ToDateTime(objLast.User03), dt);
                }
                else if (orderId == obj.OrderNO)    //是一个药
                {
                    objLast.User03 = objLast.User03 + " " + this.FormatDateTime(Neusoft.FrameWork.Function.NConvert.ToDateTime(obj.User03), dt);
                    //objLast.Operation.ApplyQty += obj.Operation.ApplyQty * obj.Days;//数量相加
                    alData.RemoveAt(i);
                }
                else
                {
                    orderId        = obj.OrderNO;
                    objLast        = obj;
                    objLast.User03 = this.FormatDateTime(Neusoft.FrameWork.Function.NConvert.ToDateTime(objLast.User03), dt);
                }
            }

            #endregion

            #region  患者排序

            //CompareApplyOut com = new CompareApplyOut();
            //alData.Sort(com);
            #endregion

            #region  患者床号和货位号排序{D9BE63EB-D955-48e2-A3A9-8FDB77BB3998}
            CompareBedPlaceNo comNew = new CompareBedPlaceNo();
            alData.Sort(comNew);
            #endregion

            this.SuspendLayout();

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).BeginInit();

            string privPatient = "";

            int iRow = 0;

            //患者床号 姓名可以和药品同行,这个决定是否要新增一行显示药品
            bool isNeedAddRow = true;

            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in alData)
            {
                if (ucDrugBillDetail.hsDept.ContainsKey(info.ApplyDept.ID))
                {
                    this.lbTitl.Text = "                       " + ucDrugBillDetail.hsDept[info.ApplyDept.ID] + drugBillClass.Name + "(明细)" + "      " + this.ifBPrint;
                }
                else
                {
                    this.lbTitl.Text = "                       " + info.ApplyDept.Name + drugBillClass.Name + "(明细)" + "      " + this.ifBPrint;
                }
                info.Item.NameCollection.RegularName = itemManager.GetItem(info.Item.ID).NameCollection.RegularName;//{8CA1AEE7-F038-4c32-BD3E-ECCC8DFE687B}
                isNeedAddRow = true;
                //{D515D71A-75B4-4c02-B2F7-569779A2A5A8}
                //string bedNO = info.User02;
                string bedNO = info.User02;
                if (bedNO.Length > 4)
                {
                    bedNO = bedNO.Substring(4);
                }
                //{D515D71A-75B4-4c02-B2F7-569779A2A5A8}
                //if (privPatient != "[" + bedNO + "]" + info.User01)
                if (privPatient != "[" + bedNO + "]" + info.User01)
                {
                    //添加一行新的患者信息

                    #region 换一个患者应该加一行{827FF133-63BC-40e3-8704-6E732D5116B1}
                    if (iRow != 0)
                    {
                        iRow++;
                    }
                    #endregion

                    //{D515D71A-75B4-4c02-B2F7-569779A2A5A8}
                    //privPatient = "[" + bedNO + "]" + info.User01;
                    privPatient = "[" + bedNO + "]" + info.User01;
                    this.neuSpread1_Sheet1.Rows.Add(iRow, 1);

                    this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColPatienName].Text = privPatient;

                    //添加住院号
                    //if (drugBillClass.Name == "退药单")
                    //    this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColPatienName].Text = privPatient + (info.PatientNO.ToString()).Substring(7);

                    isNeedAddRow = false;
                }

                if (isNeedAddRow)
                {
                    iRow++;
                    this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                    this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColPatienName].Text = "";
                }

                // "[" + (info.User02).Substring(4) + "]" + info.User01;
                //this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColTradeName].Text = info.Item.Name + "-" + Function.DrugDosage.GetStaticDosage(info.Item.ID);
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColTradeName].Text = info.Item.NameCollection.RegularName + "(" + info.Item.Name + ")";
                char[] ca = this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColTradeName].Text.ToCharArray(); //{8CA1AEE7-F038-4c32-BD3E-ECCC8DFE687B}折行显示
                int    j  = System.Text.Encoding.Default.GetByteCount(ca, 0, ca.Length);
                if (j / 28 >= 1 && j % 28 == 0)                                                                  //大于一行并且正好等于下一行
                {
                    this.neuSpread1_Sheet1.Rows[iRow].Height = (j / 28) * Neusoft.FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Rows.Default.Height);
                }
                else if (j / 28 >= 1 && j % 28 > 0)//大于一行,并且延伸到下一行
                {
                    this.neuSpread1_Sheet1.Rows[iRow].Height = ((j / 28) + 1) * Neusoft.FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Rows.Default.Height);
                }
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColSpecs].Text    = info.Item.Specs;
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColUsage].Text    = info.Usage.Name;
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColDoseOnce].Text = info.DoseOnce.ToString() + info.Item.DoseUnit.ToString();

                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColBaseDose].Text = info.Item.BaseDose.ToString();

                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColFrequency].Text = info.Frequency.ID;

                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColDays].Text        = info.Days.ToString();
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColNum].Text         = info.Operation.ApplyQty.ToString();
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColUnit].Text        = info.Item.MinUnit;
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColRetailPrice].Text = info.Item.PriceCollection.RetailPrice.ToString();
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColCost].Value       = (info.Operation.ApplyQty / info.Item.PackQty * info.Item.PriceCollection.RetailPrice);
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColPlace].Text       = info.PlaceNO;

                if (Neusoft.FrameWork.Public.String.ValidMaxLengh(info.User03, 16))
                {
                    this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColExeTime].Text = info.User03;
                }
                else
                {
                    string useTime = info.User03;
                    while (!Neusoft.FrameWork.Public.String.ValidMaxLengh(useTime, 15))
                    {
                        this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColExeTime].Text = useTime.Substring(0, 12);
                        useTime = useTime.Substring(12);
                        iRow++;
                        this.neuSpread1_Sheet1.Rows.Add(iRow, 1);
                        this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnsSet.ColExeTime].Text = useTime;
                    }
                }
            }

            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.neuSpread1_Sheet1)).EndInit();

            try
            {
                if (this.neuSpread1_Sheet1.Rows.Count > 0)
                {
                    int index = this.neuSpread1_Sheet1.Rows.Count;
                    this.neuSpread1_Sheet1.Rows.Add(index, 1);
                    this.neuSpread1_Sheet1.Cells[index, 0].ColumnSpan = 9;
                    this.neuSpread1_Sheet1.Cells[index, 11].Formula   = string.Format("SUM(M1:M{0})", index.ToString());
                    decimal totCost = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[index, 11].Text);
                    this.neuSpread1_Sheet1.Cells[index, 0].Text = "领药:         发药:          复核:           制表人:" + (Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee).Name + "      合计:" + totCost.ToString("N");

                    this.neuSpread1_Sheet1.Cells[index, 11].Text = "";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            this.ResumeLayout(true);
        }
コード例 #12
0
        /// <summary>
        /// 打印
        /// </summary>
        public void Print()
        {
            if (this.isAddDrugBillControl)      //如果增加了摆药单预览
            {
                if (this.tbDrugDetail.SelectedTab != this.tpDrugBill)
                {
                    #region donggq--20101122--{F1EBA464-FE20-479a-BD79-E63756E318B8}--毒麻摆药打印处理

                    if (this.tbDrugDetail.SelectedTab == this.tpDetail && this.myDrugBillClass.PrintType.ID.ToString() == "D")
                    {
                        ArrayList al = this.GetCheckData();

                        if (al.Count == 0)
                        {
                            MessageBox.Show(Language.Msg("请选择需核准发药的数据"));
                            return;
                        }

                        if (MessageBox.Show("是否进行选择打印?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
                        {
                            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在打印... ...");
                            Application.DoEvents();

                            this.myDrugBillClass.User01 = "NurseType";

                            Function.Print(al, this.myDrugBillClass, false, false, true);

                            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                            //MessageBox.Show("打印完毕!");
                            return;
                        }
                        else
                        {
                            Neusoft.FrameWork.WinForms.Classes.Print pp = new Neusoft.FrameWork.WinForms.Classes.Print();

                            pp.PrintPage(0, 0, this);
                            return;
                        }
                    }

                    #endregion

                    Neusoft.FrameWork.WinForms.Classes.Print p = new Neusoft.FrameWork.WinForms.Classes.Print();

                    p.PrintPage(0, 0, this);
                    return;
                }
            }

            if (this.hsDrugBillClass.ContainsKey(this.myDrugBillClass.ID))
            {
                this.myDrugBillClass.PrintType = this.hsDrugBillClass[this.myDrugBillClass.ID] as Neusoft.HISFC.Models.Pharmacy.BillPrintType;
            }

            //待解决 毒麻药打印问题
            Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClassTemp = new Neusoft.HISFC.Models.Pharmacy.DrugBillClass();
            if (this.myDrugBillClass.PrintType.ID.ToString() == "T" && this.tbDrugDetail.SelectedTab == this.tpDetail)
            {
                drugBillClassTemp = this.myDrugBillClass.Clone();
                drugBillClassTemp.PrintType.ID = "D";
            }
            else
            {
                drugBillClassTemp = this.myDrugBillClass.Clone();
            }

            if (this.isAddDrugBillControl && Function.IDrugPrint != null)
            {
                Function.IDrugPrint.Print();
            }
            else
            {
                if (this.IsPrintLabel)
                {
                    Function.PrintLabelForOutpatient(this.GetCheckData());
                }
                else
                {
                    Function.PrintBill(this.GetCheckData(), drugBillClassTemp);
                }
            }
        }
コード例 #13
0
 /// <summary>
 /// 显示摆药单数据
 /// </summary>
 /// <param name="billClass"></param>
 public virtual void ShowData(Neusoft.HISFC.Models.Pharmacy.DrugBillClass billClass)
 {
     this.drugBillClass = billClass;
     this.ShowData(billClass.DrugBillNO, billClass.ApplyState == "2" ? false : true);
 }
コード例 #14
0
 void Neusoft.HISFC.BizProcess.Interface.Pharmacy.IDrugPrint.AddAllData(ArrayList al, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #15
0
        /// <summary>
        /// 数据添加
        /// </summary>
        /// <param name="al"></param>
        /// <param name="drugBillClass"></param>
        public void AddAllData(System.Collections.ArrayList al, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
        {
            switch (drugBillClass.PrintType.ID.ToString())
            {
            case "D":               //明细打印
            case "R":               //处方单
            case "O":               //扩展打印 默认取处方明细单
                ArrayList alDetail = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alDetail = al;
                }
                else
                {
                    alDetail = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                    if (alDetail == null || alDetail.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误") + this.itemManager.Err);
                        return;
                    }
                }

                System.Collections.Hashtable hash = new Hashtable();
                foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut temp in al)
                {
                    if (hash.ContainsKey(temp.User01 + temp.User02))
                    {
                    }
                    else
                    {
                        hash.Add(temp.User01 + temp.User02, temp.PatientNO);
                    }
                }

                foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut detail in alDetail)
                {
                    //{D515D71A-75B4-4c02-B2F7-569779A2A5A8}
                    //if(hash.ContainsKey((detail.User02).Substring(4) + detail.User01))
                    //{
                    //    detail.PatientNO = hash[(detail.User02).Substring(4) + detail.User01] as string;
                    //}
                    if (hash.ContainsKey(detail.User01 + detail.User02))
                    {
                        detail.PatientNO = hash[detail.User01 + detail.User02] as string;
                    }
                }


                if (this.ucDrugBillDetail1 == null)
                {
                    this.ucDrugBillDetail1 = new ucDrugBillDetail();
                }
                this.ucDrugBillDetail1.Clear();
                this.ucDrugBillDetail1.ShowData(alDetail, drugBillClass);
                break;

            case "T":               //汇总打印
                ArrayList alTotal = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alTotal = al;
                }
                else
                {
                    alTotal = this.itemManager.QueryDrugBillTotal(drugBillClass.DrugBillNO);
                    if (alTotal == null || alTotal.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单汇总信息发生错误"));
                        return;
                    }
                }

                if (this.ucDrugTotal1 == null)
                {
                    this.ucDrugTotal1 = new ucDrugTotal();
                }
                this.ucDrugTotal1.Clear();
                this.ucDrugTotal1.ShowData(alTotal, drugBillClass);
                if (drugBillClass.User01 != "NurseType")    //{31607136-EF3D-46af-A2F9-EE96F6F9209C}
                {
                    ArrayList alDetailTemp = new ArrayList();
                    if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                    {
                        alDetailTemp = al;
                    }
                    else
                    {
                        alDetailTemp = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                        if (alDetailTemp == null || alDetailTemp.Count == 0)
                        {
                            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误") + this.itemManager.Err);
                            return;
                        }
                    }

                    if (this.ucDrugBillDetail1 == null)
                    {
                        this.ucDrugBillDetail1 = new ucDrugBillDetail();
                    }
                    this.ucDrugBillDetail1.Clear();
                    this.ucDrugBillDetail1.ShowData(alDetailTemp, drugBillClass);
                }
                break;

            case "H":               //草药单
                ArrayList alHerbalDetail = new ArrayList();
                if (drugBillClass.DrugBillNO == null || drugBillClass.DrugBillNO == "")
                {
                    alHerbalDetail = al;
                }
                else
                {
                    alHerbalDetail = this.itemManager.QueryDrugBillDetail(drugBillClass.DrugBillNO);
                    if (alHerbalDetail == null || alHerbalDetail.Count == 0)
                    {
                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("根据摆药单号获取摆药单详细信息发生错误"));
                        return;
                    }
                }

                if (this.ucDrugHerbal1 == null)
                {
                    this.ucDrugHerbal1 = new ucDrugHerbal();
                }
                this.ucDrugHerbal1.Clear();
                this.ucDrugHerbal1.ShowData(alHerbalDetail, drugBillClass);
                break;
            }

            this.tempDrugBill = drugBillClass;
        }
コード例 #16
0
ファイル: ucDrugBag.cs プロジェクト: ewin66/Management-System
 public void AddAllData(System.Collections.ArrayList al, Neusoft.HISFC.Models.Pharmacy.DrugBillClass drugBillClass)
 {
 }