private void loadFormMenuActions(TreeNode node) { if(node.getValue() instanceof IAppForm && node.getNodes().size() == 1 && node.getNodes().get(0).getValue() == null) { node.getNodes().clear(); MenuActionVoCollection actions = domain.getMenuActions((IAppForm)node.getValue()); if(actions != null && actions.size() > 0) { for (MenuActionVo action : actions) { addMenuAction(node, action); } } else { node.setCheckBoxVisible(false); } } }
private void addMenuAction(AppFormVo appForm, MenuActionVo vo) { TreeNode treeNode = findOrCreateMenuActionFormNode(appForm); boolean exists = false; for(int x = 0; x < treeNode.getNodes().size(); x++) { if(vo.equals(treeNode.getNodes().get(x).getValue())) { exists = true; break; } } if(!exists) { TreeNode actionNode = treeNode.getNodes().add(vo, vo.getMenuActionDescription()); actionNode.setCollapsedImage(form.getImages().Core.AnswerBox_NotAvailable); actionNode.setExpandedImage(form.getImages().Core.AnswerBox_NotAvailable); } }
private InpatientEpisodeMaintenanceActions getMappedAction(MenuActionVo menuAction) { if(menuAction == null || menuAction.getID_MenuAction() == null) return null; if(RIE_EPISODE == menuAction.getID_MenuAction()) return InpatientEpisodeMaintenanceActions.RIE; else if(CANCEL_DISCHARGE == menuAction.getID_MenuAction()) //WDEV-22925 return InpatientEpisodeMaintenanceActions.CANCEL_DISCHARGE; else if(RIE_WARD_STAY == menuAction.getID_MenuAction())////WDEV-22958 return InpatientEpisodeMaintenanceActions.RIE_WARD_STAY; else if(RIE_CONSULTANT_STAY == menuAction.getID_MenuAction()) return InpatientEpisodeMaintenanceActions.RIE_CONSULTANT_STAY;//WDEV-22958 end //WDEV-22958 end return null; }
private ArrayList<Integer> getDeniedActionForCurrentUser(IAppRole role, Integer formID) { if(role == null || formID == null) return null; ArrayList<Integer> deniedActionsList = new ArrayList<Integer>(); AppFormForPrescriptionVo currentForm = domain.getAppFormWithMenuActions(formID); for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction) && (menuAction.getID_MenuAction().equals(PRINT_PRESCRIPTION_ACTION) || menuAction.getID_MenuAction().equals(REPRINT_PRESCRIPTION_ACTION))); { deniedActionsList.add(menuAction.getID_MenuAction()); } } return deniedActionsList; }
private AppFormMenuActionsVoCollection getSelection() { AppFormMenuActionsVoCollection result = new AppFormMenuActionsVoCollection(); for(int x = 0; x < form.treFormActions().getNodes().size(); x++) { TreeNode node = form.treFormActions().getNodes().get(x); if(node.getValue() instanceof IAppForm) { MenuActionVoCollection checkedActions = new MenuActionVoCollection(); for(int y = 0; y < node.getNodes().size(); y++) { TreeNode childNode = node.getNodes().get(y); if(childNode.isChecked() && childNode.getValue() instanceof MenuActionVo) { checkedActions.add((MenuActionVo)childNode.getValue()); } } if(checkedActions.size() > 0) { AppFormMenuActionsVo item = new AppFormMenuActionsVo(); item.setID_AppForm(((IAppForm)node.getValue()).getFormId()); item.setMenuActions(checkedActions); result.add(item); } } } return result; }
private FormMenuActionsDeniedVoCollection getActionsDenied() { FormMenuActionsDeniedVoCollection result = new FormMenuActionsDeniedVoCollection(); for(int x = 0; x < form.lyrRights().tabActionsDenied().treActions().getNodes().size(); x++) { TreeNode formNode = form.lyrRights().tabActionsDenied().treActions().getNodes().get(x); AppFormVo formValue = (AppFormVo)formNode.getValue(); MenuActionVoCollection actions = new MenuActionVoCollection(); for(int y = 0; y < formNode.getNodes().size(); y++) { TreeNode itemNode = formNode.getNodes().get(y); if(itemNode.getValue() != null) { actions.add((MenuActionVo)itemNode.getValue()); } } if(actions.size() > 0) { FormMenuActionsDeniedVo item = new FormMenuActionsDeniedVo(); item.setForm(formValue); item.setMenuActions(actions); result.add(item); } } return result; }
private MenuActionVoCollection getDeniedActionForCurrentUser() { MenuActionVoCollection deniedActions = new MenuActionVoCollection(); AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if(currentForm == null) return null; IAppRole role = engine.getLoggedInRole(); if(role == null) return null; for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction)) { deniedActions.add(menuAction); } } return deniedActions; }
private List<PatientCaseNoteFolderActions> listDeniedActionForCurrentUser() { List<PatientCaseNoteFolderActions> deniedActions = new ArrayList<PatientCaseNoteFolderActions>(); AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if(currentForm == null) return null; IAppRole role = engine.getLoggedInRole(); if(role == null) return null; for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction)) { PatientCaseNoteFolderActions mappedAction = getMappedAction(menuAction); if(mappedAction != null) { deniedActions.add(mappedAction); } } } return deniedActions; }
private List<InpatientEpisodeMaintenanceActions> listDeniedActionForCurrentUser() { List<InpatientEpisodeMaintenanceActions> deniedActions = new ArrayList<InpatientEpisodeMaintenanceActions>(); AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if(currentForm == null) return null; IAppRole role = engine.getLoggedInRole(); if(role == null) return null; for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction)) { InpatientEpisodeMaintenanceActions mappedAction = getMappedAction(menuAction); if(mappedAction != null) { deniedActions.add(mappedAction); } } } return deniedActions; }
public List<InternalReferralStatusAction> listDeniedActionForCurrentUser(IAppRole role) { List<InternalReferralStatusAction> deniedActions = new ArrayList<InternalReferralStatusAction>(); if(appForm == null) return null; if(role == null) return null; for(MenuActionVo menuAction : appForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(appForm, menuAction)) { InternalReferralStatusAction mappedAction = getMappedAction(menuAction); if(mappedAction != null) { deniedActions.add(mappedAction); } } } return deniedActions.size() > 0 ? deniedActions : null; }
private InternalReferralStatusAction getMappedAction(MenuActionVo menuAction) { if(menuAction == null || menuAction.getID_MenuAction() == null) return null; if(VIEW_REFERRAL == menuAction.getID_MenuAction()) return InternalReferralStatusAction.EDIT; else if(EDIT_REFERRAL == menuAction.getID_MenuAction()) return InternalReferralStatusAction.EDIT; else if(REQUIRES_FURTHER_INFORMATION == menuAction.getID_MenuAction()) return InternalReferralStatusAction.REQUIRES_FURTHER_INFORMATION; else if(SECOND_OPINION_REQUIRED == menuAction.getID_MenuAction()) return InternalReferralStatusAction.SECOND_OPINION_REQUIRED; else if(RECORD_FURTHER_INFORMATION == menuAction.getID_MenuAction()) return InternalReferralStatusAction.RECORD_FURTHER_INFORMATION; else if(ACCEPT_REFERRAL == menuAction.getID_MenuAction()) return InternalReferralStatusAction.ACCEPT; else if(ACCEPT_APPOINTMENT_REQUIRED == menuAction.getID_MenuAction()) return InternalReferralStatusAction.ACCEPT_APPOINTMENT_REQUIRED; else if(APPOINTMENT_BOOKED == menuAction.getID_MenuAction()) return InternalReferralStatusAction.APPOINTMENT_BOOKED; else if(SIGN_OFF == menuAction.getID_MenuAction()) return InternalReferralStatusAction.SIGN_OFF; else if(REJECT == menuAction.getID_MenuAction()) return InternalReferralStatusAction.REJECT; else if(RIE == menuAction.getID_MenuAction()) return InternalReferralStatusAction.RIE; //wdev-20637 else if(NEW_REFERRAL == menuAction.getID_MenuAction()) return InternalReferralStatusAction.EDIT; else if(REJECT_ACKNOWLEDGED == menuAction.getID_MenuAction()) return InternalReferralStatusAction.REJECT_ACKNOWLEDGED; else if(COMPLETE_ADD_NOTE == menuAction.getID_MenuAction()) return InternalReferralStatusAction.COMPLETE_ADD_NOTE; else if(INTERNAL_REFERRAL_ADMIN_EVENT == menuAction.getID_MenuAction()) return InternalReferralStatusAction.COMPLETE_LINK_CORRESPONDENCE; else if(COMPLETE_LINK_CORRESPONDENCE == menuAction.getID_MenuAction()) return InternalReferralStatusAction.COMPLETE_LINK_CORRESPONDENCE; return null; }
private List<AppointmentOutcomeDialogUserAction> getDeniedActionsForCurrentUser() { IAppRole role = engine.getLoggedInRole(); if (role == null) return null; AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if (currentForm == null || currentForm.getMenuActions() == null) return null; List<AppointmentOutcomeDialogUserAction> deniedActions = new ArrayList<AppointmentOutcomeDialogUserAction>(); for (MenuActionVo menuAction : currentForm.getMenuActions()) { if (menuAction == null) continue; if (!role.hasMenuActionRight(currentForm, menuAction)) { AppointmentOutcomeDialogUserAction mappedAction = getMappedAction(menuAction); if (mappedAction != null) { deniedActions.add(mappedAction); } } } return deniedActions; }
private AppointmentOutcomeDialogUserAction getMappedAction(MenuActionVo menuAction) { if (menuAction == null || menuAction.getID_MenuAction() == null) return null; if (RIE_OUTCOME_ACTIONS == menuAction.getID_MenuAction()) return AppointmentOutcomeDialogUserAction.RIE_OUTCOME_ACTIONS; if (UNDO_OUTOMCE_RETAIN_ACTION == menuAction.getID_MenuAction()) return AppointmentOutcomeDialogUserAction.UNDO_OUTCOME_RETAIN_ACTIONS; return null; }
private List<TCIHistoryActions> listDeniedActionForCurrentUser() { List<TCIHistoryActions> deniedActions = new ArrayList<TCIHistoryActions>(); AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if(currentForm == null) return null; IAppRole role = engine.getLoggedInRole(); if(role == null) return null; for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction)) { TCIHistoryActions mappedAction = getMappedAction(menuAction); if(mappedAction != null) { deniedActions.add(mappedAction); } } } return deniedActions; }
private TCIHistoryActions getMappedAction(MenuActionVo menuAction) { if(menuAction == null || menuAction.getID_MenuAction() == null) return null; if(EDIT_TCI_CANCELLATION == menuAction.getID_MenuAction()) return TCIHistoryActions.EDIT_CANCELLATION_DETAILS; return null; }
private void addMenuAction(TreeNode node, MenuActionVo action) { TreeNode actionNode = node.getNodes().add(action, action.getMenuActionDescription()); actionNode.setExpandedImage(form.getImages().Emergency.TransferEnabled16); actionNode.setCollapsedImage(form.getImages().Emergency.TransferEnabled16); }
private PatientCaseNoteFolderActions getMappedAction(MenuActionVo menuAction) { if(menuAction == null || menuAction.getID_MenuAction() == null) return null; if(NEW_PERMANENT == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.NEW_PERMANENT; else if(NEW_TEMPORARY == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.NEW_TEMPORARY; else if(CHANGE_FROM_TEMPORARY_TOPERMANENT == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.CHANGE_FROM_TEMPORARY_TO_PERMANENT; else if(REQUIRES_MERGING == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.REQUIRES_MERGING; else if(MARK_AS_FOUND == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.MARKED_AS_FOUND; else if(MARK_AS_MISSING == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.MARK_AS_MISSING; else if(EDIT_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.EDIT_FOLDER; else if(ARCHIVE_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.ARCHIVE_FOLDER; else if(SCAN_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.SCAN_FOLDER; else if(DESTROY_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.DESTROY_FOLDER; else if(TRANSFER_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.TRANSFER_FOLDER; else if(ADD_COMMENT_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.ADD_FOLDER_COMMENT; else if(MERGE_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.MERGE; else if(NEW_REQUEST == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.NEW_REQUEST; else if(EDIT_REQUEST == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.EDIT_REQUEST; else if(CANCEL_REQUEST == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.CANCEL_REQUEST; else if(COMPLETE_REQUEST == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.COMPLETED_TRANSFER; else if(PRINT_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.PRINT_FOLDER; else if(CREATE_CASE_NOTE_FOLDER == menuAction.getID_MenuAction()) return PatientCaseNoteFolderActions.CREATECASENOTEFOLDER; return null; }
private void updateControlsState() { if(form.getLocalContext().getFormMode() == null) { form.lyrTriage().tabPageTriageAccepted().ccAccepted().setMode(FormMode.EDIT); } /*if(form.lyrTriage().tabPageTriage().isVisible())//WDEV-21994 { Boolean isReferralCAB = form.getLocalContext().getCurrentCatsReferralIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getCurrentCatsReferral().getIsCAB()); form.lyrTriage().tabPageTriage().btnRedirect().setVisible(!isReferralCAB);//WDEV-21994 }*/ boolean isSaveVisible = form.lyrTriage().tabPageTriageAccepted().isVisible() || form.lyrTriage().tabPageTriagePendingDiagnosticResult().isVisible() || form.lyrTriage().tabPageRedirectReferral().isVisible() || form.lyrTriage().tabPageReferralRejected().isVisible() || form.lyrTriage().tabPageAwaitingClinicalInformation().isVisible() || form.lyrTriage().tabPageSecondOpinion().isVisible(); form.btnSaveReturnToList().setVisible(isSaveVisible && (form.getLocalContext().getFormMode() == null)); form.btnSaveTriageNextPatient().setVisible(isSaveVisible && (form.getLocalContext().getFormMode() == null)); form.btnCancelNextPatient().setVisible(form.getLocalContext().getFormMode() == null); form.btnCancelReturnToWorklist().setVisible(form.getLocalContext().getFormMode() == null); boolean viewMode = FormMode.VIEW.equals(form.getLocalContext().getFormMode()); if(viewMode) { form.lyrTriage().tabPageTriagePendingDiagnosticResult().txtPendingComment().setEnabled(false); } form.btnClose().setVisible(viewMode); //WDEV-20711 Boolean isReferralCAB = form.getLocalContext().getCurrentCatsReferralIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getCurrentCatsReferral().getIsCAB()); form.lyrTriage().tabPageRedirectReferral().GroupRedirect().setVisible(GroupRedirectEnumeration.rdoRedirectToHcp, !isReferralCAB); boolean showRedirectToHcpControls = GroupRedirectEnumeration.rdoRedirectToHcp.equals(form.lyrTriage().tabPageRedirectReferral().GroupRedirect().getValue()); form.lyrTriage().tabPageRedirectReferral().lblRedirectToHcp().setVisible(showRedirectToHcpControls); form.lyrTriage().tabPageRedirectReferral().qmbRedirectedHcp().setVisible(showRedirectToHcpControls); form.lyrTriage().tabPageRedirectReferral().GroupRedirect().setEnabled(!viewMode); form.lyrTriage().tabPageRedirectReferral().cmbRedirectedService().setEnabled(!showRedirectToHcpControls && !viewMode); form.lyrTriage().tabPageRedirectReferral().qmbRedirectedHcp().setEnabled(!viewMode); form.lyrTriage().tabPageRedirectReferral().cmbReason().setEnabled(!viewMode); form.lyrTriage().tabPageRedirectReferral().txtCommentsBig().setEnabled(!viewMode); form.lyrTriage().tabPageReferralRejected().cmbReasonForRejection().setEnabled(!viewMode); form.lyrTriage().tabPageReferralRejected().txtRejectedComments().setEnabled(!viewMode); form.lyrTriage().tabPageReferralRejected().GroupGPContacted().setEnabled(!viewMode); form.lyrTriage().tabPageReferralRejected().GroupPatientContacted().setEnabled(!viewMode); form.lyrTriage().tabPageAwaitingClinicalInformation().txtAwaitingClinicalComment().setEnabled(!viewMode); MenuActionVoCollection deniedActions = form.getLocalContext().getDeniedMenuActions(); boolean isUndoTriageOutcomeVisible = true; for (int i = 0; deniedActions != null && i < deniedActions.size(); i++) { MenuActionVo action = deniedActions.get(i); if (action == null) continue; if (UNDO_TRIAGE_OUTCOME == action.getID_MenuAction()) { isUndoTriageOutcomeVisible = false; } } form.lyrTriage().tabPageSecondOpinion().btnSecondOpinion().setEnabled(!viewMode); form.btnUndoTriageOutcome().setVisible(isUndoTriageOutcomeVisible && form.getLocalContext().getCurrentCatsReferral() != null && form.getLocalContext().getCurrentCatsReferral().getTriageOutcome() != null); //WDEV-22464 form.btnViewReferralDocuments().setVisible(form.getLocalContext().getCurrentCatsReferralIsNotNull() && form.getLocalContext().getCurrentCatsReferral().getReferralDocumentsIsNotNull() && form.getLocalContext().getCurrentCatsReferral().getReferralDocuments().size()>1); // start WDEV-23328 form.lyrTriage().tabPageTriage().btnAccept().setVisible(engine.hasRight(AppRight.REFERRAL_TRIAGE_ACTION_CAN_ACCEPT)); form.lyrTriage().tabPageTriage().btnRedirect().setVisible(engine.hasRight(AppRight.REFERRAL_TRIAGE_ACTION_CAN_REDIRECT)); form.lyrTriage().tabPageTriage().btnReject().setVisible(engine.hasRight(AppRight.REFERRAL_TRIAGE_ACTION_CAN_REJECT)); // end WDEV-23328 }
private void listDeniedActionForCurrentUser() { AppFormForTrackingVo currentForm = domain.getFormMenuAction(engine.getFormName().getID()); if(currentForm == null) return; IAppRole role = engine.getLoggedInRole(); if(role == null) return; for(MenuActionVo menuAction : currentForm.getMenuActions()) { if(menuAction == null) continue; if(!role.hasMenuActionRight(currentForm, menuAction)) { showHidebuttons(menuAction.getID_MenuAction()); } } }