コード例 #1
0
        /// <summary>
        /// 根据查询语句获得住院流水号 
        /// </summary>
        /// <param name="strSql"></param>
        /// <returns></returns>
        public ArrayList GetInpatientNoList(string strSql, Neusoft.HISFC.Models.HealthRecord.EnumServer.TablesName type)
        {
            ArrayList arrList = new ArrayList();

            try
            {
                this.ExecQuery(strSql);
                Neusoft.FrameWork.Models.NeuObject info = null;
                while (this.Reader.Read())
                {
                    info = new Neusoft.FrameWork.Models.NeuObject();
                    if (type == TablesName.BASE)
                    {
                        info.ID     = this.Reader[0].ToString(); //住院流水号
                        info.User01 = this.Reader[1].ToString(); //住院号
                    }
                    else
                    {
                        info.ID = this.Reader[0].ToString();
                    }
                    arrList.Add(info);
                }
                this.Reader.Close();
            }
            catch (Exception ex)
            {
                if (!this.Reader.IsClosed)
                {
                    this.Reader.Close();
                }
                this.Err = ex.Message;
                arrList  = null;
            }
            return(arrList);
        }
コード例 #2
0
        /// <summary>
        /// 获取查询的sql语句 
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public string GetSelectSql(Neusoft.HISFC.Models.HealthRecord.EnumServer.TablesName type)
        {
            string strSql = "";

            switch (type)
            {
            case TablesName.BASE:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.BASE", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.DIAG:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.DIAG", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.OPERATION:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.OPERATION", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.BASEANDDIAG:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.BASEANDDIAG", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.BASEANDOPERATION:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.BASEANDOPERATION", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.DIAGANDOPERATION:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.DIAGANDOPERATION", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.BASEANDDIAGANDOPERATION:
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.BASEANDDIAGANDOPERATION", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.BASESUB:     //非同一次入院 中根据住院流水号获取住院号 再查询住院号相同的住院流水号
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.BASESUB", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.DIAGSINGLE:     //单诊断
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.DIAGSINGLE", ref strSql) == -1)
                {
                    return(null);
                }
                break;

            case TablesName.OPERATIONSINGLE:     //单手术
                if (this.Sql.GetSql("Case.SearchManager.GetSelectSql.OPERATIONSINGLE", ref strSql) == -1)
                {
                    return(null);
                }
                break;
            }
            return(strSql);
        }