示例#1
0
        /// <summary>
        /// 获得病历质量分类库 DataTable -> Dictionary<string, RuleCategory>
        /// </summary>
        /// <param name="dataTableCategory"></param>
        /// <returns></returns>
        public static Dictionary <string, RuleCategory> GetAllRuleCategory(DataTable dataTableCategory)
        {
            try
            {
                Dictionary <string, RuleCategory> dictCategory = new Dictionary <string, RuleCategory>();
                foreach (DataRow dr in dataTableCategory.Rows)
                {
                    RuleCategory category = new RuleCategory();

                    #region RuleCategory实例赋值
                    category.Code        = dr["CODE"].ToString();
                    category.Description = dr["DESCRIPTION"].ToString();
                    category.PY          = dr["PY"].ToString();
                    category.WB          = dr["WB"].ToString();
                    category.Memo        = dr["MEMO"].ToString();
                    #endregion

                    dictCategory.Add(category.Code, category);
                }
                return(dictCategory);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
 /// <summary>
 /// 新增时限规则
 /// by xlb 2013-01-06
 /// </summary>
 /// <param name="qcRule"></param>
 public static void InsertQcRule(QCRule qcRule, QCCondition qcCondition, RuleCategory ruleCategory)
 {
     try
     {
         string c_SqlInsert = "insert into QCRule(RULECODE,CONDITIONCODE,DESCRIPTION,"
                              + "REMINDER,FOULMESSAGE,DELAYTIME,TIMELIMIT,MARK,CYCLETIMES,CYCLEINTERVAL,"
                              + "DOCOTORLEVEL,SORTCODE,MEMO,SCORE,QCCODE,valid) values(seq_qcrulecode.nextval,@CONDITIONCODE,@DESCRIPTION,"
                              + "@REMINDER,@FOULMESSAGE,@DELAYTIME,@TIMELIMIT,@MARK,@CYCLETIMES,@CYCLEINTERVAL,@DOCOTORLEVEL,"
                              + "@SORTCODE,@MEMO,@SCORE,@QCCODE,@valid)";
         SqlParameter[] sps =
         {
             new SqlParameter("@CONDITIONCODE", qcCondition.Code),
             new SqlParameter("@DESCRIPTION",   qcRule.Description),
             new SqlParameter("@REMINDER",      qcRule.Reminder),
             new SqlParameter("@FOULMESSAGE",   qcRule.FoulMessage),
             new SqlParameter("@TIMELIMIT",     qcRule.TimeLimit),
             new SqlParameter("@MARK",          qcRule.MARK),
             new SqlParameter("@CYCLETIMES",    qcRule.CycleTimes),
             new SqlParameter("@CYCLEINTERVAL", qcRule.CycleInterval),
             new SqlParameter("@DOCOTORLEVEL",  (int)qcRule.DoctorLevel),
             new SqlParameter("@SORTCODE",      ruleCategory.Code),
             new SqlParameter("@valid",         qcRule.Valid),
             new SqlParameter("@MEMO",          qcRule.Valid),
             new SqlParameter("@DELAYTIME",     qcRule.DelayTime),
             new SqlParameter("@SCORE",         qcRule.Sorce),
             new SqlParameter("@QCCODE",        qcRule.QCCode),
         };
         DS_SqlHelper.ExecuteNonQuery(c_SqlInsert, sps, CommandType.Text);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
        /// <summary>
        /// 修改时限规则信息
        /// by xlb 2013-01-07
        /// </summary>
        /// <param name="qcRule"></param>
        public static void UpdateQcRule(QCRule qcRule, QCCondition qcCondition, RuleCategory ruleCategory)
        {
            try
            {
                string c_sqlUpdate = @"update QCRule set conditioncode=@conditioncode,description=@description,reminder=@reminder,"
                                     + "foulmessage=@foculmessage,timelimit=@timelimit,mark=@mark,cycletimes=@cycletimes,"
                                     + "cycleinterval=@cycleinterval,"
                                     + "docotorlevel=@docotorlevel,sortcode=@sortcode,valid=@valid,memo=@memo,"
                                     + "delaytime=@delaytime,score=@score,qccode=@qccode where rulecode=@rulecode";

                SqlParameter[] sps =
                {
                    new SqlParameter("@conditioncode", qcCondition.Code),
                    new SqlParameter("@description",   qcRule.Description),
                    new SqlParameter("@reminder",      qcRule.Reminder),
                    new SqlParameter("@foculmessage",  qcRule.FoulMessage),
                    new SqlParameter("@timelimit",     qcRule.TimeLimit),
                    new SqlParameter("@mark",          (int)qcRule.MARK),
                    new SqlParameter("@cycletimes",    qcRule.CycleTimes),
                    new SqlParameter("@cycleinterval", qcRule.CycleInterval),
                    new SqlParameter("@docotorlevel",  (int)qcRule.DoctorLevel),
                    new SqlParameter("@sortcode",      ruleCategory.Code),
                    new SqlParameter("@valid",         qcRule.Valid),
                    new SqlParameter("@memo",          qcRule.Memo),
                    new SqlParameter("@delaytime",     qcRule.DelayTime),
                    new SqlParameter("@score",         qcRule.Sorce),
                    new SqlParameter("@qccode",        qcRule.QCCode),
                    new SqlParameter("@rulecode",      qcRule.RuleCode)
                };
                DS_SqlHelper.ExecuteNonQuery(c_sqlUpdate, sps, CommandType.Text);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }