/// <summary> /// 获取二进制位表示的用户权限代码 /// </summary> /// <returns>权限代码</returns> public string GetRightCode() { PropertyInfo[] propertyInfos = this.GetType().GetProperties(); if (propertyInfos == null || propertyInfos.Length <= 0) { return(string.Empty); } StringBuilder sbRightCode = new StringBuilder(); for (int index = 0; index < propertyInfos.Length; index++) { PropertyInfo propertyInfo = propertyInfos[index]; if (propertyInfo.PropertyType != typeof(RightInfo)) { continue; } RightInfo rightInfo = propertyInfo.GetValue(this, null) as RightInfo; if (rightInfo == null) { continue; } if (sbRightCode.Length <= rightInfo.Index) { int count = rightInfo.Index + 1 - sbRightCode.Length; sbRightCode.Append(string.Empty.PadRight(count, '0')); } if (rightInfo.Value) { sbRightCode.Replace('0', '1', rightInfo.Index, 1); } } return(sbRightCode.ToString()); }
/// <summary> /// 设置二进制位表示的权限代码 /// </summary> /// <param name="szRightCode">权限代码</param> public void SetRightCode(string szRightCode) { int nLength = 0; if (!string.IsNullOrEmpty(szRightCode)) { nLength = szRightCode.Length; } PropertyInfo[] propertyInfos = this.GetType().GetProperties(); if (propertyInfos == null || propertyInfos.Length <= 0) { return; } for (int index = 0; index < propertyInfos.Length; index++) { PropertyInfo propertyInfo = propertyInfos[index]; if (propertyInfo.PropertyType != typeof(RightInfo)) { continue; } RightInfo rightInfo = propertyInfo.GetValue(this, null) as RightInfo; if (rightInfo == null) { continue; } rightInfo.Value = false;//默认为false if (nLength > rightInfo.Index) { rightInfo.Value = (szRightCode[rightInfo.Index] == '1'); } } }
public UserRight() { this.m_eRightType = UserRightType.MedDoc; //注意:权限索引编号禁止重复,同时禁止修改已存在权限的索引编号 //由于系统不断的升级完善,期间可能会有权限点的增删改,故索引索引可能不连续 this.m_MedDocSystem = new RightInfo("电子病历系统", 0, false, "是否允许使用电子病历系统"); this.m_TempletSystem = new RightInfo("病历模板系统", 2, false, "是否允许使用病历模板系统"); this.m_CreateDocument = new RightInfo("创建病历", 3, false, "是否允许创建新的病历"); this.m_SaveDocument = new RightInfo("保存病历", 4, false, "是否允许保存病历"); this.m_OpenDocument = new RightInfo("浏览病历", 5, false, "是否允许浏览已写的病历"); this.m_EditDocument = new RightInfo("修改病历", 6, false, "是否允许修改已存在的病历"); this.m_PrintDocument = new RightInfo("打印病历", 7, false, "是否允许打印当前病历"); this.m_DeleteDocument = new RightInfo("删除病历", 8, false, "是否允许删除当前病历"); this.m_ExportDocument = new RightInfo("导出病历", 9, false, "是否允许将病历导出为其他格式"); this.m_ArchiveDocument = new RightInfo("归档病历", 10, false, "是否允许将当前就诊下的所有病历归档(是否允许上层调用归档接口)"); this.m_RollbackDocument = new RightInfo("回退病历", 11, false, "是否允许将当前就诊下的所有病历取消归档(是否允许上层调用回退接口)"); this.m_CopyToDocument = new RightInfo("病人间病历拷贝", 12, false, "是否允许将其他病人的病历内容拷贝到当前病人的病历"); this.m_CopyToSmallTemplet = new RightInfo("拷贝到小模板", 13, false, "是否允许将其他任意内容拷贝到小模板等处"); this.m_EditDeptDocument = new RightInfo("修改本科室病历", 14, false, "是否允许修改本科室的所有病历"); this.m_EditAllDocument = new RightInfo("修改全院病历", 15, false, "是否允许修改全院的所有病历"); this.m_EditTemplet = new RightInfo("创建与修改模板", 16, false, "是否允许创建与修改模板"); this.m_EditDeptTemplet = new RightInfo("修改本科室模板", 17, false, "是否允许修改本科室的所有模板(仅模板内容)"); this.m_EditAllTemplet = new RightInfo("修改全院模板", 18, false, "是否允许修改全院的所有模板(仅模板内容)"); this.m_CheckDeptTemplet = new RightInfo("审核本科室模板", 19, false, "是否允许审核本科室所有模板(启用审核时有效)"); this.m_CheckAllTemplet = new RightInfo("审核全院模板", 20, false, "是否允许审核全院所有模板(启用审核时有效)"); this.m_ModifyTempletSettings = new RightInfo("修改模板设置", 21, false, "是否允许修改模板设置(主要指页眉和页面设置)"); this.m_ManageDeptPicture = new RightInfo("管理本科室图库", 22, false, "是否允许添加、修改、删除本科室医学图像库"); this.m_ManageAllPicture = new RightInfo("管理全院图库", 23, false, "是否允许添加、修改、删除全院通用的医学图像库"); this.m_ManageDeptElement = new RightInfo("管理本科室元素库", 24, false, "是否允许添加、修改、删除本科室的元素库"); this.m_ManageAllElement = new RightInfo("管理全院元素库", 25, false, "是否允许添加、修改、删除全院通用的元素库"); this.m_OpenHistoryDocument = new RightInfo("浏览历史病历", 26, false, "是否允许浏览历史病历"); this.m_SearchSystem = new RightInfo("病历检索系统", 27, false, "是否允许使用病历检索系统"); this.m_CopyFormDocument = new RightInfo("从病历中拷贝", 30, true, "是否允许用户将病历内容拷贝出去"); this.m_CommitTemplet = new RightInfo("提交病历模板", 31, false, "是否允许用户提交模板至上级审核"); this.m_ViewQCRPT = new RightInfo("查看质控报告", 32, false, "是否允许查看质控时效等相关报告"); this.m_PasteFromOutSys = new RightInfo("拷贝外部数据", 33, false, "是否允许拷贝外部数据到病历"); }
public QCUserRight() { this.m_eRightType = UserRightType.MedQC; //注意:权限索引编号禁止重复,同时禁止修改已存在权限的索引编号 //由于系统不断的升级完善,期间可能会有权限点的增删改,故索引索引可能不连续 this.m_MedQCSystem = new RightInfo("病案质控系统", 0, false, "是否允许使用病案质控系统"); this.m_BrowsePatientInfo = new RightInfo("查看患者信息", 1, false, "是否允许查看患者信息"); this.m_BrowseDocumentList = new RightInfo("查看病程记录", 2, false, "是否允许查看患者病程记录"); this.m_BrowseDocumentTime = new RightInfo("查看病历时效", 3, false, "是否允许查看病历时效"); this.m_BrowseOrdersList = new RightInfo("查看医嘱记录", 4, false, "是否允许查看患者医嘱记录"); this.m_BrowseExamList = new RightInfo("查看检查记录", 5, false, "是否允许查看患者检查记录"); this.m_PrintExamList = new RightInfo("打印检查记录", 6, false, "是否允许打印患者检查记录"); this.m_BrowseLabTestList = new RightInfo("查看检验记录", 7, false, "是否允许查看患者检验记录"); this.m_PrintLabTestList = new RightInfo("打印检验记录", 8, false, "是否允许打印患者检验记录"); this.m_BrowseDiagnosisList = new RightInfo("查看诊断记录", 9, false, "是否允许查看患者诊断记录"); this.m_BrowseMRScore = new RightInfo("查看病案评分", 10, false, "是否允许查看病人的病案评分"); this.m_BrowseQCQuestion = new RightInfo("查看质控问题", 11, false, "是否允许查看质控反馈问题"); this.m_CommitQCQuestion = new RightInfo("提交质控问题", 12, false, "是否允许提交质控反馈问题"); this.m_BrowseQCQuestionType = new RightInfo("查看质控问题类型", 13, false, "是否允许查看质控问题类型"); this.m_ManageQCQuestionType = new RightInfo("维护质控问题类型", 14, false, "是否允许维护质控问题类型"); this.m_BrowseQCQuestionTemplet = new RightInfo("查看质控问题模板", 15, false, "是否允许查看质控问题模板"); this.m_ManageQCQuestionTemplet = new RightInfo("维护质控问题模板", 16, false, "是否允许维护质控问题模板"); this.m_ManageDeptQC = new RightInfo("科级病案质控", 17, false, "是否开启科级病案质控"); this.m_ManageAllQC = new RightInfo("院级病案质控", 18, false, "是否开启院级病案质控"); this.m_BrowseQCStatistics = new RightInfo("查询统计功能", 19, false, "是否允许使用查询统计功能"); this.m_ManageRollbackSubmitDoc = new RightInfo("回退已提交病历", 20, false, "是否允许使用回退已提交病历功能"); this.m_BrowsUnCheckTempletList = new RightInfo("查看待审核模板", 21, false, "是否允许查看待审核模板"); this.m_EditAbleDoc = new RightInfo("修改病历内容", 22, false, "是否允许修改病历内容"); this.m_BrowseNurDocList = new RightInfo("护理质控", 23, false, "是否允许进行护理质控"); this.m_SecretDeptList = new RightInfo("查看受保密控制科室的病历", 24, false, "是否允许查看受保密控制科室的病历"); this.m_DeleteConfirmMsg = new RightInfo("删除已被医生确认的质检信息", 25, false, "是否允许删除已被医生确认的质检信息"); this.m_IsSpecialDoc = new RightInfo("质控专家", 26, false, "是否是质控专家"); this.m_ManageAdminDeptsQC = new RightInfo("管辖科室病案质控", 27, false, "是否开启管辖科室病案质控"); this.m_BrowsChecker = new RightInfo("查看检查者", 28, false, "是否有权限查看检查者"); this.m_UseDocModifyApply = new RightInfo("病历修改申请审核", 29, false, "是否有权限使用病历修改审核"); this.m_BrowsTemperatureChart = new RightInfo("查看体温单", 30, false, "是否有权限查看体温单"); this.m_BrowsNursingRecord = new RightInfo("查看护理记录", 31, false, "是否有权限查看护理记录"); this.m_DeleteQCQutionNoLimit = new RightInfo("无条件删除质检信息", 32, false, "是否有权限无条件删除质检信息"); this.m_IsQCDeptUser = new RightInfo("质控科人员", 33, false, "是否属于质控科人员"); }