private void populateService(Specialty specialty) { form.cmbService().clear(); if (specialty == null) return; ServiceLiteVoCollection services = domain.getServicesBySpecialty(specialty); if (services != null) { for (ServiceLiteVo service : services) { form.cmbService().newRow(service, service.getServiceName()); } if (services.size() == 1) form.cmbService().setValue(services.get(0)); } }
@Override protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException { form.qmbService().clear(); ServiceLiteVoCollection voCollService = domain.listActiveServiceByName(value); if(voCollService != null) { for(ServiceLiteVo voService : voCollService) form.qmbService().newRow(voService, voService.getServiceName()); if(voCollService.size() == 1) form.qmbService().setValue(voCollService.get(0)); else if(voCollService.size() > 1) form.qmbService().showOpened(); else engine.showErrors(new String[] {"No matching records found"}); } }
public ims.core.vo.ServiceLiteVoCollection getServices() { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from Service as service where service.isRIE is null and service.isActive = :isActive"); List list = factory.find(hql.toString(), new String[]{"isActive"}, new Object[]{true}); ServiceLiteVoCollection serviceLiteVoColl = ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list); if (serviceLiteVoColl.size() > 0) { return serviceLiteVoColl; } else { return null; } }
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection) { DomainFactory factory = getDomainFactory(); StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive"); for (int i = 0; i < categoryCollection.size(); i++) { if (i == 0) query.append(" and s.serviceCategory.id in("); query.append(categoryCollection.get(i).getID()); if (i < (categoryCollection.size() - 1)) query.append(", "); else query.append(")"); } List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE}); return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort(); }
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) { form.grdDisciplines().getRows().clear(); if(disciplines == null) return; for(ServiceLiteVo dis : disciplines) { if(dis == null) continue; if(!disciplineIsAdded(dis)) { grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow(); newRow.setColDis(dis.getServiceName()); newRow.setValue(dis); } } }
private void loadDiscipline() { form.cmbDiscipline().clear(); ServiceLiteVoCollection discipline = domain.listDiscipline(); if (discipline == null) return; for (int x = 0; x < discipline.size(); x++) { if (discipline.get(x) != null && discipline.get(x).getServiceNameIsNotNull()) { form.cmbDiscipline().newRow(discipline.get(x), discipline.get(x).getServiceName()); } } }
private void doSearchAndShowInGrid() throws PresentationLogicException { form.grdDiscipline().getRows().clear(); ServiceLiteVoCollection disciplines = null; try { disciplines = domain.listDiscipline(); } catch (DomainInterfaceException e) { e.printStackTrace(); throw new PresentationLogicException(e); } if (disciplines == null || disciplines.size() == 0) { engine.showMessage( "No Disciplines were found.","No results", MessageButtons.OK, MessageIcon.INFORMATION); return; } populateGridDisciplineFromData(disciplines); }
private ServiceLiteVoCollection getSelectedDisciplinesFromGridDiscipline() { grdDisciplineRowCollection rows = form.grdDiscipline().getRows(); if (rows == null || rows.size() == 0) return null; ServiceLiteVoCollection values = new ServiceLiteVoCollection(); for (int i = 0; i < rows.size(); i++) { grdDisciplineRow categoryRow = rows.get(i); for(int j = 0; j<categoryRow.getRows().size(); j++) { grdDisciplineRow disciplineRow = categoryRow.getRows().get(j); if (disciplineRow.getColumnSelect() == true && disciplineRow.getValue() instanceof ServiceLiteVo) { values.add((ServiceLiteVo) disciplineRow.getValue()); } } } return values; }
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) { form.grdDisciplines().getRows().clear(); if (disciplines == null) return; for (ServiceLiteVo dis : disciplines) { if (dis == null) continue; if (!disciplineIsAdded(dis)) { grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow(); newRow.setColDis(dis.getServiceName()); newRow.setValue(dis); } } }
private void populateDispipline() { form.lyrMain().tabSearch().cmbDiscipline().clear(); ServiceLiteVoCollection discipline = domain.listDiscipline(); if (discipline == null) return; for (int x = 0; x < discipline.size(); x++) { if (discipline.get(x) != null && discipline.get(x).getServiceNameIsNotNull()) { form.lyrMain().tabSearch().cmbDiscipline().newRow(discipline.get(x), discipline.get(x).getServiceName()); } } }
private String getDisciplineList(ServiceLiteVoCollection disciplines) { if (disciplines == null) return null; String disciplineList = ""; for (ServiceLiteVo dis : disciplines) { if (dis == null) continue; disciplineList += disciplineList.length() == 0 ? dis.getID_Service() : "," + dis.getID_Service(); } return disciplineList; }
private void loadService(String serviceValue) { //form.qmbService().clear(); WDEV-21265 form.cmbFunction().clear();//WDEV-20843 ServiceLiteVoCollection services = domain.listServicesByContractAndWildcard(form.cmbContract().getValue(), serviceValue, Boolean.TRUE.equals(form.getLocalContext().getIsAdmissionEmergencyReferral())); if (services != null) { form.qmbService().clear(); for (ServiceLiteVo service : services) { if(service == null) continue; form.qmbService().newRow(service, service.getServiceName()); form.qmbService().showOpened(); } } }
private void populateServices(ServiceLiteVoCollection services) { form.qmbService().clear(); if (services == null) return; for (ServiceLiteVo service : services) { form.qmbService().newRow(service, service.getServiceName()); } if (services.size() == 1) form.qmbService().setValue(services.get(0)); else form.qmbService().showOpened(); }
private void populateServices(ServiceLiteVoCollection listServices) { form.qmbService().clear(); if (listServices == null) { form.qmbService().showOpened(); return; } for (ServiceLiteVo service : listServices) { form.qmbService().newRow(service, service.getServiceName()); } if (listServices.size() == 1) { form.qmbService().setValue(listServices.get(0)); serviceValueChanged(); } else { form.qmbService().showOpened(); } }
public ServiceLiteVoCollection listClinicalServices(String serviceName) throws DomainInterfaceException { if (serviceName == null || serviceName.length() == 0) throw new DomainInterfaceException("Service name is mandatory for search."); StringBuilder query = new StringBuilder("SELECT srv FROM Service AS srv"); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); query.append(" WHERE srv.upperName LIKE :SRV_NAME AND srv.serviceCategory.id = :CLINICAL AND srv.isActive = 1"); //WDEV-20219 UPPER(srv.serviceName) paramNames.add("SRV_NAME"); paramValues.add(serviceName.toUpperCase() + '%'); paramNames.add("CLINICAL"); paramValues.add(ServiceCategory.CLINICAL.getID()); query.append(" ORDER BY srv.upperName"); //WDEV-20219 UPPER(srv.serviceName) return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(getDomainFactory().find(query.toString(), paramNames, paramValues)); }
private void populateSelectedServiceGrid(ServiceLiteVoCollection serviceColl) { if(serviceColl == null || serviceColl.size() < 1) return; for(int i = 0; i < serviceColl.size();i++) { ServiceLiteVo record = serviceColl.get(i); //WDEV-20945 if (record == null) continue; grdSelectedServicesRow newRow = form.grdSelectedServices().getRows().newRow(); newRow.setColumnServiceName(record.getServiceName()); newRow.setColumnSelect(Boolean.TRUE); newRow.setValue(record); } }
public ims.core.vo.ServiceLiteVoCollection getServices() { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from Service as service where service.isRIE is null and service.isActive = :isActive order by service.serviceName asc"); //wdev-20862 List list = factory.find(hql.toString(), new String[]{"isActive"}, new Object[]{true}); ServiceLiteVoCollection serviceLiteVoColl = ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list); if (serviceLiteVoColl.size() > 0) { return serviceLiteVoColl; } else { return null; } }
@Override protected void onQmbServiceByTextSubmited(String value) throws PresentationLogicException { form.qmbServiceBy().clear(); form.getGlobalContext().Clinical.setServiceSearchList(null); if (value == null || value.length() == 0) return; ServiceLiteVoCollection services = domain.listServices(value); if (services != null) { for (int i = 0; i < services.size(); i++) { if (services.get(i) != null) form.qmbServiceBy().newRow(services.get(i), services.get(i).getServiceName()); } } if (value != null && value.length() > 0) form.qmbServiceBy().showOpened(); updateControlsState(); }
private void populateServices(String value) { if (value == null || value.length() < 3) return; form.qmbService().clear(); ServiceLiteVoCollection coll = domain.listServices(value); if(coll == null || coll.size() == 0) return; for (int i=0;i<coll.size();i++) { if (coll.get(i) == null) continue; form.qmbService().newRow(coll.get(i), coll.get(i).getServiceName()); if (coll.size() == 1) { form.qmbService().setValue(coll.get(0)); } else { form.qmbService().showOpened(); } } }