private Boolean checkIfProviderSystemExistInNode(LocSvcProviderSysVo voLocSvcProviderSys) { if(voLocSvcProviderSys == null || form.getGlobalContext().OCRR.getProviderSystemColl() == null) return false; else { if(form.getGlobalContext().OCRR.getProviderSystemCollIsNotNull()) { ProviderSystemVoCollection tempColl = form.getGlobalContext().OCRR.getProviderSystemColl(); for(int i = 0; i<tempColl.size();i++ ) { if(voLocSvcProviderSys.getProviderSystem().getID_ProviderSystem().equals(tempColl.get(i).getID_ProviderSystem())) return true; } return false; } else return false; } }
public void replaceInstance() { LocSvcProviderSysVo voLocSvcProviderSys = getSelectedProvider(); if (voLocSvcProviderSys == null) { engine.showMessage("Please select a provider"); return; } form.getGlobalContext().OCRR.setProviderSystem(voLocSvcProviderSys.getProviderSystem()); form.getGlobalContext().OCRR.setProviderSystemFormMode(FormMode.VIEW); engine.open(form.getForms().Admin.ProviderSystem); }
public void updateInstance() { LocSvcProviderSysVo voLocSvcProviderSys = getSelectedProvider(); if (voLocSvcProviderSys == null) { engine.showMessage("Please select a provider"); return; } form.getGlobalContext().OCRR.setProviderSystem(voLocSvcProviderSys.getProviderSystem()); form.getGlobalContext().OCRR.setProviderSystemFormMode(FormMode.EDIT); engine.open(form.getForms().Admin.ProviderSystem); }
/** * @param node */ private void treeViewSelectionChanged(ims.framework.controls.TreeNode node) { clearInstanceControls(); if (node == null) return; Object value = node.getValue(); if (value instanceof LocSvcProviderSysVo) { LocSvcProviderSysVo voLocSvcProviderSys = (LocSvcProviderSysVo) value; populateScreenFromData(voLocSvcProviderSys.getProviderSystem()); populateServiceProviders(node.getParent(), (LocationServiceVo) node.getParent().getValue()); form.getLocalContext().setSelectedRecord((LocSvcProviderSysVo) value); } if (value instanceof LocShortVo) { populateLocationServices(node, (LocShortVo) node.getValue()); if (value instanceof LocSiteVo) { LocSiteVo voLocSite = (LocSiteVo) node.getValue(); populateLocations(voLocSite.getLocations(), node); node.setExpanded(true); } } if (value instanceof LocationServiceVo) { populateServiceProviders(node, (LocationServiceVo) node.getValue()); form.getLocalContext().setSelectedRecord(null); } updateControlsState(); }
private void setSelectedNodeData(LocSvcProviderSysVo voLocSvcProviderSys) { TreeNode node = form.treHeader().getSelectedNode(); if (voLocSvcProviderSys != null && node != null) { Object value = node.getValue(); if (value instanceof LocSvcProviderSysVo) { node.setValue(voLocSvcProviderSys); node.setText(getProviderSystemName(voLocSvcProviderSys)); } } }
private LocSvcProviderSysVo getSelectedProvider() { TreeNode node = form.treHeader().getSelectedNode(); if (node != null) { Object value = node.getValue(); if (value instanceof LocSvcProviderSysVo) return (LocSvcProviderSysVo) value; } return null; }
private void linkTests() { form.getGlobalContext().OCRR.setProvider(form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue()); LocSvcProviderSysVo voLocSvcProvSys = form.lyrInvestigations().tabGeneralDet().cmbProviderService().getValue(); if (voLocSvcProvSys != null && voLocSvcProvSys.getLocationServiceIsNotNull()) form.getGlobalContext().OCRR.setProviderService(voLocSvcProvSys.getLocationService().getService()); form.getGlobalContext().OCRR.setCategory(form.cmbCategory().getValue()); // investigations and profiles from this screen both search through // Investigations form.getGlobalContext().OCRR.setItemSelectionType(ItemSelectionType.INVESTIGATION); populateExistingLinkedTests(); engine.open(form.getForms().OCRR.ItemSelection, "Investigations"); }
protected void onCmbProviderServiceValueChanged() throws PresentationLogicException { LocationLiteVo voLocation = form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue(); if (voLocation == null) return; LocSvcProviderSysVo voProviderSystem = form.lyrInvestigations().tabGeneralDet().cmbProviderService().getValue(); for (int i = 0; i < form.lyrInvestigations().tabProvider().grdHeaders().getRows().size(); i++) { grdHeadersRow row = form.lyrInvestigations().tabProvider().grdHeaders().getRows().get(i); if (row.getValue() != null && row.getValue().getProviderServiceIsNotNull() && row.getValue().getProviderService().getLocationServiceIsNotNull() && row.getValue().getProviderService().getLocationService().getLocationIsNotNull()) { if (voLocation != null && voLocation.equals(row.getValue().getProviderService().getLocationService().getLocation()) && voProviderSystem != null && voProviderSystem.equals(row.getValue().getProviderService()) && row.getValue().getActiveStatusIsNotNull() && row.getValue().getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE)) //wdev-13500 { engine.showMessage("This Provider (" + voLocation.getName() + ") and Service " + "(" + voProviderSystem.getLocationService().getService().getServiceName() + ")" + " has already been set up for this Investigation"); form.lyrInvestigations().tabGeneralDet().cmbProvider().setValue(null); form.lyrInvestigations().tabGeneralDet().cmbProviderService().setValue(null); return; } } } if (form.lyrInvestigations().tabGeneralDet().chkAddOn().getValue() == false) setDetailTabsVisible(form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue() != null && form.lyrInvestigations().tabGeneralDet().cmbProviderService().getValue() != null); form.lyrInvestigations().tabGeneralDet().txtProviderSys().setValue(null); LocSvcProviderSysVo voLocSvcProvSys = form.lyrInvestigations().tabGeneralDet().cmbProviderService().getValue(); if (voLocSvcProvSys != null && voLocSvcProvSys.getProviderSystemIsNotNull() && voLocSvcProvSys.getProviderSystem().getSystemNameIsNotNull()) form.lyrInvestigations().tabGeneralDet().txtProviderSys().setValue(voLocSvcProvSys.getProviderSystem().getSystemName()); }
/** * @param voLocSvcProviderSys * @return */ private String getProviderSystemName(LocSvcProviderSysVo voLocSvcProviderSys) { return voLocSvcProviderSys.getProviderSystemIsNotNull() ? voLocSvcProviderSys.getProviderSystem().getSystemName() : ""; }