Exemplo n.º 1
0
        /// <summary>
        /// 初始化病人状态下拉框
        /// 【仁和版本需求修改】
        /// 科室质控员身份登录是看到**病区出院和病人出院
        /// 质控科人员是可看到**病区出院、病人出院、病区分床状态
        /// </summary>
        private void InitStatus()
        {
            lookUpWindowStatus.SqlHelper = m_App.SqlHelper;
            string sql       = string.Empty;
            string Uidentity = m_SqlManger.JudgeIdentity(m_App.User.Id, m_SqlManger); //判断当前登录的人是科室质控员还是质控科的

            USERINDENTY = Uidentity;                                                  //赋给公公共变量

            if (Uidentity == "QCDepart")                                              //为空说明是质控科的
            {
                sql = string.Format(@"select c.id, c.name from categorydetail c 
                                     where c.categoryid = '15' and c.id in 
                                    (select distinct status from inpatient) and c.id in ('1501','1502','1503')");
            }
            else//不为空表明科室质控员或者科室主任
            {
                sql = string.Format(@"select c.id, c.name from categorydetail c 
                                     where c.categoryid = '15' and c.id in 
                                    (select distinct status from inpatient) and c.id in ('1502','1503')");
            }
            DataTable Dept = m_App.SqlHelper.ExecuteDataTable(sql);

            Dept.Columns["ID"].Caption   = "状态代码";
            Dept.Columns["NAME"].Caption = "状态名称";

            Dictionary <string, int> cols = new Dictionary <string, int>();

            cols.Add("ID", 65);
            cols.Add("NAME", 160);

            SqlWordbook deptWordBook = new SqlWordbook("querybook", Dept, "ID", "NAME", cols, "ID//Name");

            lookUpEditorStatus.SqlWordbook = deptWordBook;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取当前病人号的评分表
        /// </summary>
        /// <returns></returns>
        private DataTable GetQCTable()
        {
            string Uidentity = m_SqlManger.JudgeIdentity(m_App.User.Id, m_SqlManger);//判断当前登录的人是科室质控员还是质控科的

            if (Uidentity == "QCMANAGER" || Uidentity == "CHIEF")
            {
                string sqlTable = string.Format(
                    @"select * from emr_rhqc_table where noofinpat='{0}' and stateid in('8700','8701','8702','8703','8704')", m_NoOfInpat);
                DataTable dtQCTable = m_App.SqlHelper.ExecuteDataTable(sqlTable);
                if (dtQCTable != null && dtQCTable.Rows.Count > 0)
                {
                    return(dtQCTable);
                }
                else
                {
                    string guid      = Guid.NewGuid().ToString();
                    string statuId   = "8700";
                    string sqlInsert = String.Format(@"insert into emr_rhqc_table values('{0}','{1}','{2}','{3}','{4}','1','{5}','0')", guid, m_NoOfInpat, m_App.User.Id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), m_App.User.Name, statuId);
                    m_App.SqlHelper.ExecuteNoneQuery(sqlInsert);
                    dtQCTable = m_App.SqlHelper.ExecuteDataTable(sqlTable);
                    return(dtQCTable);
                }
            }
            else if (Uidentity == "QCDepart")
            {
                string sqlTable = string.Format(
                    @"select * from emr_rhqc_table where noofinpat='{0}' and stateid='8705'", m_NoOfInpat);
                DataTable dtQCTable = m_App.SqlHelper.ExecuteDataTable(sqlTable);
                if (dtQCTable != null && dtQCTable.Rows.Count > 0)
                {
                    return(dtQCTable);
                }
                else
                {
                    string guid      = Guid.NewGuid().ToString();
                    string statuId   = "8705";
                    string sqlInsert = String.Format(@"insert into emr_rhqc_table values('{0}','{1}','{2}','{3}','{4}','1','{5}','0')", guid, m_NoOfInpat, m_App.User.Id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), m_App.User.Name, statuId);
                    m_App.SqlHelper.ExecuteNoneQuery(sqlInsert);
                    dtQCTable = m_App.SqlHelper.ExecuteDataTable(sqlTable);
                    return(dtQCTable);
                }
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        //设置科室的禁用与否
        private void SetlookUpEditorDepartmentEable()
        {
            string Uidentity = m_SqlManager.JudgeIdentity(m_app.User.Id, m_SqlManager);//判断当前登录的人是科室质控员还是质控科的

            if (Uidentity == "QCDepart")
            {
                lookUpEditorDepartment.Enabled = true;
                gridColumnRYZD.Visible         = false;
                gridColumnKouFenRE.Visible     = true;
            }
            else
            {
                lookUpEditorDepartment.Enabled = false;
                gridColumnRYZD.Visible         = true;
                gridColumnKouFenRE.Visible     = false;
            }
        }