private void setAuthoringCP(String value) { form.qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listHCPs(filter); if(coll != null) { for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbAuthoringCP().showOpened(); } }
@Override protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException { form.qmbReferredTo().clear(); MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(value); voMOS.setName(personName); voMOS.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS); if(coll != null) { for (int i = 0; i < coll.size(); i++) form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString()); if (coll.size() == 1) form.qmbReferredTo().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbReferredTo().showOpened(); } }
private MedicLiteVoCollection listConsultantsByName(String consultantName) throws CodingRuntimeException { // Leave throws so that clinics are not cleared when an invalid search is made if (consultantName == null || consultantName.trim().length() < 3) throw new CodingRuntimeException("Consultant name search must be at least 3 characters long"); // Build filtering VO MedicLiteVo filterVo = new MedicLiteVo(); filterVo.setMos(new MemberOfStaffLiteVo()); filterVo.getMos().setName(new PersonName()); filterVo.getMos().getName().setSurname(consultantName); filterVo.getMos().getName().setForename(consultantName); // Retrieve the consultants (list from domain) try { return domain.listConsultants(filterVo); } catch (DomainInterfaceException exception) { throw new CodingRuntimeException(exception.getMessage()); } }
public int compare(Object ob1, Object ob2) { PersonName pdate1 = null; PersonName pdate2 = null; if(ob1 instanceof MedicLiteVo ) { MedicLiteVo ps1 = (MedicLiteVo)ob1; pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null; } if(ob2 instanceof MedicLiteVo) { MedicLiteVo ps2 = (MedicLiteVo)ob2; pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null; } if(pdate1 != null ) return pdate1.compareTo(pdate2)*direction; if(pdate2 != null) return (-1)*direction; return 0; }
@Override protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException { form.lyr().tabReferralDetails().qmbReferredTo().clear(); MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(value); voMOS.setName(personName); voMOS.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS); if(coll != null) { for (int i = 0; i < coll.size(); i++) form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString()); if (coll.size() == 1) form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0)); else if (coll.size() > 1) form.lyr().tabReferralDetails().qmbReferredTo().showOpened(); } }
@Override protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException { if (value != null) { HcpFilter voHCPFilter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); voHCPFilter.setQueryName(name); voHCPFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter); voColl.sort(); form.qmbConsultant().clear(); for (int i = 0; i < voColl.size(); i++) { form.qmbConsultant().newRow(voColl.get(i), voColl.get(i).getIHcpName()); } if (voColl.size() == 1) form.qmbConsultant().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbConsultant().showOpened(); } }
@Override protected void onQmbConsTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { if (value != null) { HcpFilter voHCPFilter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); voHCPFilter.setQueryName(name); voHCPFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter); voColl.sort(); form.qmbCons().clear(); for (int i = 0; i < voColl.size(); i++) { form.qmbCons().newRow(voColl.get(i), voColl.get(i).getIHcpName()); } if (voColl.size() == 1) form.qmbCons().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbCons().showOpened(); } }
protected void onQmbAnaesTextSubmited(String value) throws PresentationLogicException { form.qmbAnaes().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpLiteVoCollection hcpColl = domain.listHcpLiteByName(value); for (int i = 0; i < hcpColl.size(); i++) { HcpLiteVo hcp = hcpColl.get(i); form.qmbAnaes().newRow(hcp, hcp.toString()); } if (hcpColl.size() == 1) { form.qmbAnaes().setValue(hcpColl.get(0)); } else if (hcpColl.size() > 1) { form.qmbAnaes().showOpened(); } }
protected void onQmbHCPTextSubmited(String value) { form.qmbHCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection voHCPColl = domain.listHcps(filter); if(voHCPColl != null) { for (int i = 0; i < voHCPColl.size(); i++) { form.qmbHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).toString()); } if (voHCPColl.size() == 1) { form.qmbHCP().setValue(voHCPColl.get(0)); } else if (voHCPColl.size() > 1) { form.qmbHCP().showOpened(); } } }
private void populateCareSpellRows(CareSpellVoCollection voCollCareSpells, PersonName name) { grdPatientsRow careSpellRow; for (int i = 0; i < voCollCareSpells.size(); i++) { careSpellRow = form.grdPatients().getRows().newRow(); CareSpellVo careSpellVo = voCollCareSpells.get(i); careSpellRow.setcolStartDateEndDate(name.toString()); //setStartDateEndDateAndTooltip(careSpellRow, careSpellVo); careSpellRow.setCollapsedImage(form.getImages().Core.CareSpell); careSpellRow.setExpandedImage(form.getImages().Core.CareSpell); careSpellRow.setBackColor(Color.Bisque); careSpellRow.setBold(true); careSpellRow.setValue(careSpellVo); if (careSpellVo.getEndDateIsNotNull()) form.getLocalContext().setParentEnded(Boolean.TRUE); boolean bCollapseAll = populateEpisodeOfCareRows(careSpellVo.getEpisodes().sort(), careSpellRow); careSpellRow.setExpanded(!bCollapseAll); } }
public int compare(Object ob1, Object ob2) { PersonName pdate1 = null; PersonName pdate2 = null; if(ob1 instanceof NurseVo ) { NurseVo ps1 = (NurseVo)ob1; pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null; } if(ob2 instanceof NurseVo) { NurseVo ps2 = (NurseVo)ob2; pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null; } if(pdate1 != null ) return pdate1.compareTo(pdate2)*direction; if(pdate2 != null) return (-1)*direction; return 0; }
protected void onQmbConsultantsTextSubmited(String value) throws PresentationLogicException { if (value != null) { HcpFilter voHCPFilter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); voHCPFilter.setQueryName(name); voHCPFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter); form.qmbConsultants().clear(); for (int i = 0; i < voColl.size(); i++) { form.qmbConsultants().newRow(voColl.get(i), voColl.get(i).getName().toString()); } if (voColl.size() == 1) form.qmbConsultants().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbConsultants().showOpened(); } }
@Override protected void onQmbHCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { if (value != null) { HcpFilter voHCPFilter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); voHCPFilter.setQueryName(name); voHCPFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter); voColl.sort(); form.qmbHCP().clear(); for (int i = 0; i < voColl.size(); i++) { form.qmbHCP().newRow(voColl.get(i), voColl.get(i).getIHcpName()); } if (voColl.size() == 1) form.qmbHCP().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbHCP().showOpened(); } }
@Override protected void onQmbSurgeonTextSubmited(String value) throws PresentationLogicException { if (value != null) { HcpFilter voHCPFilter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); voHCPFilter.setQueryName(name); voHCPFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter); voColl.sort(); form.qmbSurgeon().clear(); for (int i = 0; i < voColl.size(); i++) { form.qmbSurgeon().newRow(voColl.get(i), voColl.get(i).getIHcpName()); } if (voColl.size() == 1) form.qmbSurgeon().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbSurgeon().showOpened(); } }
private PatientLiteVo populatePatient() { PatientLiteVo patient = new PatientLiteVo(); PersonName name = new PersonName(); name.setSurname(form.txtSurname().getValue()); name.setForename(form.txtForename().getValue()); name.setUppers(); patient.setName(name); patient.setSex(form.cmbGender().getValue()); patient.setDob(form.pdtDOB().getValue()); patient.setIsActive(true); form.getLocalContext().setpatientToSave(patient); return patient; }
protected final void renderNameVoToXPN(PersonName name, XPN xpn,ProviderSystemVo providerSystem) throws Exception { LOG.debug("VoMapper renderNameVoToXPN: entry"); if (name == null) return; xpn.getFamilyName().getSurname().setValue(name.getSurname()); xpn.getGivenName().setValue(name.getForename()); xpn.getSecondAndFurtherGivenNamesOrInitialsThereof().setValue(name.getMiddleName()); if (name.getTitleIsNotNull()) xpn.getPrefixEgDR().setValue(svc.getRemoteLookup(name.getTitle().getID(), providerSystem.getCodeSystem().getText())); if (name.getNameTypeIsNotNull()) { xpn.getNameTypeCode().setValue(svc.getRemoteLookup(name.getNameType().getID(), providerSystem.getCodeSystem().getText())); } else { xpn.getNameTypeCode().setValue(svc.getRemoteLookup( NameType.LEGAL.getID(), providerSystem.getCodeSystem().getText())); } LOG.debug("VoMapper renderNameVoToXPN: exit (" + xpn.toString() + ")"); }
public GpShortVo getNewGpBasedOnSearchCriteria() { GpShortVo voGpShort = new GpShortVo(); voGpShort.setName(new PersonName()); String forname = form.txtSearchForename().getValue(); String surname = form.txtSearchSurname().getValue(); TaxonomyType type = form.cmbSearchCodeType().getValue(); voGpShort.getName().setForename(forname); voGpShort.getName().setUpperForename(forname != null ? forname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperForenameMaxLength(), forname.length())) : null); voGpShort.getName().setSurname(surname); voGpShort.getName().setUpperSurname(surname != null ? surname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperSurnameMaxLength(), surname.length())) : null); if (type != null) { voGpShort.setCodeMappings(new TaxonomyMapCollection()); TaxonomyMap taxonomyMap = new TaxonomyMap(); taxonomyMap.setTaxonomyName(type); taxonomyMap.setTaxonomyCode(form.txtSearchCode().getValue()); voGpShort.getCodeMappings().add(taxonomyMap); } return voGpShort; }
private MemberOfStaffShortVo populateFilterFromScreen() { MemberOfStaffShortVo voMosFilter = new MemberOfStaffShortVo(); PersonName name = new PersonName(); name.setSurname(form.txtSurName().getValue()); voMosFilter.setName(name); voMosFilter.setStaffType(form.cmbStaffType().getValue()); if (form.cmbHcpDiscipline().getValue() != null) { Hcp voHcp = new Hcp(); voHcp.setHcpType(form.cmbHcpDiscipline().getValue()); voMosFilter.setHcp(voHcp); } voMosFilter.setIsActive(new Boolean(form.chkActiveOnly().getValue())); return voMosFilter; }
protected void onQmbMemberOfStaffTextSubmited(String value) throws PresentationLogicException { if (value != null) { MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo(); PersonName name = new PersonName(); name.setSurname(value); voMemberOfStaffFilter.setName(name); voMemberOfStaffFilter.setIsAppUser(new Boolean(true)); MemberOfStaffShortVoCollection voCollMemberOfStaff = domain.listStaff(voMemberOfStaffFilter); voCollMemberOfStaff.sort(); form.lyrActivity().tabNtpf().qmbMemberOfStaff().clear(); for (int i = 0; i < voCollMemberOfStaff.size(); i++) { form.lyrActivity().tabNtpf().qmbMemberOfStaff().newRow(voCollMemberOfStaff.get(i), voCollMemberOfStaff.get(i).getName().getForename() + " " + voCollMemberOfStaff.get(i).getName().getSurname()); } if (voCollMemberOfStaff.size() == 1) form.lyrActivity().tabNtpf().qmbMemberOfStaff().setValue(voCollMemberOfStaff.get(0)); else if (voCollMemberOfStaff.size() > 1) form.lyrActivity().tabNtpf().qmbMemberOfStaff().showOpened(); } }
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell) { if (cell.getColumn().equals(getColumn(QUERY_COL))) { cell.getItems().clear(); String value = cell.getTypedText(); PersonName name = new PersonName(); MemberOfStaffShortVo filter = new MemberOfStaffShortVo(); name.setSurname(value); filter.setIsActive(Boolean.TRUE); filter.setName(name); MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter); for (int i = 0; i < voColl.size(); i++) { cell.getItems().newItem(voColl.get(i)); } int cellItemSize = cell.getItems().size(); if (cellItemSize > 0) { if (cellItemSize == 1) cell.setValue(cell.getItems().get(0)); cell.showOpened(); } } }
private void loadHcps(grdFuturePlanRow row, String text) { HcpFilter voFilter = new HcpFilter(); PersonName voName = new PersonName(); voName.setSurname(text); voFilter.setQueryName(voName); voFilter.setHcpType(HcpDisType.MEDICAL); HcpLiteVoCollection voColl = domain.listHCPs(voFilter); row.getColHCP().clear(); for (int i = 0; voColl != null && i < voColl.size(); i++) row.getColHCP().newRow(voColl.get(i), voColl.get(i).getName().toString()); if (voColl != null && voColl.size() == 1) row.getColHCP().setValue(voColl.get(0)); else if (voColl != null && voColl.size() > 1) row.getColHCP().showOpened(); }
@Override protected void onQmbListOwnerTextSubmited(String value) throws PresentationLogicException { form.qmbListOwner().clear(); HcpFilter filter = new HcpFilter(); PersonName voName = new PersonName(); voName.setSurname(value); filter.setQueryName(voName); HcpLiteVoCollection voCollHcp = domain.listClinicsListOwners(filter); if (voCollHcp.size() == 0) { engine.showMessage("No matching records found"); return; } for (int i = 0; i < voCollHcp.size(); i++) { form.qmbListOwner().newRow(voCollHcp.get(i), voCollHcp.get(i).getName().toString()); } if (voCollHcp.size() == 1) form.qmbListOwner().setValue(voCollHcp.get(0)); else form.qmbListOwner().showOpened(); }
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException { form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listHcps(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().showOpened(); } }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listHCPs(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.qmbAuthoringCP().showOpened(); } }
private void setAuthoringCP(String value) { form.ctnTherapy().lyrTherapy().tabHeader().qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listMedics(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnTherapy().lyrTherapy().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.ctnTherapy().lyrTherapy().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.ctnTherapy().lyrTherapy().tabHeader().qmbAuthoringCP().showOpened(); }
protected void onQmbAuthoringHCPTextSubmited(String value) throws PresentationLogicException { form.ctnDetails().qmbAuthoringHCP().clear(); Hcp filter = new Hcp(); PersonName name = new PersonName(); name.setSurname("%" + value + "%"); filter.setQueryName(name); //filter.setHcpType(HcpDisType.MEDICAL); HcpCollection voHCPColl = domain.listHcps(filter); if(voHCPColl != null) { for (int i = 0; i < voHCPColl.size(); i++) { form.ctnDetails().qmbAuthoringHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString()); } if (voHCPColl.size() == 1) { form.ctnDetails().qmbAuthoringHCP().setValue(voHCPColl.get(0)); } else if (voHCPColl.size() > 1) { form.ctnDetails().qmbAuthoringHCP().showOpened(); } } }
private void setAuthoringCP(String value) { form.qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listMedics(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbAuthoringCP().showOpened(); }
protected void onQmbHCPTextSubmited(String value) throws PresentationLogicException { form.ctnDetails().qmbHCP().clear(); Hcp filter = new Hcp(); PersonName name = new PersonName(); name.setSurname("%" + value + "%"); filter.setQueryName(name); //filter.setHcpType(HcpDisType.MEDICAL); HcpCollection voHCPColl = domain.listHcps(filter); if(voHCPColl != null) { for (int i = 0; i < voHCPColl.size(); i++) { form.ctnDetails().qmbHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString()); } if (voHCPColl.size() == 1) { form.ctnDetails().qmbHCP().setValue(voHCPColl.get(0)); } else if (voHCPColl.size() > 1) { form.ctnDetails().qmbHCP().showOpened(); } } }
private void setAuthoringCP(String value) { form.ctnDetail().lyrBoBath().tabBoBath().qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listMedics(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnDetail().lyrBoBath().tabBoBath().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.ctnDetail().lyrBoBath().tabBoBath().qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.ctnDetail().lyrBoBath().tabBoBath().qmbAuthoringCP().showOpened(); }
private void setAuthoringCP(String value) { form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listMedics(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().showOpened(); }
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException { form.ctnRemedial().lyrRemedial().tabHeader().qmbAuthoringHCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listHCPs(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnRemedial().lyrRemedial().tabHeader().qmbAuthoringHCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnRemedial().lyrRemedial().tabHeader().qmbAuthoringHCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnRemedial().lyrRemedial().tabHeader().qmbAuthoringHCP().showOpened(); } }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.qmbAuthoringHCP().clear(); HcpFilter filter = new HcpFilter(); PersonName name = new PersonName(); name.setSurname(value); filter.setQueryName(name); HcpCollection coll = domain.listHCPs(filter); for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.qmbAuthoringHCP().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbAuthoringHCP().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbAuthoringHCP().showOpened(); }
protected void onQmbHCPTextSubmited(String value) throws PresentationLogicException { form.qmbHCP().clear(); Hcp filter = new Hcp(); PersonName name = new PersonName(); name.setSurname("%" + value + "%"); filter.setQueryName(name); HcpCollection voHCPColl = domain.listHcps(filter); if(voHCPColl != null) { for (int i = 0; i < voHCPColl.size(); i++) form.qmbHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString()); if (voHCPColl.size() == 1) form.qmbHCP().setValue(voHCPColl.get(0)); else if (voHCPColl.size() > 1) form.qmbHCP().showOpened(); } }