private void populateGpGrid(GPLiteWithPracticesVoCollection collection) { form.grdGps().getRows().clear(); for (int i = 0; i < collection.size(); i++) { populateGpRow(collection.get(i), form.grdGps().getRows().newRow()); } }
private void populateGpDynGrid(GPLiteWithPracticesVoCollection voGPcollection) { form.dynGrdGps().getRows().clear(); if (voGPcollection == null || voGPcollection.size() == 0) return; for (int i = 0; i < voGPcollection.size(); i++) { if (voGPcollection.get(i) == null) continue; addGpRow(voGPcollection.get(i), getRowforGridValue(voGPcollection.get(i))); } }
private void populateGpGrid(GPLiteWithPracticesVoCollection collection) { form.grdGps().getRows().clear(); if (collection == null || collection.size() == 0) return; for (int i = 0; i < collection.size(); i++) { populateGpRow(collection.get(i), form.grdGps().getRows().newRow()); } }
private GPLiteWithPracticesVoCollection filterGpsForGMCNumberAndPasCode(GPLiteWithPracticesVoCollection gpColl) { if (gpColl == null || gpColl.size() == 0) return null; String gMCCode = null; GPLiteWithPracticesVoCollection filteredGps = new GPLiteWithPracticesVoCollection(); for (int i=0;i<gpColl.size();i++) { GPLiteWithPracticesVo voGpWithPractice = gpColl.get(i); if (voGpWithPractice != null) { if(voGpWithPractice.getCodeMappingsIsNotNull()) { gMCCode = voGpWithPractice.getCodeMappings().getMappingValue(TaxonomyType.NAT_GP_CODE); } GpLiteToPracticeLiteVoCollection voPractices = voGpWithPractice.getPractices(); for (int j=0;j<voPractices.size();j++) { GpLiteToPracticeLiteVo practiceWithSurg = voPractices.get(j); if (practiceWithSurg != null && practiceWithSurg.getPracticeIsNotNull() && practiceWithSurg.getPractice().getSurgeries() != null && practiceWithSurg.getPractice().getSurgeries().size() > 0) { LocSiteShortVoCollection heartsSurgeries = getHeartsSurgery(practiceWithSurg.getPractice().getSurgeries(), gMCCode); if (heartsSurgeries != null && heartsSurgeries.size() > 0) filteredGps.add(voGpWithPractice); } } } } return filteredGps; }
private GPLiteWithPracticesVoCollection getFilteredPracticesAndSurgeriesforAddress(GPSearchCriteriaVo filter,GPLiteWithPracticesVoCollection gpWithPractColl) //WDEV-18377 { for (int i=gpWithPractColl.size()-1; i>=0;i--) { if (gpWithPractColl.get(i) == null || gpWithPractColl.get(i).getPractices() == null) continue; if (!ConfigFlag.DOM.GP_USE_SURGERIES.getValue()) { filterPracticesForAddress(filter, gpWithPractColl.get(i)); } else { for (int x=gpWithPractColl.get(i).getPractices().size()-1; x>=0;x--) { if (gpWithPractColl.get(i).getPractices().get(x) ==null || gpWithPractColl.get(i).getPractices().get(x).getPractice() == null) continue; filterSurgeriesForAddress(filter,gpWithPractColl.get(i).getPractices().get(x).getPractice()); } Iterator<GpLiteToPracticeLiteVo> iteratorForPractices = gpWithPractColl.get(i).getPractices().iterator(); while (iteratorForPractices.hasNext()) { if (iteratorForPractices.next().getPractice().getSurgeries().size() == 0) { iteratorForPractices.remove(); } } } } Iterator<GPLiteWithPracticesVo> iteratorForGP = gpWithPractColl.iterator(); while (iteratorForGP.hasNext()) { if (iteratorForGP.next().getPractices().size() == 0) { iteratorForGP.remove(); } } return gpWithPractColl; }