コード例 #1
0
        /// <summary>
        /// 更改内容时,更改DataTable
        /// </summary>
        void ModifiedDataTable()
        {
            DataRow[] dr = ds.Tables["cnp_com_snopmed"].Select("ID='" + this.txtCode.Text + "'");
            if (dr.Length != 0)
            {
                foreach (DataRow d in dr)
                {
                    d["ID"]          = this.txtCode.Text;
                    d["ENGLISHNAME"] = this.txtEname.Text;
                    d["MEMO"]        = this.txtMemo.Text;
                    d["NAME"]        = this.txtName.Text;
                    this.neuTreeView.SelectedNode.Text = this.txtName.Text;
                    d["PARENTCODE"] = this.txtPcode.Text;
                    d["SNOPCODE"]   = this.txtScode.Text;
                    if (this.txtSpell.Text == "" || this.txtWB.Text == "")
                    {
                        //根据名称生产拼音码和五笔码
                        Neusoft.HISFC.Models.Base.Spell spell = new Neusoft.HISFC.Models.Base.Spell();

                        spell = (Neusoft.HISFC.Models.Base.Spell)Neusoft.HISFC.BizProcess.Factory.Function.IntegrateManager.GetSpell(this.txtName.Text.Trim());
                        this.txtSpell.Text = spell.SpellCode;
                        this.txtWB.Text    = spell.WBCode;
                    }
                    d["SPELLCODE"]    = this.txtSpell.Text;
                    d["USERCODE"]     = this.txtUcode.Text;
                    d["WBCODE"]       = this.txtWB.Text;
                    d["DIAGNOSECODE"] = this.comboBox.Text;
                    d["SORTID"]       = this.neuNumericTextBox.Text;
                }
            }
        }
コード例 #2
0
ファイル: Spell.cs プロジェクト: ewin66/Management-System
        /// <summary>
        /// »ñµÃ×Ö·û´®
        /// </summary>
        /// <param name="Words"></param>
        /// <returns></returns>
        public Neusoft.HISFC.Models.Base.ISpell Get(string Words)
        {
            Neusoft.HISFC.Models.Base.Spell spell = new Neusoft.HISFC.Models.Base.Spell();
            string strSql = "", strExeSql = "";

            if (this.Sql.GetSql("Manager.Spell.GetSpellCode", ref strSql) == -1)
            {
                return(null);
            }
            strExeSql = strSql;
            for (int i = 0; i < Words.Length; i++)
            {
                string word = Words.Substring(i, 1);
                //strExeSql = string.Format(strSql,word);
                if (this.ExecQuery(strExeSql, word) == -1)
                {
                    return(null);
                }

                try
                {
                    this.Reader.Read();
                    spell.SpellCode = spell.SpellCode + this.Reader[0].ToString();
                    spell.WBCode    = spell.WBCode + this.Reader[1].ToString();
                }
                catch {}
            }
            return(spell);
        }
コード例 #3
0
        protected override bool ProcessDialogKey(Keys keyData)
        {
            if (this.fpStorage.ContainsFocus)
            {
                if (keyData == Keys.Enter)
                {
                    if (this.fpStorage_Sheet1.ActiveColumnIndex == 2)
                    {
                        Neusoft.HISFC.Models.Base.Spell      spCode  = new Neusoft.HISFC.Models.Base.Spell();
                        Neusoft.HISFC.BizLogic.Manager.Spell mySpell = new Neusoft.HISFC.BizLogic.Manager.Spell();

                        spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(fpStorage_Sheet1.Cells[this.fpStorage_Sheet1.ActiveRowIndex, 2].Text.ToString());

                        if (spCode.SpellCode.Length > 10)
                        {
                            spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                        }
                        if (spCode.WBCode.Length > 10)
                        {
                            spCode.WBCode = spCode.WBCode.Substring(0, 10);
                        }

                        this.fpStorage_Sheet1.Cells[this.fpStorage_Sheet1.ActiveRowIndex, 3].Value = spCode.SpellCode;
                        this.fpStorage_Sheet1.Cells[this.fpStorage_Sheet1.ActiveRowIndex, 4].Value = spCode.WBCode;
                    }

                    this.fpStorage_Sheet1.ActiveColumnIndex++;
                }
            }
            return(base.ProcessDialogKey(keyData));
        }
コード例 #4
0
ファイル: Spell.cs プロジェクト: ewin66/Management-System
 /// <summary>
 /// ¸ù¾ÝÆ´ÒôÂë»ñȡͬÒôµÄ×Ö  ·µ»Ø Neusoft.HISFC.Models.Base.SpellCodeÀàÐÍʵÌ壬Name´æ´¢ºº×Ö
 /// </summary>
 /// <param name="SpellCode">Æ´ÒôÂë</param>
 /// <returns>³ö´í·µ»Ønull </returns>
 public ArrayList  GetWord(string SpellCode)
 {
     try
     {
         ArrayList list = new ArrayList();
         Neusoft.HISFC.Models.Base.Spell spell = null;
         string strSql = "";
         if (this.Sql.GetSql("Manager.Spell.GetWord", ref strSql) == -1)
         {
             return(null);
         }
         //strSql = string.Format(strSql,SpellCode);
         if (this.ExecQuery(strSql, SpellCode) == -1)
         {
             return(null);
         }
         while (this.Reader.Read())
         {
             spell      = new Neusoft.HISFC.Models.Base.Spell();
             spell.Name = this.Reader[0].ToString();
             list.Add(spell);                     //
         }
         Reader.Close();
         return(list);
     }
     catch (Exception ex)
     {
         if (!this.Reader.IsClosed)
         {
             this.Reader.Close();
         }
         this.Err = ex.Message;
         return(null);
     }
 }
コード例 #5
0
        /// <summary>
        /// 获取指定行的公司名称拼音码/五笔码信息
        /// </summary>
        /// <param name="iRow">指定行名称</param>
        /// <returns></returns>
        private int GetSpell(int iRow)
        {
            if (this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnSet.ColName].Text.ToString() == "")
            {
                return(1);
            }

            Neusoft.HISFC.Models.Base.Spell      spCode       = new Neusoft.HISFC.Models.Base.Spell();
            Neusoft.HISFC.BizLogic.Manager.Spell spellManager = new Neusoft.HISFC.BizLogic.Manager.Spell();

            spCode = (Neusoft.HISFC.Models.Base.Spell)spellManager.Get(this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnSet.ColName].Text.ToString());

            if (spCode != null && spCode.SpellCode != null)
            {
                if (spCode.SpellCode.Length > 10)
                {
                    spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                }
                if (spCode.WBCode.Length > 10)
                {
                    spCode.WBCode = spCode.WBCode.Substring(0, 10);
                }

                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnSet.ColSpell].Value = spCode.SpellCode;
                this.neuSpread1_Sheet1.Cells[iRow, (int)ColumnSet.ColWB].Value    = spCode.WBCode;
            }

            return(1);
        }
コード例 #6
0
        private void neuSpread1_LeaveCell(object sender, LeaveCellEventArgs e)
        {
            if (e.Column == 3)
            {
                if (neuSpread1_Sheet1.Cells[e.Row, 3].Text.ToString() == "")
                {
                    return;
                }
                Neusoft.HISFC.Models.Base.Spell      spCode  = new Neusoft.HISFC.Models.Base.Spell();
                Neusoft.HISFC.BizLogic.Manager.Spell mySpell = new Neusoft.HISFC.BizLogic.Manager.Spell();

                spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(neuSpread1_Sheet1.Cells[e.Row, 3].Text.ToString());

                if (spCode.SpellCode.Length > 10)
                {
                    spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                }
                if (spCode.WBCode.Length > 10)
                {
                    spCode.WBCode = spCode.WBCode.Substring(0, 10);
                }

                this.neuSpread1_Sheet1.Cells[e.Row, 4].Value = spCode.SpellCode;
                this.neuSpread1_Sheet1.Cells[e.Row, 5].Value = spCode.WBCode;
            }
        }
コード例 #7
0
        /// <summary>
        /// 初始化

        /// </summary>
        /// <param name="tv"></param>
        /// <param name="ItemList"></param>
        public int Init(System.Windows.Forms.TreeView tv, ArrayList ItemList)
        {
            this.treeView          = tv;
            treeView.HideSelection = false;
            ArrayList list = new ArrayList();

            Neusoft.HISFC.Models.Base.Spell obj = null;
            if (ItemList == null)
            {
                foreach (TreeNode node in tv.Nodes)
                {
                    obj      = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID   = node.Text;
                    obj.Name = node.Text;
                    list.Add(obj);
                }
            }
            else if (ItemList.Count == 0)
            {
                foreach (TreeNode node in tv.Nodes)
                {
                    obj      = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID   = node.Text;
                    obj.Name = node.Text;
                    list.Add(obj);
                }
            }
            else
            {
                list = ItemList;
            }
            this.comSearchText.AddItems(list);
            return(0);
        }
コード例 #8
0
        private void txtName_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                Neusoft.HISFC.Models.Base.Spell spCode = new Neusoft.HISFC.Models.Base.Spell();

                spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(this.txtName.Text.Trim());
                if (spCode.SpellCode.Length > 8)
                {
                    this.txtSpellCode.Text = spCode.SpellCode.Substring(0, 8);
                }
                else
                {
                    this.txtSpellCode.Text = spCode.SpellCode;
                }
                if (spCode.WBCode.Length > 8)
                {
                    this.txtWbCode.Text = spCode.WBCode.Substring(0, 8);
                }
                else
                {
                    this.txtWbCode.Text = spCode.WBCode;
                }
            }
        }
コード例 #9
0
 /// <summary>
 /// 根据人员姓名自动获得五笔码和拼音码
 /// </summary>
 private void CreateSpell()
 {
     if (this.txtSpell_Code.Text.Trim() == "" || this.txtWB_Code.Text.Trim() == "")
     {
         Neusoft.HISFC.Models.Base.Spell spell = new Neusoft.HISFC.Models.Base.Spell();
         spell = (Neusoft.HISFC.Models.Base.Spell)spellMgr.Get(this.txtEmployeeName.Text.Trim());
         this.txtSpell_Code.Text = spell.SpellCode;
         this.txtWB_Code.Text    = spell.WBCode;
     }
 }
コード例 #10
0
        /// <summary>
        /// 自动得到拼音码,五笔码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtName_KeyUp(object sender, KeyEventArgs e)
        {
            Neusoft.HISFC.Models.Base.Spell            spCode  = new Neusoft.HISFC.Models.Base.Spell();
            Neusoft.HISFC.BizProcess.Integrate.Manager mySpell = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(this.txtName.Text.ToString());


            this.txtSpellCode.Text = spCode.SpellCode;
            this.txtWbCode.Text    = spCode.WBCode;
        }
コード例 #11
0
        /// <summary>
        /// 根据科室名称生成拼音码和五笔码
        /// </summary>
        private void CreateSpell()
        {
            if (this.txtSpell_Code.Text == "" || this.txtWB_Code.Text == "")
            {
                //根据名称生产拼音码和五笔码
                Neusoft.HISFC.Models.Base.Spell spell = new Neusoft.HISFC.Models.Base.Spell();

                spell = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(this.txtDeptName.Text.Trim());
                this.txtSpell_Code.Text = spell.SpellCode;
                this.txtWB_Code.Text    = spell.WBCode;
            }
        }
コード例 #12
0
        /// <summary>
        /// 初始化Dataset
        /// </summary>
        /// <param name="al"></param>
        private void AddToDataSet(ArrayList al)
        {
            Neusoft.HISFC.Models.Base.Spell      spellobj = new Neusoft.HISFC.Models.Base.Spell( );
            Neusoft.HISFC.BizLogic.Manager.Spell spell    = new Neusoft.HISFC.BizLogic.Manager.Spell( );

            if (al.Count <= 0)
            {
                return;
            }

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm(Neusoft.FrameWork.Management.Language.Msg("正在检索数据.请稍候..."));
            Application.DoEvents();

            for (int i = 0; i < al.Count; i++)
            {
                Neusoft.FrameWork.Models.NeuObject obj = new Neusoft.FrameWork.Models.NeuObject( );
                obj      = (Neusoft.FrameWork.Models.NeuObject)al[i];
                spellobj = spell.Get(obj.Name) as Neusoft.HISFC.Models.Base.Spell;
                if (spellobj == null)
                {
                    Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg(obj.Name + " 自动生成该科拼音码时发生错误." + obj.ID + "科室"));
                    continue;
                }

                //{BB505126-A265-4c62-9392-30D99503E36E}
                //替换obj.User01.tostring() 为 Neusoft.FrameWork.Function.NConvert.ToDateTime(obj.User01).ToLongTimeString()
                string[] key = { obj.ID, obj.User03 + this.objHelper.GetName(obj.User03), Neusoft.FrameWork.Function.NConvert.ToDateTime(obj.User01).ToLongTimeString() };
                if (this.ds.Tables[0].Rows.Find(key) != null)
                {
                    Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg(obj.Name + "该科已存在 不能重复添加" + obj.ID + "该科室"));
                    continue;
                }

                this.ds.Tables[0].Rows.Add(new object[] {
                    obj.ID,                                                                                  //取药科室编码
                    obj.Name,                                                                                //取药科室名称
                    obj.User03 + this.objHelper.GetName(obj.User03),                                         //药品类型
                    Neusoft.FrameWork.Function.NConvert.ToDateTime(obj.User01).ToLongTimeString(),           //开始时间
                    Neusoft.FrameWork.Function.NConvert.ToDateTime(obj.User02).ToLongTimeString(),           //结束时间
                    obj.Memo,                                                                                //备注
                    spellobj.SpellCode.Length > 10 ? spellobj.SpellCode.Substring(0, 10):spellobj.SpellCode, //拼音码保留十位
                    spellobj.WBCode.Length > 10 ? spellobj.WBCode.Substring(0, 10):spellobj.WBCode           //五笔码保留十位
                });
            }

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();

            this.ds.Tables[0].AcceptChanges( );
            this.SetFp( );
        }
コード例 #13
0
        /// <summary>
        /// 初始化出入库类型
        /// </summary>
        /// <returns></returns>
        private bool InitCbInOutType()
        {
            ArrayList alInOut = new ArrayList();

            Neusoft.HISFC.Models.Base.Spell obj1 = new Neusoft.HISFC.Models.Base.Spell();
            obj1.ID   = "IN";
            obj1.Name = "入库";
            alInOut.Add(obj1);
            Neusoft.HISFC.Models.Base.Spell obj2 = new Neusoft.HISFC.Models.Base.Spell();
            obj2.ID   = "OUT";
            obj2.Name = "出库";
            alInOut.Add(obj2);
            this.cbInOutType.AddItems(alInOut);
            this.cbInOutType.SelectedIndex = 0;
            return(true);
        }
コード例 #14
0
        /// <summary>
        /// 初始化药品类别
        /// </summary>
        /// <returns></returns>
        private bool GetItemzFunctionInfo()
        {
            Neusoft.HISFC.BizLogic.RADT.InPatient Manager       = new Neusoft.HISFC.BizLogic.RADT.InPatient();
            System.Collections.ArrayList          alUsecodeList = new ArrayList();
            this.cbPhaName.alItems.Clear();
            this.cbPhaName.Items.Clear();
            Neusoft.HISFC.Models.Base.Spell sp = new Neusoft.HISFC.Models.Base.Spell();
            sp.Name = "全部";
            sp.ID   = "ALL";
            alUsecodeList.Add(sp);
            //{3868F08C-D224-443b-94FB-FE4A493742B6} 药品过滤时要加上规格
            //string strSql = @" select tt.drug_code,tt.trade_name,tt.spell_code,tt.wb_code from pha_com_baseinfo tt";
            string strSql = @" select tt.drug_code,tt.trade_name,tt.specs,tt.spell_code,tt.wb_code from pha_com_baseinfo tt ";

            strSql = string.Format(strSql);
            DataSet ds = new DataSet();

            if (Manager.ExecQuery(strSql, ref ds) == -1)
            {
                return(false);
            }
            if (ds == null || ds.Tables[0] == null)
            {
                MessageBox.Show("查询错误", "警告,药品加载错误!");
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID        = ds.Tables[0].Rows[i][0].ToString();
                    obj.Name      = ds.Tables[0].Rows[i][1].ToString();
                    obj.Memo      = ds.Tables[0].Rows[i][2].ToString();
                    obj.SpellCode = ds.Tables[0].Rows[i][3].ToString();
                    obj.WBCode    = ds.Tables[0].Rows[i][4].ToString();
                    alUsecodeList.Add(obj);
                }
                int c = this.cbPhaName.AddItems(alUsecodeList);
            }
            else
            {
                return(false);
            }
            this.cbPhaName.SelectedIndex = 0;
            return(true);
        }
コード例 #15
0
        /// <summary>
        /// .自动生成拼音码和五笔码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtName_Leave(object sender, EventArgs e)
        {
            if (this.txtName.Text.IndexOfAny(new char[] { '@', '.', ',', '!', '-', '#', '$', '%', '^', '&', '*', '[', ']', '|', '}', '\'', '?' }) != -1)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("无效的药理作用名称.\n" +
                                                                          "无效字符:  '@', '.', ',', '!', '-', '#', '$', '%', '^', '&', '*', '[', ']', '|', '}','\'','?'"));
                this.txtName.Focus();
                this.txtName.SelectAll();
                return;
            }

            Neusoft.HISFC.Models.Base.Spell      spellobj = new Neusoft.HISFC.Models.Base.Spell( );
            Neusoft.HISFC.BizLogic.Manager.Spell spell    = new Neusoft.HISFC.BizLogic.Manager.Spell( );

            spellobj = spell.Get(this.txtName.Text.Trim()) as Neusoft.HISFC.Models.Base.Spell;

            this.txtSpellCode.Text = spellobj.SpellCode;
            this.txtWBCode.Text    = spellobj.WBCode;
        }
コード例 #16
0
        private bool InitTypeCode()
        {
            Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient();
            ArrayList alTypeCode = new ArrayList();

            this.cbTypeName.alItems.Clear();
            this.cbTypeName.Items.Clear();
            Neusoft.HISFC.Models.Base.Spell sp = new Neusoft.HISFC.Models.Base.Spell();
            sp.Name = "全部";
            sp.ID   = "ALL";
            alTypeCode.Add(sp);
            string strSql = @" SELECT m.type_code,m.type_name FROM met_ipm_kind m";

            strSql = string.Format(strSql);
            DataSet ds = new DataSet();

            if (Manager.ExecQuery(strSql, ref ds) == -1)
            {
                return(false);
            }
            if (ds == null || ds.Tables[0] == null)
            {
                MessageBox.Show("查询错误", "警告,药品加载错误!");
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID   = ds.Tables[0].Rows[i][0].ToString();
                    obj.Name = ds.Tables[0].Rows[i][1].ToString();
                    alTypeCode.Add(obj);
                }
                int c = this.cbTypeName.AddItems(alTypeCode);
            }
            else
            {
                return(false);
            }
            this.cbTypeName.SelectedIndex = 0;
            return(true);
        }
コード例 #17
0
        /// <summary>
        /// ���ȫ���б� ���ص�ʵ�� �̳���ISpellCode�ӿ�
        /// </summary>
        /// <returns>ArrayList(DiagnoseType)</returns>
        public static ArrayList SpellList()
        {
            Neusoft.HISFC.Models.Base.Spell info = null;
            DiagnoseType    aDiagnoseType;
            enuDiagnoseType e        = new enuDiagnoseType();
            ArrayList       alReturn = new ArrayList();
            int             i;

            for (i = 1; i <= System.Enum.GetValues(e.GetType()).GetUpperBound(0) + 1; i++)
            {
                info               = new Neusoft.HISFC.Models.Base.Spell();
                aDiagnoseType      = new DiagnoseType();
                aDiagnoseType.ID   = i;
                aDiagnoseType.Memo = i.ToString();
                info.ID            = i.ToString();
                info.Name          = aDiagnoseType.Name;
                alReturn.Add(info);
            }
            return(alReturn);
        }
コード例 #18
0
 /// <summary>
 /// 生成拼音码
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textICDName_Leave(object sender, System.EventArgs e)
 {
     try
     {
         //生成 拼音码
         //定义 实例化 业务类
         Neusoft.HISFC.BizLogic.Manager.Spell mySpell = new Neusoft.HISFC.BizLogic.Manager.Spell();
         //声明 实例化实体类
         Neusoft.HISFC.Models.Base.Spell spCode = new Neusoft.HISFC.Models.Base.Spell();
         //查询
         spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(textICDName.Text);
         //出错返回
         if (spCode.SpellCode == null)
         {
             return;
         }
         //判断是否超长
         if (spCode.SpellCode.Length > 8)
         {
             spCode.SpellCode = spCode.SpellCode.Substring(0, 8);
         }
         //判断是否超长
         if (spCode.WBCode.Length > 8)
         {
             spCode.WBCode = spCode.WBCode.Substring(0, 8);
         }
         if (textSpellCode.Text == "")
         {
             //赋值
             textSpellCode.Text = spCode.SpellCode; //拼音码
         }
         if (WBCode.Text == "")
         {
             WBCode.Text = spCode.WBCode; //五笔码
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #19
0
        private bool InitItemType()
        {
            ArrayList alItemType = new ArrayList();

            Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
            obj.ID   = "ALL";
            obj.Name = "全部";
            alItemType.Add(obj);

            Neusoft.HISFC.Models.Base.Spell obj1 = new Neusoft.HISFC.Models.Base.Spell();
            obj1.ID   = "1";
            obj1.Name = "药品";
            alItemType.Add(obj1);
            Neusoft.HISFC.Models.Base.Spell obj2 = new Neusoft.HISFC.Models.Base.Spell();
            obj2.ID   = "2";
            obj2.Name = "非药品";
            alItemType.Add(obj2);
            this.cbItemName.AddItems(alItemType);
            this.cbItemName.SelectedIndex = 0;
            return(true);
        }
コード例 #20
0
        private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
        {
            if (e.Column == (int)ColumnSet.ColName)
            {
                Neusoft.HISFC.Models.Base.Spell spCode = new Neusoft.HISFC.Models.Base.Spell();

                spCode = (Neusoft.HISFC.Models.Base.Spell) this.spellManager.Get(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColName].Text.ToString());

                if (spCode == null)
                {
                    return;
                }
                if (spCode.SpellCode == null || spCode.SpellCode == "")
                {
                    return;
                }

                this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColSpellCode].Value = spCode.SpellCode;
                this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColWBCode].Value    = spCode.WBCode;
            }
        }
コード例 #21
0
        private bool GetItemzFunctionInfo()
        {
            Neusoft.HISFC.BizLogic.RADT.InPatient Manager       = new Neusoft.HISFC.BizLogic.RADT.InPatient();
            System.Collections.ArrayList          alUsecodeList = new ArrayList();
            this.neuComboBox1.alItems.Clear();
            this.neuComboBox1.Items.Clear();
            string strSql = @"select code,name,spell_code,wb_code from com_dictionary  where type = 'DOSAGEFORM'";

            strSql = string.Format(strSql);
            DataSet ds = new DataSet();

            if (Manager.ExecQuery(strSql, ref ds) == -1)
            {
                return(false);
            }
            if (ds == null || ds.Tables[0] == null)
            {
                MessageBox.Show("查询错误", "警告,用法加载错误!");
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID        = ds.Tables[0].Rows[i][0].ToString();
                    obj.Name      = ds.Tables[0].Rows[i][1].ToString();
                    obj.SpellCode = ds.Tables[0].Rows[i][2].ToString();
                    obj.WBCode    = ds.Tables[0].Rows[i][3].ToString();
                    alUsecodeList.Add(obj);
                }
                int c = this.neuComboBox1.AddItems(alUsecodeList);
            }
            else
            {
                return(false);
            }
            return(true);
        }
コード例 #22
0
        private bool GetItemzFunctionInfo1()
        {
            Neusoft.HISFC.BizLogic.RADT.InPatient Manager        = new Neusoft.HISFC.BizLogic.RADT.InPatient();
            System.Collections.ArrayList          alUsecodeList1 = new ArrayList();
            this.neuComboBox2.alItems.Clear();
            this.neuComboBox2.Items.Clear();
            string strSql = @"select  t.dept_code,t.dept_name,t.spell_code,t.wb_code from com_department t where dept_type IN('P','PI')";

            strSql = string.Format(strSql);
            DataSet ds = new DataSet();

            if (Manager.ExecQuery(strSql, ref ds) == -1)
            {
                return(false);
            }
            if (ds == null || ds.Tables[0] == null)
            {
                MessageBox.Show("²éѯ´íÎó", "¾¯¸æ,Ó÷¨¼ÓÔØ´íÎó£¡");
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID        = ds.Tables[0].Rows[i][0].ToString();
                    obj.Name      = ds.Tables[0].Rows[i][1].ToString();
                    obj.SpellCode = ds.Tables[0].Rows[i][2].ToString();
                    obj.WBCode    = ds.Tables[0].Rows[i][3].ToString();
                    alUsecodeList1.Add(obj);
                }
                int c = this.neuComboBox2.AddItems(alUsecodeList1);
            }
            else
            {
                return(false);
            }
            return(true);
        }
コード例 #23
0
        protected override void OnLoad()
        {
            base.OnLoad();

            // 药品类别下拉列表
            Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant();
            ArrayList allDrugType = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ITEMTYPE);

            if (allDrugType == null)
            {
                MessageBox.Show(Language.Msg("根据常数类别获取药品类型名称发生错误!") + consManager.Err);
                drugTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper();
                return;
            }

            Neusoft.FrameWork.Models.NeuObject drugTypeObj = new Neusoft.FrameWork.Models.NeuObject();
            drugTypeObj.ID   = "ALL";
            drugTypeObj.Name = "全部";

            allDrugType.Insert(0, drugTypeObj);

            drugTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(allDrugType);

            for (int i = 0; i < allDrugType.Count; i++)
            {
                ncboDrugType.Items.Add(allDrugType[i]);
            }
            ncboDrugType.alItems.AddRange(allDrugType);

            if (ncboDrugType.Items.Count > 0)
            {
                ncboDrugType.SelectedIndex = 0;
                drugTypeName  = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugType.Items[0]).Name;
                drugTypeValue = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugType.Items[0]).ID;
            }

            // 药品性质下拉列表
            ArrayList allQuality = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.DRUGQUALITY);

            if (allQuality == null)
            {
                MessageBox.Show(Language.Msg("根据常数类别获取药品性质发生错误!") + consManager.Err);
                this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper();
                return;
            }

            Neusoft.FrameWork.Models.NeuObject qualityObj = new Neusoft.FrameWork.Models.NeuObject();
            qualityObj.ID   = "ALL";
            qualityObj.Name = "全部";

            allQuality.Insert(0, qualityObj);

            this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper(allQuality);

            for (int i = 0; i < allQuality.Count; i++)
            {
                ncboDrugQuality.Items.Add(allQuality[i]);
            }
            ncboDrugQuality.alItems.AddRange(allQuality);

            if (ncboDrugQuality.Items.Count > 0)
            {
                ncboDrugQuality.SelectedIndex = 0;
                drugQualityName  = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugQuality.Items[0]).Name;
                drugQualityValue = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugQuality.Items[0]).ID;
            }

            // 供货公司下拉列表
            Neusoft.HISFC.BizLogic.RADT.InPatient Manager       = new Neusoft.HISFC.BizLogic.RADT.InPatient();
            System.Collections.ArrayList          alUsecodeList = new ArrayList();
            this.ncboCompany.alItems.Clear();
            this.ncboCompany.Items.Clear();
            string strSql = @"select fac_code,fac_name,spell_code,wb_code from pha_com_company";

            strSql = string.Format(strSql);
            DataSet ds = new DataSet();

            if (Manager.ExecQuery(strSql, ref ds) == -1)
            {
                //return;
            }
            if (ds == null || ds.Tables[0] == null)
            {
                MessageBox.Show("查询错误", "警告,用法加载错误!");
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell();
                    obj.ID        = ds.Tables[0].Rows[i][0].ToString();
                    obj.Name      = ds.Tables[0].Rows[i][1].ToString();
                    obj.SpellCode = ds.Tables[0].Rows[i][2].ToString();
                    obj.WBCode    = ds.Tables[0].Rows[i][3].ToString();
                    alUsecodeList.Add(obj);
                }
            }

            Neusoft.HISFC.Models.Base.Spell obj2 = new Neusoft.HISFC.Models.Base.Spell();
            obj2.ID        = "ALL";
            obj2.Name      = "全部";
            obj2.SpellCode = "QB";
            alUsecodeList.Insert(0, obj2);

            for (int i = 0; i < alUsecodeList.Count; i++)
            {
                ncboCompany.Items.Add(alUsecodeList[i]);
            }

            ncboCompany.alItems.AddRange(alUsecodeList);

            if (ncboCompany.Items.Count > 0)
            {
                ncboCompany.SelectedIndex = 0;
                companyName  = ((Neusoft.HISFC.Models.Base.Spell)ncboCompany.Items[0]).Name;
                companyValue = ((Neusoft.HISFC.Models.Base.Spell)ncboCompany.Items[0]).ID;
            }
        }
コード例 #24
0
        /// <summary>
        /// 住院检查
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="orderList"></param>
        public void ControlValue(Neusoft.HISFC.Models.RADT.Patient patient, List <Neusoft.HISFC.Models.Order.Inpatient.Order> orderList)
        {
            this.neuSpread1_Sheet1.Cells[0, 0].Value = this.mgrIntegrate.GetHospitalName() + orderList[0].Item.Name.ToString() + "检查申请单";

            if (orderList[0].IsEmergency)
            {
                this.neuSpread1_Sheet1.Cells[0, 9].Value         = "加  急";//加急
                this.neuSpread1_Sheet1.Cells.Get(0, 9).ForeColor = System.Drawing.Color.Red;
            }
            if (orderList[0].BeginTime != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 1].Value = orderList[0].BeginTime.ToString();//申请日期
            }
            if (patient.PID.PatientNO != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 5].Value = patient.PID.PatientNO.ToString();//住院号
            }
            if (patient.Pact.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 9].Value = patient.Pact.Name.ToString();//费用类别
            }
            if (patient.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 1].Value = patient.Name.ToString();//姓名
            }
            if (patient.Sex != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 3].Value = patient.Sex.ToString();//性别
            }
            if (patient.Age != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 5].Value = patient.Age.ToString();//年龄
            }
            if (orderList[0].NurseStation.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 7].Value = orderList[0].NurseStation.Name.ToString();//病区
            }
            if (orderList[0].Patient.PVisit.PatientLocation.Bed.ID != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 9].Value = orderList[0].Patient.PVisit.PatientLocation.Bed.ID.ToString();//床号
            }
            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = new Neusoft.HISFC.Models.Fee.Item.Undrug();

            Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item();

            undrug = item.GetValidItemByUndrugCode(orderList[0].Item.ID.ToString());

            if (undrug.CheckRequest != null)
            {
                this.neuSpread1_Sheet1.Cells[4, 1].Value = undrug.CheckRequest.ToString();//检查部位/要求
            }
            #region  诊断(代码摘自ucDiagnosis FillList())
            Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC diagnoseMgrMc = new Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC();
            Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            Neusoft.HISFC.Models.HealthRecord.Diagnose diagns = null;
            Neusoft.HISFC.Models.Base.Spell            dsType = null;
            Neusoft.HISFC.Models.Base.Employee         emp    = null;

            //ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.PVisit.PatientLocation.Bed.InpatientNO.ToString());
            ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.ID);
            ArrayList dsTypeList   = Neusoft.HISFC.Models.HealthRecord.DiagnoseType.SpellList();
            ArrayList drList       = managerIntegrate.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            String    strDsType    = "";
            String    strDrName    = "";
            string    diag         = string.Empty;
            if (diagnoseList != null)
            {
                for (int i = 0; i < diagnoseList.Count; i++)
                {
                    diagns = (Neusoft.HISFC.Models.HealthRecord.Diagnose)diagnoseList[i];
                    for (int j = 0; j < dsTypeList.Count; j++)
                    {
                        dsType = (Neusoft.HISFC.Models.Base.Spell)dsTypeList[j];
                        if (dsType.ID.ToString() == diagns.DiagInfo.DiagType.ID)
                        {
                            strDsType = dsType.Name;//诊断类型
                            break;
                        }
                    }
                    //填入诊断医生姓名
                    for (int j = 0; j < drList.Count; j++)
                    {
                        emp = (Neusoft.HISFC.Models.Base.Employee)drList[j];
                        if (emp.ID.ToString() == diagns.DiagInfo.Doctor.ID)
                        {
                            strDrName = emp.Name;
                            break;
                        }
                    }
                    if (i == 0)
                    {
                        diag = "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                    else
                    {
                        diag = diag + "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                }
            }
            this.neuSpread1_Sheet1.Cells[9, 1].Value = diag;
            #endregion

            if (orderList[0].ReciptDoctor.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[19, 1].Value = orderList[0].Memo.ToString();//备注
            }
            if (orderList[0].Memo != null)
            {
                this.neuSpread1_Sheet1.Cells[25, 9].Value = orderList[0].ReciptDoctor.Name.ToString();//医师
            }
            if (undrug.Notice != null)
            {
                this.neuSpread1_Sheet1.Cells[22, 1].Value = undrug.Notice.ToString();//注意事项
            }
        }