Exemplo n.º 1
0
        public void ResetEditMode(EmrModel model)
        {
            IEmrModelPermision modelPermision;
            bool b;

            DrectSoft.Common.Eop.Employee empl = new DrectSoft.Common.Eop.Employee(m_app.User.Id);

            modelPermision = ModelPermisionFactroy.Create(ModelPermisionType.Audit, empl);
            b = modelPermision.CanDo(model);
            if (b) // 文件已提交,处于审核模式
            {
                // 审核——已提交(未归档),符合级别要求

                //m_ActionAuditAll.Enabled = b;
            }
            else
            {
                //是否可以编辑
                modelPermision = ModelPermisionFactroy.Create(ModelPermisionType.Edit, empl);
                b = modelPermision.CanDo(model);
                //保存按钮状态
                //
                // 提交——新增状态,未归档,本人创建
                modelPermision = ModelPermisionFactroy.Create(ModelPermisionType.Submit, empl);
                b = modelPermision.CanDo(model);

                // 删除——新增状态,未归档,本人创建
                modelPermision = ModelPermisionFactroy.Create(ModelPermisionType.Delete, empl);
                b = modelPermision.CanDo(model);
            }
        }
Exemplo n.º 2
0
        private void ResetEditMode(EmrModel model)
        {
            bool isModified = zyEditorControl1.EMRDoc.Modified;

            //zyEditorControl1.SetTitle("南京市中西医结合医院");
            zyEditorControl1.SetTitle(m_Util.m_app.CurrentHospitalInfo.Name);
            //zyEditorControl1.SetSubTitle(m_Util.m_app.CurrentHospitalInfo.Subname);
            if (m_ActualPageSetting != null)
            {
                zyEditorControl1.EMRDoc.Pages.PageSettings = m_ActualPageSetting;
            }
            else
            {
                zyEditorControl1.EMRDoc.Pages.PageSettings = m_DefaultPageSetting;
            }

            //Add By wwj 2012-02-16 设置页眉页脚高度
            zyEditorControl1.EMRDoc.DocumentHeaderHeight = m_DefaultPageSetting.HeaderHeight;
            zyEditorControl1.EMRDoc.DocumentFooterHeight = m_DefaultPageSetting.FooterHeight;

            zyEditorControl1.SetLineSpace(s_LineSpace);
            zyEditorControl1.EMRDoc.Modified = isModified;
            zyEditorControl1.EMRDoc.RefreshLine();
            zyEditorControl1.EMRDoc.RefreshPages();
            zyEditorControl1.EMRDoc.OwnerControl.UpdatePages();
            zyEditorControl1.EMRDoc.Refresh();


            zyEditorControl1.EMRDoc.Info.LogicDelete     = true;
            zyEditorControl1.EMRDoc.Info.AutoLogicDelete = true;
            zyEditorControl1.EMRDoc.Info.DocumentModel   = DocumentModel.Edit;
            IEmrModelPermision modelPermision;
            bool b;

            DrectSoft.Common.Eop.Employee empl = new DrectSoft.Common.Eop.Employee(m_Util.m_app.User.Id);
            empl.ReInitializeProperties();
            modelPermision = ModelPermisionFactroy.Create(ModelPermisionType.Audit, empl);
            b = modelPermision.CanDo(model);
            if (b) // 文件已提交,处于审核模式
            {
                // 审核——已提交(未归档),符合级别要求
                //记录修改痕迹
                zyEditorControl1.EMRDoc.Info.DocumentModel   = DocumentModel.Edit;
                zyEditorControl1.EMRDoc.Info.LogicDelete     = true;
                zyEditorControl1.EMRDoc.Info.AutoLogicDelete = true;
                zyEditorControl1.EMRDoc.Info.ShowMark        = true;
                zyEditorControl1.EMRDoc.Info.ShowAll         = true;
                zyEditorControl1.EMRDoc.Info.ShowMark        = true;
                //zyEditorControl1.InsertMode = false;//记录修改痕迹
                zyEditorControl1.EMRDoc.SaveLogs.CurrentSaveLog.UserName = m_Util.m_app.User.Name; //这里传入用户名
                //todo 针对性设置修改痕迹
                if (empl.DoctorGradeNumber == 0)                                                   //住院医生
                {
                    zyEditorControl1.EMRDoc.SaveLogs.CurrentSaveLog.Level = 0;                     //这里传入用户级别
                    zyEditorControl1.EMRDoc.Content.UserLevel             = 1;                     //这里还是同样的用户级别
                    //editorfrm.pnlText.Refresh();
                }
                else if (empl.DoctorGradeNumber == 1)                          //主治医生
                {
                    zyEditorControl1.EMRDoc.SaveLogs.CurrentSaveLog.Level = 1; //这里传入用户级别
                    zyEditorControl1.EMRDoc.Content.UserLevel             = 2; //这里还是同样的用户级别
                }
                else if (empl.DoctorGradeNumber > 1)                           //主任医师
                {
                    zyEditorControl1.EMRDoc.SaveLogs.CurrentSaveLog.Level = 2; //这里传入用户级别
                    zyEditorControl1.EMRDoc.Content.UserLevel             = 9; //这里还是同样的用户级别
                }

                //m_ActionAuditAll.Enabled = b;
            }
            else
            {
            }
        }