protected override void  OnLoad(EventArgs e)
        {
            Neusoft.HISFC.BizLogic.Manager.Constant mgrCon = new Neusoft.HISFC.BizLogic.Manager.Constant();
            string strTitle = string.Empty;
            string hosNm    = string.Empty;

            hosNm = mgrCon.GetHospitalName();
            if (string.IsNullOrEmpty(hosNm))
            {
                strTitle = "住院病人ICD类目顺位统计表";
            }
            else
            {
                strTitle = hosNm + "住院病人ICD类目顺位统计表";
            }

            dwMain.Modify("t_title.text = '" + strTitle + "'");
            base.OnLoad(e);
        }
Beispiel #2
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void InitUC()
 {
     // 设置医院名称
     Neusoft.HISFC.BizLogic.Manager.Constant constant = new Neusoft.HISFC.BizLogic.Manager.Constant();
     this.labelHospital.Text = constant.GetHospitalName() + "门诊收费员缴款日报表";
 }
Beispiel #3
0
        /// <summary>
        /// 打印函数
        /// </summary>
        /// <param name="al">打印数组</param>
        /// <param name="i">第几页</param>
        /// <param name="count">总页数</param>
        /// <param name="operCode">制单人</param>
        private void PrintStockplan(ArrayList al, int inow, int icount, string operCode)
        {
            if (al.Count <= 0)
            {
                MessageBox.Show("没有打印的数据!");
                return;
            }
            Neusoft.HISFC.BizLogic.Pharmacy.Constant    constant    = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            Neusoft.HISFC.Models.Pharmacy.StockPlan     stockPlan   = (Neusoft.HISFC.Models.Pharmacy.StockPlan)al[0];
            Neusoft.HISFC.BizLogic.Manager.Constant     constantMgr = new Neusoft.HISFC.BizLogic.Manager.Constant();
            Neusoft.HISFC.BizLogic.Manager.Department   deptMgr     = new Neusoft.HISFC.BizLogic.Manager.Department();
            Neusoft.HISFC.BizProcess.Integrate.Pharmacy itemMgr     = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();

            string strHos   = constantMgr.GetHospitalName();
            string dosageID = string.Empty; //剂型


            if (stockPlan.State == "2")
            {
                this.lbl0.Text = strHos + "药品采购审批单";
            }
            else
            {
                this.lbl0.Text = strHos + "药品采购计划单";
                //label2.Visible = false;
            }

            #region label赋值

            if (this.IsReprint)
            {
                this.lbl0.Text = this.lbl0.Text + "(补打)";
            }

            //DateTime sysTime = this.itemMgr.GetDateTimeFromSysDateTime();
            //this.lb11.Text = "计划科室  " + inPlan.Dept+this.deptMgr.get + " 计划人  " + inPlan.PlanOper.ID;
            this.lb11.Text   = " 计划人:  " + stockPlan.Oper.Name;
            this.lb12.Text   = "计划日期:" + this.itemMgr.GetDateTimeFromSysDateTime().ToString("yyyy-MM-dd");
            this.label2.Text = "采购日期:" + stockPlan.StockOper.OperTime.ToString("yyyy-MM-dd");
            this.lb36.Text   = "第" + inow.ToString() + "页/共" + icount.ToString() + "页";
            this.label1.Text = "单据号:" + stockPlan.BillNO;
            this.label3.Text = "科室:" + deptMgr.GetDeptmentById(stockPlan.Dept.ID);

            #endregion

            #region farpoint赋值

            decimal sumNum5 = 0;
            decimal sumNum8 = 0;
            decimal sumNum9 = 0;
            this.sheetView1.RowCount = 0;

            #region {1EC17564-2FAD-4a77-97AC-4C57076888B2}
            FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
            numberCellType1.DecimalPlaces       = 4;
            this.sheetView1.Columns[6].CellType = numberCellType1;
            this.sheetView1.Columns[7].CellType = numberCellType1;
            this.sheetView1.Columns[8].CellType = numberCellType1;
            #endregion
            for (int i = 0; i < al.Count; i++)
            {
                this.sheetView1.AddRows(i, 1);
                Neusoft.HISFC.Models.Pharmacy.StockPlan info = al[i] as Neusoft.HISFC.Models.Pharmacy.StockPlan;


                this.sheetView1.Cells[i, 0].Text = info.Item.ID;    // info.Item.NameCollection.UserCode;//药品自定义码
                this.sheetView1.Cells[i, 1].Text = info.Item.Name;  //药品名称
                this.sheetView1.Cells[i, 2].Text = info.Item.Specs; //规格
                if (info.Item.PackQty == 0)
                {
                    info.Item.PackQty = 1;
                }

                decimal count = 0, count2 = 0, count3 = 0;
                count  = info.StockApproveQty / info.Item.PackQty;
                count2 = (info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.PurchasePrice);
                count3 = (info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.RetailPrice);
                this.sheetView1.Cells[i, 3].Text = info.Item.PackUnit;//单位

                // Neusoft.HISFC.BizProcess.Integrate.Pharmacy itemMgr = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();



                dosageID = ((Neusoft.HISFC.Models.Pharmacy.Item)itemMgr.GetItem(info.Item.ID)).DosageForm.ID;


                this.sheetView1.Cells[i, 4].Text = ((Neusoft.FrameWork.Models.NeuObject)constantMgr.GetConstant("DOSAGEFORM", dosageID)).Name; //info.Item.DosageForm.Name; //剂型
                this.sheetView1.Cells[i, 5].Text = (info.StockApproveQty / info.Item.PackQty).ToString();                                      //计划数量

                this.sheetView1.Cells[i, 6].Text = info.StockPrice.ToString();                                                                 //计划购入价      // info.Item.PackUnit;//
                this.sheetView1.Cells[i, 7].Text = info.Item.Price.ToString();                                                                 //参考零售价


                this.sheetView1.Cells[i, 8].Text = ((info.StockApproveQty / info.Item.PackQty) * (info.StockPrice)).ToString();                       //计划金额
                this.sheetView1.Cells[i, 9].Text = ((info.StockApproveQty / info.Item.PackQty) * (info.Item.PriceCollection.RetailPrice)).ToString(); //零售金额


                //if (info.Item.Product.Company.Name != "")
                //    this.sheetView1.Cells[i, 7].Text = info.Item.Product.Company.Name;         //供货公司;
                //else
                //    this.sheetView1.Cells[i, 7].Text = "未选择";

                if (info.Company.Name != "")
                {
                    this.sheetView1.Cells[i, 10].Text = info.Company.Name;         //供货公司;
                }
                else
                {
                    this.sheetView1.Cells[i, 10].Text = "未选择";
                }

                //if (info.Item.Product.Producer.Name != "")
                //    this.sheetView1.Cells[i, 8].Text = info.Item.Product.Producer.Name;        //生产厂家
                //else
                //    this.sheetView1.Cells[i, 8].Text = "未选择";

                sumNum5 = sumNum5 + count;
                sumNum8 = sumNum8 + count2;
                sumNum9 = sumNum9 + count3;
            }
            this.sheetView1.RowCount = al.Count + 1;
            this.sheetView1.Cells[al.Count, 0].Text = "合计";
            this.sheetView1.Cells[al.Count, 1].Text = "共" + al.Count + "行"; //行数;
            this.sheetView1.Cells[al.Count, 5].Text = sumNum5.ToString();   //购入数量合计
            this.sheetView1.Cells[al.Count, 8].Text = sumNum8.ToString();   //购入金额合计
            this.sheetView1.Cells[al.Count, 9].Text = sumNum9.ToString();   //零售金额合计

            //宽度
            //this.panel4.Width = this.Width - 3;
            this.fpSpread1.Width  = this.panel1.Width - 10;
            this.fpSpread1.Height = (int)this.sheetView1.RowHeader.Rows[0].Height +
                                    (int)(this.sheetView1.Rows[0].Height * (al.Count + 1)) + 10;

            #endregion

            #region 打印函数

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

            Neusoft.HISFC.Components.Common.Classes.Function.GetPageSize("PhaInplan", ref p);

            p.PrintPage(5, 0, this.panel1);

            #endregion
        }
Beispiel #4
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void InitUC(string title)
 {
     // 设置医院名称
     Neusoft.HISFC.BizLogic.Manager.Constant constant = new Neusoft.HISFC.BizLogic.Manager.Constant();
     this.lbltitle.Text = constant.GetHospitalName() + title;
 }
Beispiel #5
0
        /// <summary>
        /// 打印
        /// </summary>
        //public void Print()
        //{
        //    Neusoft.FrameWork.WinForms.Classes.Print pf = new Neusoft.FrameWork.WinForms.Classes.Print();
        //    //Neusoft.FrameWork.Management.Transaction t = new Neusoft.FrameWork.Management.Transaction(ordManager.Connection);
        //    Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
        //    //t.BeginTransaction();

        //    //orderBillManager.SetTrans(t.Trans);
        //    orderBillManager.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

        //    if (this.tabControl1.SelectedIndex == 0)
        //    {
        //        pf.PageLabel = (Control)this.lblPage;
        //        this.SetLongRePrint(false);
        //        for (int i = 0; i < sheetLong.Rows.Count; i++)
        //        {
        //            int j = Neusoft.FrameWork.Function.NConvert.ToInt32(sheetLong.Rows.Count / this.intLineNum);

        //            Neusoft.HISFC.Models.Order.Inpatient.Order ord = sheetLong.Rows[i].Tag as Neusoft.HISFC.Models.Order.Inpatient.Order;
        //            if (ord != null && ord.ID != null && ord.ID != "")
        //            {
        //                Neusoft.HISFC.Models.Order.OrderBill orderBill = new Neusoft.HISFC.Models.Order.OrderBill();
        //                orderBill = orderBillManager.GetOrderBillByOrderID(ord.ID);
        //                if (Neusoft.FrameWork.Function.NConvert.ToBoolean(orderBill.PrintFlag))
        //                {
        //                    this.sheetLong.SetValue(i, 0, "");
        //                    this.sheetLong.SetValue(i, 1, "");
        //                    this.sheetLong.SetValue(i, 2, "");
        //                    this.sheetLong.SetValue(i, 3, "");
        //                    this.sheetLong.SetValue(i, 4, "");
        //                    this.sheetLong.SetValue(i, 5, "");
        //                    this.sheetLong.SetValue(i, 6, "");
        //                    this.sheetLong.SetValue(i, 7, "");
        //                    this.sheetLong.SetValue(i, 8, "");
        //                    this.sheetLong.SetValue(i, 9, "");
        //                    this.sheetLong.SetValue(i, 10, "");
        //                }
        //                else
        //                {
        //                    int myLineNo = 0;
        //                    int myPageNo = 0;
        //                    int myPrnSeq = 0;
        //                    this.orderBillManager.GetLastOrderBillArg(this.pInfo.ID, orderBill.Order.OrderType.ID, out myPrnSeq, out myPageNo, out myLineNo);

        //                    if (myPageNo > 0)
        //                    {
        //                        if (i < this.intLineNum)
        //                        {
        //                            myLineNo = i + 1;

        //                        }
        //                        else
        //                        {
        //                            myLineNo = 1;
        //                            myPageNo = myPageNo + 1;
        //                            this.SetLongRePrint(true);
        //                        }
        //                    }
        //                    else
        //                    {
        //                        myLineNo = i + 1;
        //                        myPageNo = 1;
        //                        this.SetLongRePrint(true);
        //                    }
        //                    if (Neusoft.FrameWork.Function.NConvert.ToBoolean(orderBill.PrintDCFlag) && orderBill.PageNO > 0)
        //                    {
        //                        this.sheetLong.SetValue(i, 0, "");
        //                        this.sheetLong.SetValue(i, 1, "");
        //                        this.sheetLong.SetValue(i, 2, "");
        //                        this.sheetLong.SetValue(i, 3, "");
        //                        this.sheetLong.SetValue(i, 4, "");
        //                        this.sheetLong.SetValue(i, 5, "");
        //                    }
        //                    if (orderBill.PageNO == 0)
        //                    {
        //                        if (orderBillManager.UpdateLineNoPageNo(ord.ID, myLineNo, myPageNo) < 0)
        //                        {
        //                            //t.RollBack();
        //                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
        //                            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新医嘱单行号、页码失败!" + orderBillManager.Err));
        //                            return;
        //                        }
        //                    }

        //                    if (orderBillManager.UpdatePrnFlag(ord.ID, "1") < 0)
        //                    {
        //                        //t.RollBack();
        //                        Neusoft.FrameWork.Management.PublicTrans.RollBack();
        //                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新医嘱单打印标志失败!" + orderBillManager.Err));
        //                        return;
        //                    }
        //                }
        //            }
        //            else
        //            {
        //                this.sheetLong.SetValue(i, 0, "");
        //                this.sheetLong.SetValue(i, 1, "");
        //                this.sheetLong.SetValue(i, 2, "");
        //                this.sheetLong.SetValue(i, 3, "");
        //                this.sheetLong.SetValue(i, 4, "");
        //                this.sheetLong.SetValue(i, 5, "");
        //                this.sheetLong.SetValue(i, 6, "");
        //                this.sheetLong.SetValue(i, 7, "");
        //                this.sheetLong.SetValue(i, 8, "");
        //                this.sheetLong.SetValue(i, 9, "");
        //                this.sheetLong.SetValue(i, 10, "");


        //            }
        //        }
        //        //this.neuLabel15.Text = "第";
        //        //this.neuLabel19.Text = "页";

        //        //if (this.sheetLong.RowCount < intLineNum)
        //        //{
        //        //    this.sheetLong.RowCount = intLineNum;

        //        //}
        //        //if (this.sheetLong.RowCount > intLineNum)
        //        //{
        //        //    long longNum = 0;
        //        //    System.Math.DivRem(this.sheetLong.RowCount, intLineNum, out longNum);
        //        //    this.sheetLong.RowCount = this.sheetLong.RowCount - Neusoft.FrameWork.Function.NConvert.ToInt32(longNum) + intLineNum;
        //        //}


        //        pf.PrintPreview(this.plLong);

        //    }
        //    else
        //    {
        //        pf.PageLabel = (Control)this.lblPages;
        //        this.SetShortRePrint(false);
        //        for (int i = 0; i < sheetShort.Rows.Count; i++)
        //        {

        //            Neusoft.HISFC.Models.Order.Inpatient.Order ord = sheetShort.Rows[i].Tag as Neusoft.HISFC.Models.Order.Inpatient.Order;
        //            if (ord != null && ord.ID != null && ord.ID != "")
        //            {
        //                Neusoft.HISFC.Models.Order.OrderBill orderBill = new Neusoft.HISFC.Models.Order.OrderBill();
        //                orderBill = orderBillManager.GetOrderBillByOrderID(ord.ID);
        //                if (Neusoft.FrameWork.Function.NConvert.ToBoolean(orderBill.PrintFlag))
        //                {
        //                    this.sheetShort.SetValue(i, 0, "");
        //                    this.sheetShort.SetValue(i, 1, "");
        //                    this.sheetShort.SetValue(i, 2, "");
        //                    this.sheetShort.SetValue(i, 3, "");
        //                    this.sheetShort.SetValue(i, 4, "");
        //                    this.sheetShort.SetValue(i, 5, "");
        //                    this.sheetShort.SetValue(i, 6, "");
        //                    this.sheetShort.SetValue(i, 7, "");
        //                    this.sheetShort.SetValue(i, 8, "");
        //                }
        //                else
        //                {
        //                    int myLineNo = 0;
        //                    int myPageNo = 0;
        //                    int myPrnSeq = 0;
        //                    this.orderBillManager.GetLastOrderBillArg(this.pInfo.ID, orderBill.Order.OrderType.ID, out myPrnSeq, out myPageNo, out myLineNo);

        //                    if (myPageNo > 0)
        //                    {
        //                        if (i < this.intLineNum)
        //                        {
        //                            myLineNo = i + 1;

        //                        }
        //                        else
        //                        {
        //                            myLineNo = 1;
        //                            myPageNo = myPageNo + 1;
        //                            this.SetShortRePrint(true);
        //                        }
        //                    }
        //                    else
        //                    {
        //                        myLineNo = i + 1;
        //                        myPageNo = 1;
        //                        this.SetShortRePrint(true);
        //                    }
        //                    if (orderBill.PageNO == 0)
        //                    {
        //                        if (orderBillManager.UpdateLineNoPageNo(ord.ID, myLineNo, myPageNo) < 0)
        //                        {
        //                            //t.RollBack();
        //                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
        //                            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新医嘱单行号、页码失败!" + orderBillManager.Err));
        //                            return;
        //                        }
        //                    }
        //                    if (orderBillManager.UpdatePrnFlag(ord.ID, "1") < 0)
        //                    {
        //                        //t.RollBack();
        //                        Neusoft.FrameWork.Management.PublicTrans.RollBack();
        //                        MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("更新医嘱单打印标志失败!" + orderBillManager.Err));
        //                        return;
        //                    }
        //                }
        //            }
        //            else
        //            {
        //                this.sheetShort.SetValue(i, 0, "");
        //                this.sheetShort.SetValue(i, 1, "");
        //                this.sheetShort.SetValue(i, 2, "");
        //                this.sheetShort.SetValue(i, 3, "");
        //                this.sheetShort.SetValue(i, 4, "");
        //                this.sheetShort.SetValue(i, 5, "");
        //                this.sheetShort.SetValue(i, 6, "");
        //                this.sheetShort.SetValue(i, 7, "");
        //                this.sheetShort.SetValue(i, 8, "");

        //                this.SetShortRePrint(false);
        //            }
        //        }

        //        //if (this.sheetShort.RowCount < intLineNum)
        //        //{
        //        //    this.sheetShort.RowCount = intLineNum;
        //        //}
        //        //if (this.sheetShort.RowCount > intLineNum)
        //        //{
        //        //    long shortNum = 0;
        //        //    System.Math.DivRem(this.sheetShort.RowCount, intLineNum, out shortNum);
        //        //    this.sheetShort.RowCount = this.sheetShort.RowCount - Neusoft.FrameWork.Function.NConvert.ToInt32(shortNum) + intLineNum;
        //        //}

        //        pf.PrintPreview(this.plShort);

        //        //this.lblPage.Text = pf.PageLabel.Text;
        //    }
        //    //t.Commit();
        //    Neusoft.FrameWork.Management.PublicTrans.Commit();
        //    this.SetShortRePrint(true);
        //    this.SetLongRePrint(true);
        //    this.SetPatient(this.pInfo);
        //}
        /// <summary>
        /// 设置患者信息
        /// </summary>
        /// <param name="patientInfo"></param>
        public void SetPatient(Neusoft.HISFC.Models.RADT.PatientInfo patientInfo)
        {
            this.intLineNum = this.controlManager.GetControlParam <int>("200008", false, 21);
            //打印标题

            //查询医嘱(暂时不支持续打)
            pInfo = patientInfo;
            string hospitalName = constant.GetHospitalName();

            if (string.IsNullOrEmpty(patientInfo.PVisit.PatientLocation.Room) && patientInfo.PVisit.PatientLocation.Bed != null)
            {//查询病房
                Neusoft.HISFC.Models.Base.Bed bed = this.bedMgr.GetBedInfo(patientInfo.PVisit.PatientLocation.Bed.ID);
                if (bed != null)
                {
                    patientInfo.PVisit.PatientLocation.Room = bed.SickRoom.ID;
                }
            }

            this.lbLongPatientNo.Text     = patientInfo.ID;
            this.lbLonglName.Text         = patientInfo.Name;
            this.lblShortInpatientNO.Text = patientInfo.ID;
            this.lblShortName.Text        = patientInfo.Name;
            this.neuLabel2.Text           = hospitalName;
            this.neuLabel10.Text          = hospitalName;

            if (patientInfo.Sex != null)
            {
                this.lblSex.Text  = patientInfo.Sex.Name;
                this.lblSexs.Text = patientInfo.Sex.Name;
            }
            if (patientInfo.Age != null)
            {
                this.lblAge.Text  = patientInfo.Age.ToString();
                this.lblAges.Text = patientInfo.Age;
            }
            if (patientInfo.PVisit.PatientLocation.Room != null)
            {
                this.lblRoom.Text  = patientInfo.PVisit.PatientLocation.Room.ToString();
                this.lblRooms.Text = patientInfo.PVisit.PatientLocation.Room;
            }
            if (patientInfo.PVisit.PatientLocation.Bed != null)
            {
                this.lblBed.Text  = patientInfo.PVisit.PatientLocation.Bed.ToString();
                this.lblBeds.Text = patientInfo.PVisit.PatientLocation.Bed.ToString();
            }
            if (patientInfo.PVisit.PatientLocation.Dept != null)
            {
                this.lblDept.Text  = patientInfo.PVisit.PatientLocation.Dept.Name.ToString();
                this.lblDepts.Text = patientInfo.PVisit.PatientLocation.Dept.Name;
            }

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在查询显示医嘱信息,请稍候......");

            Application.DoEvents();

            ArrayList alAll = new ArrayList();

            try
            {
                //alAll = this.ordManager.QueryDcOrder(patientInfo.ID);
                alAll = this.ordManager.QueryPrnOrder(patientInfo.ID);
            }
            catch
            {
                Neusoft.FrameWork.WinForms.Classes.Function.MessageBox(ordManager.Err);
            }

            alLong.Clear();
            alShort.Clear();

            if (alAll != null)
            {
                foreach (object obj in alAll)
                {
                    Neusoft.HISFC.Models.Order.Inpatient.Order order = obj as Neusoft.HISFC.Models.Order.Inpatient.Order;
                    if (order.OrderType.Type == Neusoft.HISFC.Models.Order.EnumType.LONG)
                    {
                        //长期医嘱
                        alLong.Add(obj);
                    }
                    else
                    {
                        //临时医嘱
                        alShort.Add(obj);
                    }
                }
            }
            AddObjecToLongOrderSheet(alLong);
            AddObjecToShortOrderSheet(alShort);
            this.GetPrintOrder();
            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
        }