private void populateItemsAlreadySelected() { InvestShortVoCollection investigations = new InvestShortVoCollection(); InvestShortVoCollection profiles = new InvestShortVoCollection(); for(int x = 0; x < form.grdComponents().getRows().size(); x++) { OrderSetComponentEditVo item = form.grdComponents().getRows().get(x).getValue(); if(item != null) { if(item.getInvestigationIsNotNull() && item.getInvestigation().getInvestigationIndexIsNotNull()) { if(item.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull() && item.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue()) profiles.add(item.getInvestigation()); else investigations.add(item.getInvestigation()); } } } form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations); form.getGlobalContext().OCRR.setPreselectedProfiles(profiles); }
private void populateExistingLinkedTests() { InvestShortVoCollection investigations = new InvestShortVoCollection(); for (int x = 0; x < form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().size(); x++) { InvestShortVo item = form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().get(x).getValue(); if (item != null) { if (item.getInvestigationIndexIsNotNull()) investigations.add(item); } } form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations); }
private void searchData() { form.grdListedTests().getRows().clear(); if(form.cmbCategory().getValue() == null && form.txtName().getValue() == null) { engine.showMessage("Please Enter Some Search Criteria"); return; } if(form.getGlobalContext().OCRR.getItemSelectionTypeIsNotNull()) { if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.INVESTIGATION) || form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)) { InvestShortVoCollection voColl = domain.listInvestigationsOrProfiles( form.cmbCategory().getValue(), form.txtName().getValue(), form.getGlobalContext().OCRR.getProvider(), form.getGlobalContext().OCRR.getProviderService(), new Boolean(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)),Boolean.TRUE, engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.TestEdit) || engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit), Boolean.TRUE, new Boolean(engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit)),null,null); populateSearchResults(voColl); } else if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.ORDERSET)) { OrderSetShortVoCollection results = domain.listOrderSets(form.txtName().getValue()); populateSearchResults(results); } } }
private void populateSearchResults(InvestShortVoCollection searchResults) { form.grdListedTests().getRows().clear(); if(searchResults.size() == 0) { engine.showMessage("There are no Records for the Search Criteria Provided"); return; } for(int x = 0; x < searchResults.size(); x++) { addToList(searchResults.get(x)); } }
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) { SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection(); ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class); if(impl != null) { //WDEV-10065 - pass param here for contract InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList); if(results == null) return listResults; for(int x = 0; x < results.size(); x++) { InvestShortVo result = results.get(x); //WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop if(roleDiscliplineeSecurityLevels != null) { ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null; SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null; if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622 continue; } if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull()) { SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo(); component.setID(result.getID_Investigation()); component.setCategory(result.getInvestigationIndex().getCategory()); component.setText(result.getInvestigationIndex().getName()); component.setAdditionalLocationInfo(result.getLocationInfo()); //component.setTooltip(result.getInvestigationIndex().getDescription()); component.setHelpText(result.buildHelpTextTooltip()); component.setIsAddon(result.getIsAddon()); if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull()) component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service()); component.setMinReOrderPeriod(result.getMinReorderPeriodUnit()); component.setMinReOrderVal(result.getMinReorderPeriodVal()); component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit()); component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal()); component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier()); component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific()); component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect()); component.setTooltip(getComponentInvestigationTooltip(result)); SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION; if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue()) type = SelectAndOrderComponentType.PROFILE; component.setComponentType(type); if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624 { component.setAssociatedInvestigations(result.getAssocInvestigations()); } listResults.add(component); } } } return listResults; }