Example #1
0
        /// <summary>
        /// 检索药品信息
        /// </summary>
        private void RetrieveData( )
        {
            //显示等待信息
            Neusoft.NFC.Interface.Classes.Function.ShowWaitForm(Language.Msg("正在检索药品信息..."));
            Application.DoEvents( );

            //取药品数据
            List <Neusoft.HISFC.Object.Pharmacy.Item> al = item.QueryItemList(true);

            if (al == null)
            {
                MessageBox.Show(item.Err);
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm( );
                return;
            }

            //取药品类型数组
            Neusoft.HISFC.Integrate.Manager manager = new Neusoft.HISFC.Integrate.Manager( );
            this.drugTypeHelper.ArrayObject = manager.GetConstantList(Neusoft.HISFC.Object.Base.EnumConstant.ITEMTYPE);
            this.qualityHelper.ArrayObject  = manager.GetConstantList(Neusoft.HISFC.Object.Base.EnumConstant.DRUGQUALITY);

            //显示药品数据
            Neusoft.HISFC.Object.Pharmacy.Item info;
            for (int i = 0; i < al.Count; i++)
            {
                info = al[i] as Neusoft.HISFC.Object.Pharmacy.Item;
                this.dsDrug.Tables[0].Rows.Add(new Object[] {
                    false,                                                                                                                                //是否添加
                    info.Name,                                                                                                                            //药品名称
                    info.Specs,                                                                                                                           //药品规格
                    info.PriceCollection.RetailPrice,                                                                                                     //零售价
                    qualityHelper.GetName(info.Quality.ID),                                                                                               //药品性质
                    info.PackUnit,                                                                                                                        //包装单位
                    info.PackQty,                                                                                                                         //包装数量
                    info.MinUnit,                                                                                                                         //最小单位
                    info.ID,                                                                                                                              //药品编码
                    drugTypeHelper.GetName(info.Type.ID),                                                                                                 //药品类型
                    info.NameCollection.SpellCode,                                                                                                        //拼音码
                    info.NameCollection.WBCode,                                                                                                           //五笔码
                    info.NameCollection.UserCode,                                                                                                         //自定义码
                    info.NameCollection.RegularName,                                                                                                      //通用名
                    info.NameCollection.SpellCode,                                                                                                        //通用名拼音码
                    info.NameCollection.WBCode,                                                                                                           //通用名五笔码
                });
                //设置格式
                this.SetFormat( );
                Neusoft.NFC.Interface.Classes.Function.ShowWaitForm(i, al.Count);
                Application.DoEvents( );
            }

            Neusoft.NFC.Interface.Classes.Function.HideWaitForm( );
        }
        /// <summary>
        /// 初始化基本数据
        /// </summary>
        private void InitConstant( )
        {
            //获取药品简单信息列表
            Neusoft.HISFC.Management.Pharmacy.Item item = new Neusoft.HISFC.Management.Pharmacy.Item( );

            drugItemList = item.QueryItemAvailableList( );
            if (drugItemList == null)
            {
                MessageBox.Show(item.Err);
                return;
            }

            //获取科室信息列表
            deptList = manager.GetDepartment(Neusoft.HISFC.Object.Base.EnumDepartmentType.C);
            if (deptList == null)
            {
                MessageBox.Show(manager.Err);
                return;
            }

            //获取结算类别
            manager.GetConstantList(Neusoft.HISFC.Object.Base.EnumConstant.PACKUNIT);
            if (feeItemList == null)
            {
                MessageBox.Show(manager.Err);
                return;
            }

            //获取人员列表
            ArrayList al = manager.QueryEmployeeAll( );

            if (al == null)
            {
                MessageBox.Show("获取人员信息出错" + manager.Err);
                return;
            }
            this.personHelper.ArrayObject = al;

            //获取挂号级别(暂时屏蔽)
            //Neusoft.HISFC.Management.Registration.RegLevel regLevelManager = new Neusoft.HISFC.Management.Registration.RegLevel( );
            //this.regLevelList = regLevelManager.Query( );
            //if( this.regLevelList == null )
            //{
            //    MessageBox.Show( "获取挂号级别出错" + regLevelManager.Err );
            //    return -1;
            //}

            return;
        }
        protected override void OnLoad()
        {
            this.Init();

            Neusoft.HISFC.Integrate.Manager manager  = new Neusoft.HISFC.Integrate.Manager();
            System.Collections.ArrayList    consList = manager.GetConstantList("PACTUNIT");
            foreach (Neusoft.HISFC.Object.Base.Const con in consList)
            {
                metComboBox1.Items.Add(con);
            }
            if (metComboBox1.Items.Count >= 0)
            {
                metComboBox1.SelectedIndex = 0;
                metCode = ((Neusoft.HISFC.Object.Base.Const)metComboBox1.Items[0]).ID;
                metName = ((Neusoft.HISFC.Object.Base.Const)metComboBox1.Items[0]).Name;
            }
            base.OnLoad();
        }
        /// <summary>
        /// 初始化控件,等信息

        /// </summary>
        /// <returns>成功 1 失败: -1</returns>
        protected virtual int Init()
        {
            Neusoft.NFC.Interface.Classes.Function.ShowWaitForm(Language.Msg("正在初始化窗口,请稍候^^"));
            Application.DoEvents();

            #region 病案打印
            object[] o = new object[] { };

            try
            {
                Neusoft.HISFC.Integrate.Common.ControlParam ctrlIntegrate = new Neusoft.HISFC.Integrate.Common.ControlParam();

                System.Runtime.Remoting.ObjectHandle objHande = System.Activator.CreateInstance("UFC.HealthRecord", "Neusoft.UFC.HealthRecord.ucLCCasePrint", false, System.Reflection.BindingFlags.CreateInstance, null, o, null, null, null);

                object oLabel = objHande.Unwrap();

                this.healthPrint = oLabel as Neusoft.HISFC.Integrate.HealthRecord.HealthRecordInterface;
            }
            catch (System.TypeLoadException ex)
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
                MessageBox.Show(Language.Msg("命名空间无效\n" + ex.Message));
                return(-1);
            }
            #endregion

            try
            {
                //性别列表
                this.cmbSex.AddItems(Neusoft.HISFC.Object.Base.SexEnumService.List());
                this.cmbSex.Text = "男";

                //民族
                this.cmbNation.AddItems(managerIntegrate.GetConstantList(EnumConstant.NATION));
                this.cmbNation.Text = "汉族";

                //婚姻状态

                this.cmbMarry.AddItems(Neusoft.HISFC.Object.RADT.MaritalStatusEnumService.List());

                //国家
                this.cmbCountry.AddItems(managerIntegrate.GetConstantList(EnumConstant.COUNTRY));
                this.cmbCountry.Text = "中国";

                //职业信息
                this.cmbProfession.AddItems(managerIntegrate.GetConstantList(EnumConstant.PROFESSION));

                //工作单位
                this.cmbWorkAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //联系人信息

                this.cmbRelation.AddItems(managerIntegrate.GetConstantList(EnumConstant.RELATIVE));

                //联系人地址信息
                this.cmbLinkAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //家庭住址信息
                this.cmbHomeAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //籍贯
                this.cmbDistrict.AddItems(managerIntegrate.GetConstantList(EnumConstant.DIST));

                //病人来源信息
                this.cmbInSource.AddItems(managerIntegrate.GetConstantList(EnumConstant.INSOURCE));
                this.cmbInSource.SelectedIndex = 0;

                //入院途径信息
                this.cmbApproach.AddItems(managerIntegrate.GetConstantList(EnumConstant.INAVENUE));
                this.cmbApproach.SelectedIndex = 0;

                //入院情况信息
                this.cmbCircs.AddItems(managerIntegrate.GetConstantList(EnumConstant.INCIRCS));
                this.cmbCircs.SelectedIndex = 0;

                //医生信息
                this.cmbDoctor.AddItems(managerIntegrate.QueryEmployee(EnumEmployeeType.D));

                //床位间隔
                this.txtBedInterval.Text = "1";

                //入院日期
                this.dtpInTime.Value = this.inpatientManager.GetDateTimeFromSysDateTime(); //入院日期

                //生日
                this.dtpBirthDay.Value = this.inpatientManager.GetDateTimeFromSysDateTime();//出生日期

                //地区
                this.cmbArea.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //合同单位{B71C3094-BDC8-4fe8-A6F1-7CEB2AEC55DD}
                //this.cmbPact.AddItems(managerIntegrate.GetConstantList(EnumConstant.PACTUNIT));
                this.cmbPact.AddItems(managerIntegrate.QueryPactUnitAll());
                this.cmbPact.IsListOnly = true;

                this.cmbMark.AddItems(managerIntegrate.GetConstantList(Neusoft.HISFC.Object.Base.EnumConstant.REMARK));
                this.cmbMark.IsListOnly = true;

                //foreach (Control c in this.Controls)
                //{
                //    if (c is Neusoft.NFC.Interface.Controls.NeuComboBox)
                //    {
                //        ((Neusoft.NFC.Interface.Controls.NeuComboBox)c).Enter += new EventHandler(ucRegister_Enter);
                //    }
                //    else
                //    {
                //        c.Enter += new EventHandler(c_Enter);
                //    }
                //}
            }
            catch (Exception e)
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
                MessageBox.Show(e.Message);

                return(-1);
            }

            //this.RefreshPatientLists();

            Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
            return(1);
        }
Example #5
0
        /// <summary>
        /// 初始化下拉列表
        /// </summary>
        /// <returns></returns>
        protected virtual int Init()
        {
            try
            {
                //性别列表
                this.cmbSex.AddItems(Neusoft.HISFC.Object.Base.SexEnumService.List());
                this.cmbSex.Text = "男";

                //民族
                this.cmbNation.AddItems(managerIntegrate.GetConstantList(EnumConstant.NATION));
                this.cmbNation.Text = "汉族";

                //婚姻状态

                this.cmbMarry.AddItems(Neusoft.HISFC.Object.RADT.MaritalStatusEnumService.List());

                //国家
                this.cmbCountry.AddItems(managerIntegrate.GetConstantList(EnumConstant.COUNTRY));
                this.cmbCountry.Text = "中国";

                //职业信息
                this.cmbProfession.AddItems(managerIntegrate.GetConstantList(EnumConstant.PROFESSION));

                //工作单位
                this.cmbWorkAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //联系人信息

                this.cmbRelation.AddItems(managerIntegrate.GetConstantList(EnumConstant.RELATIVE));

                //联系人地址信息
                this.cmbLinkAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //家庭住址信息
                this.cmbHomeAddress.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //籍贯
                this.cmbDistrict.AddItems(managerIntegrate.GetConstantList(EnumConstant.DIST));


                //生日
                this.dtpBirthDay.Value = this.accountManager.GetDateTimeFromSysDateTime();//出生日期

                //地区
                this.cmbArea.AddItems(managerIntegrate.GetConstantList(EnumConstant.AREA));

                //合同单位
                this.cmbPact.AddItems(managerIntegrate.GetConstantList(EnumConstant.PACTUNIT));
                this.cmbPact.IsListOnly = true;
            }
            catch (Exception e)
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
                MessageBox.Show(e.Message);

                return(-1);
            }

            //this.RefreshPatientLists();

            Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
            return(1);
        }