コード例 #1
0
        private void LoadForm()
        {
            //manger = new IemMainPageManger(m_Host);
            //info = manger.GetIemInfo();
            DeleteMetaFile();
            util = new DrawMainPageUtil(info);

            pictureBox1.Width  = GetPageWidth();
            pictureBox1.Height = GetPageHeight();
            pictureBox2.Width  = GetPageWidth();
            pictureBox2.Height = GetPageHeight();

            pictureBox1.BackgroundImage = util.MF1;
            pictureBox2.BackgroundImage = util.MF2;

            pictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
            pictureBox2.BackgroundImageLayout = ImageLayout.Stretch;

            ReLocationPicture();
            BindParentFormCloseEvent();

            if (this.Parent != null)
            {
                if (this.Parent.AccessibleName != null &&
                    this.Parent.AccessibleName.Trim() != "")  //父窗体的AccessibleName不为空则表示没有编辑的权限
                {
                    simpleButton1.Visible = false;
                    simpleButton2.Visible = false;
                    simpleButton3.Visible = false;
                    simpleButton4.Visible = false;
                    simpleButton5.Visible = false;
                    simpleButton6.Visible = false;
                }
            }

            Employee emp = new Employee(m_Host.User.Id);

            emp.ReInitializeProperties();
            DataHelper help    = new DataHelper();
            string     hoscode = help.GetConfigValueByKey("HosCode");

            if (hoscode == "1")
            {
                string static_save = help.GetStatic_SaveValue(info.IemBasicInfo.NoOfInpat);
                if (static_save == "1")
                {
                    simpleButton1.Enabled = false;
                    simpleButton2.Enabled = false;
                    simpleButton3.Enabled = false;
                    simpleButton4.Enabled = false;
                    simpleButton5.Enabled = false;
                    simpleButton6.Enabled = false;
                }
            }
            if (emp.Grade.Trim() != "")
            {
                DoctorGrade grade = (DoctorGrade)Enum.Parse(typeof(DoctorGrade), emp.Grade);
                if (grade == DoctorGrade.Nurse)
                {
                    simpleButton3.Enabled = false;
                    simpleButton4.Enabled = false;
                    simpleButton5.Enabled = false;
                    simpleButton6.Enabled = false;
                }
            }
            else
            {
                simpleButton1.Enabled = false;
                simpleButton2.Enabled = false;
                simpleButton3.Enabled = false;
                simpleButton4.Enabled = false;
                simpleButton5.Enabled = false;
                simpleButton6.Enabled = false;
            }
        }
コード例 #2
0
 public DoctorGrade Save(DoctorGrade entity)
 {
     return(_doctorGradeRepository.Save(entity));
 }
コード例 #3
0
 public void Edit(DoctorGrade entity)
 {
     _doctorGradeRepository.Edit(entity);
 }
コード例 #4
0
 public void Delete(DoctorGrade entity)
 {
     _doctorGradeRepository.Delete(entity);
 }
コード例 #5
0
ファイル: UCWaitApprove.cs プロジェクト: xuanximoming/key
        /// <summary>
        /// 查询方法
        /// edit by Yanqiao.Cai 2012-11-05
        /// add try ... catch
        /// </summary>
        private void Search()
        {
            try
            {
                /* modify by wwj 2013-02-27
                 * string consultTimeBegin = dateEditConsultDateBegin.Text;
                 * string consultTimeEnd = dateEditConsultDateEnd.Text;
                 * string consultType = "";
                 * string urgency = lookUpEditorUrgency.CodeValue;
                 * string name = textEditName.Text;
                 * string patientSN = textEditPatientSN.Text;
                 *
                 * DataTable dt = Dal.DataAccess.GetConsultationData("21", consultTimeBegin, consultTimeEnd, consultType, urgency, name, patientSN, "", m_App.User.CurrentDeptId);
                 * //gridControlWaitApprove.DataSource = dt;
                 *
                 * //审核人能看到 未审核
                 * //取得审核人
                 * Employee emp = new Employee(m_App.User.Id);
                 * emp.ReInitializeProperties();
                 * DoctorGrade grade = (DoctorGrade)Enum.Parse(typeof(DoctorGrade), emp.Grade);
                 * AuditLogic audiLogic = new AuditLogic(m_App, m_App.User.Id);
                 *
                 * DataTable DtFilter = dt.Clone();
                 *
                 * if (audiLogic.CanAudioConsult(m_App.User.Id, emp))
                 * {
                 *  //if (m_App.User.Id == fuzenid)
                 *  //{
                 *  DataRow[] Lookrow = dt.Select(string.Format("  audituserid='{0}'", m_App.User.Id));
                 *  for (int i = 0; i < Lookrow.Length; i++)
                 *  {
                 *      DtFilter.ImportRow(Lookrow[i]);
                 *  }
                 *  this.gridControlWaitApprove.DataSource = DtFilter;
                 *  //}
                 * }
                 * //只有主任和副主任能看到待审核清单
                 * //string fuzenid = audiLogic.GetUser(m_App.User.Id);
                 * //if (!string.IsNullOrEmpty(fuzenid))//存在设置好的审核人
                 * //{
                 *
                 * //}
                 * else//返回为空,表明要取主任医师
                 * {
                 *  //主任医师,副主任医师
                 *  if (grade == DoctorGrade.Chief && grade == DoctorGrade.AssociateChief)
                 *  {
                 *      DataRow[] Lookrow = dt.Select(string.Format(" audituserid='{0}'", m_App.User.Id));
                 *      for (int i = 0; i < Lookrow.Length; i++)
                 *      {
                 *          DtFilter.ImportRow(Lookrow[i]);
                 *      }
                 *      this.gridControlWaitApprove.DataSource = DtFilter;
                 *  }
                 * }
                 */

                DateTime consultTimeBegin = dateEditConsultDateBegin.DateTime;
                DateTime consultTimeEnd   = dateEditConsultDateEnd.DateTime;
                string   urgency          = lookUpEditorUrgency.CodeValue;
                string   name             = textEditName.Text;
                string   patientSN        = textEditPatientSN.Text;

                //只有审核人能看到未审核的会诊申请记录
                Employee emp = new Employee(m_App.User.Id);
                emp.ReInitializeProperties();
                DoctorGrade grade = (DoctorGrade)Enum.Parse(typeof(DoctorGrade), emp.Grade);

                //获取当前登录人待审核的所有会诊申请单 Add By wwj 2013-02-27
                DataTable dt = Dal.DataAccess.GetUnAuditConsult(
                    consultTimeBegin, consultTimeEnd,
                    name, patientSN, urgency, m_App.User.Id, emp.Grade);

                this.gridControlWaitApprove.DataSource = dt;
                m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewWaitApprove);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #6
0
ファイル: EmrModelPermision.cs プロジェクト: xuanximoming/key
        private bool CanEditCore(EmrModel model, out string msg)
        {
            bool result = false;

            msg = string.Empty;
            if (_readOnlyMode)
            {
                return(false);
            }
            int grade = _employee.DoctorGradeNumber;

            if (grade == -1)
            {
                //msg = "您无修改病历权限。";
                //return false;
            }
            // Check State

            if (_employee.Grade.Trim() == "")
            {
                return(false);
            }
            DoctorGrade gradeEnum = (DoctorGrade)Enum.Parse(typeof(DoctorGrade), _employee.Grade);

            if (gradeEnum == DoctorGrade.Nurse)
            {
                //护理文档 AJ、护理记录 AI、手术护理记录 AK
                if (model.ModelCatalog == "AJ" || model.ModelCatalog == "AI" || model.ModelCatalog == "AK")
                {
                    return(true);
                }
            }

            if (gradeEnum == DoctorGrade.None)
            {
                return(false);
            }

            switch (model.State)
            {
            case ExamineState.Deleted:
                result = model.CreatorXH == _employee.Code;
                if (!result)
                {
                    if (_employee.DoctorGradeNumber <= 0)
                    {
                        msg = "您无修改此病历文件的权限。";
                    }
                    else
                    {
                        msg = "此病历文件已删除。";
                    }
                }
                break;

            case ExamineState.NotSubmit:
                result = model.CreatorXH == _employee.Code;
                if (!result)
                {
                    if (_employee.DoctorGradeNumber <= 0)
                    {
                        msg = "您无修改此病历文件的权限。";
                    }
                    else
                    {
                        msg = "此病历文件未提交。";
                    }
                }
                break;

            case ExamineState.SubmitButNotExamine:
                result = (_employee.DoctorGradeNumber == 0);
                if (!result)
                {
                    if (model.CreatorXH == _employee.Code)
                    {
                        msg = "此病历文件已提交。";
                    }
                    else
                    {
                        msg = "您无修改此病历文件的权限。";
                    }
                }
                break;

            case ExamineState.FirstExamine:

                result = (_employee.DoctorGradeNumber > 0);
                if (!result)
                {
                    if (model.CreatorXH == _employee.Code)
                    {
                        msg = "此病历文件已提交。";
                    }
                    else
                    {
                        msg = "您无修改此病历文件的权限。";
                    }
                }
                break;

            case ExamineState.SecondExamine:
            default:
                result = (_employee.DoctorGradeNumber > 1);
                if (!result)
                {
                    msg = "您无修改此病历文件的权限。";
                }
                break;
            }
            return(result);
        }