protected void onCmbIdByTeamValueChanged() throws ims.framework.exceptions.PresentationLogicException { form.cmbIdByMember().clear(); if(form.cmbIdByTeam().getValue() == null) return; HcpFilter filter = new HcpFilter(); filter.setHcpType(form.cmbIdByTeam().getValue()); HcpCollection voCollHcps = domain.listHcps(filter); for(int i=0;i<voCollHcps.size();i++) { form.cmbIdByMember().newRow(voCollHcps.get(i), voCollHcps.get(i).toString()); } }
/** * Function used to list HCPs from database */ public HcpCollection listHCP(String hcpName) throws DomainInterfaceException { // Check for a non null, non empty string if (hcpName == null || hcpName.length() == 0) throw new DomainInterfaceException("Can not search HCP with empty name"); // Build HQL Query String hqlQuery = "from Hcp as hcp where hcp.mos.name.surname like :NAME or hcp.mos.name.forename like :NAME"; // Create a parameters table (array of parameters names and array of parameters values) ArrayList<String> params = new ArrayList<String>(); params.add("NAME"); ArrayList<Object> values = new ArrayList<Object>(); values.add("%" + hcpName + "%"); // Return the result of the query (Hcp collection) DomainFactory factory = getDomainFactory(); return HcpAssembler.createHcpCollectionFromHcp(factory.find(hqlQuery, params, values)); }
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(); } }
private void searchForAuthoringHcp(String text) { form.qmbHCP().clear(); HcpCollection hcps = domain.listHcps(text); if(hcps != null) { for(int x = 0; x < hcps.size(); x++) { form.qmbHCP().newRow(hcps.get(x), getHCPName(hcps.get(x))); } } if(form.qmbHCP().getValues().size() > 1) form.qmbHCP().showOpened(); else if(form.qmbHCP().getValues().size() == 1) form.qmbHCP().setValue(hcps.get(0)); }
protected void onQmbRecordingHCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.qmbRecordingHCP().clear(); HcpFilter filter = new HcpFilter(); ims.core.vo.PersonName name = new ims.core.vo.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.qmbRecordingHCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.qmbRecordingHCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.qmbRecordingHCP().showOpened(); } }
protected void onGrdHCPsInvitedGridQueryComboBoxTextSubmited(int column, grdHCPsInvitedRow row, String text) throws PresentationLogicException { row.getcolHCPs().clear(); if (text == null || text.equals("")) { engine.showMessage("Please enter at least one character to search on"); return; } HcpCollection voCollHcp = domain.listHcps(text); if (voCollHcp != null && voCollHcp.size() > 0) { for (int i = 0; i < voCollHcp.size(); i++) { row.getcolHCPs().newRow(voCollHcp.get(i), voCollHcp.get(i).getName().toString()); } if (voCollHcp.size() == 1) row.getcolHCPs().setValue(voCollHcp.get(0)); else if (voCollHcp.size() > 1) row.getcolHCPs().showOpened(); } else engine.showMessage("No matching records found"); }
public HcpCollection listHcps(HcpFilter filter) { if (filter.getQueryName() == null) { MemberOfStaffShortVo voMos = new MemberOfStaffShortVo(); voMos.setStaffType(StaffType.HCP); MemberOfStaffShortVoCollection coll = this.listMembersOfStaff(voMos); HcpCollection voCollHcp = new HcpCollection(); for (int i = 0; i < coll.size(); i++) { MemberOfStaffShortVo voLocalMos = coll.get(i); voCollHcp.add(voLocalMos.getHcp()); } return voCollHcp; } else { HcpAdmin hcpAdmin = (HcpAdmin) getDomainImpl(HcpAdminImpl.class); return hcpAdmin.listHCPs(filter); } }
protected void onQmbCollectorTextSubmited(String value) throws PresentationLogicException { form.qmbCollector().clear(); if (value == null || value.equals("")) { engine.showMessage("Please enter at least one character to search on."); return; } HcpCollection voCollHcp = domain.listHcp(value); if (voCollHcp != null && voCollHcp.size() > 0) { for (int i = 0; i < voCollHcp.size(); i++) { form.qmbCollector().newRow(voCollHcp.get(i), voCollHcp.get(i).getName().toString()); } if (voCollHcp.size() == 1) form.qmbCollector().setValue(voCollHcp.get(0)); else if (voCollHcp.size() > 1) form.qmbCollector().showOpened(); } else engine.showMessage("No matching records found."); }
protected void onDyngrdCollectCellTextSubmited(ims.framework.controls.DynamicGridCell cell) { cell.getItems().clear(); if (cell.getTypedText() == null || cell.getTypedText().equals("")) { engine.showMessage("Please enter at least one character to search on."); return; } HcpCollection voCollHcp = domain.listHcp(cell.getTypedText()); if (voCollHcp != null && voCollHcp.size() > 0) { for (int i = 0; i < voCollHcp.size(); i++) { cell.getItems().newItem(voCollHcp.get(i)); } if (voCollHcp.size() == 1) cell.setValue(voCollHcp.get(0)); else if (voCollHcp.size() > 1) cell.showOpened(); } else engine.showMessage("No matching records found."); }
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(); } } }
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.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(); }
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(); } }
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException { 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(); } }
private void setAuthoringCP(String value) { form.lyrDetails().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.lyrDetails().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.lyrDetails().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.lyrDetails().tabHeader().qmbAuthoringCP().showOpened(); }
private void setAuthoringCP(String value) { form.qmbHCP().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.qmbHCP().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbHCP().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbHCP().showOpened(); }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.ctnStretching().lyrStretching().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.ctnStretching().lyrStretching().tabHeader().qmbAuthoringHcp().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnStretching().lyrStretching().tabHeader().qmbAuthoringHcp().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnStretching().lyrStretching().tabHeader().qmbAuthoringHcp().showOpened(); } }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.ctnDetails().lyrTENS().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.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().showOpened(); } }
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException { form.qmbAuthoringCP().clear(); HcpCollection voHcpColl = setAuthoringCP(value); for (int i = 0; i < voHcpColl.size(); i++) { Hcp med = voHcpColl.get(i); form.qmbAuthoringCP().newRow(med, med.toString()); } if (voHcpColl.size() == 1) form.qmbAuthoringCP().setValue(voHcpColl.get(0)); else if (voHcpColl.size() > 1) form.qmbAuthoringCP().showOpened(); }
protected void onQmbAuthoringCPWardTextSubmited(String value) { form.qmbAuthoringCPWard().clear(); HcpCollection voHcpColl = setAuthoringCP(value); for (int i = 0; i < voHcpColl.size(); i++) { Hcp med = voHcpColl.get(i); form.qmbAuthoringCPWard().newRow(med, med.toString()); } if (voHcpColl.size() == 1) form.qmbAuthoringCPWard().setValue(voHcpColl.get(0)); else if (voHcpColl.size() > 1) form.qmbAuthoringCPWard().showOpened(); }
protected void onQmbAuthoringTextSubmited(String value) throws PresentationLogicException { form.qmbAuthoring().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.qmbAuthoring().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbAuthoring().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbAuthoring().showOpened(); }
private void loadTherapistPresentCombo() { form.cmbTherapistPresent().clear(); Hcp filter = new Hcp(); filter.setHcpType(HcpDisType.THERAPY); HcpCollection collVoHcp = domain.listHcps(filter); if(collVoHcp != null) { for (int i = 0; i < collVoHcp.size(); i++) { form.cmbTherapistPresent().newRow(collVoHcp.get(i), collVoHcp.get(i).getName().toString()); } } }
protected void onQmbAuthoringHCPTextSubmited(String value) throws 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(); }
private void setAuthoringCP(String value) { form.ctnMob().lyrMob().tabHeader().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.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().setValue(coll.get(0)); else if (coll.size() > 1) form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().showOpened(); } }
private void setAuthoringCP(String value) { form.qmbHCP().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.qmbHCP().newRow(med, med.toString()); } if (coll.size() == 1) form.qmbHCP().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbHCP().showOpened(); }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.ctnEducateToCarers().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.ctnEducateToCarers().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnEducateToCarers().qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnEducateToCarers().qmbAuthoringCP().showOpened(); } } }
protected void onQmbRefferalToTextSubmited(String value) throws PresentationLogicException { form.ctnDetails().qmbRefferalTo().clear(); form.ctnDetails().cmbLocation().clear(); //wdev-16565 HcpCollection coll = domain.listHcps(value); //WDEV-2105 - check for null. It shouldn't crash ??? if(coll != null) { for (int i = 0; i < coll.size(); i++) { Hcp med = coll.get(i); form.ctnDetails().qmbRefferalTo().newRow(med.getMos(), med.toString()); } if (coll.size() == 1) { form.ctnDetails().qmbRefferalTo().setValue(coll.get(0).getMos()); onQmbRefferalToValueChanged(); } else if (coll.size() > 1) { form.ctnDetails().qmbRefferalTo().showOpened(); } } }
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { form.ctnDetail().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.ctnDetail().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnDetail().qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnDetail().qmbAuthoringCP().showOpened(); } }
private void setAuthoringCP(String value) { form.ctnGait().lyrGait().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.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().newRow(med, med.toString()); } if (coll.size() == 1) form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().setValue(coll.get(0)); else if (coll.size() > 1) form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().showOpened(); }
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException { form.ctnDetails().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.ctnDetails().qmbAuthoringCP().newRow(med, med.toString()); } if (coll.size() == 1) { form.ctnDetails().qmbAuthoringCP().setValue(coll.get(0)); } else if (coll.size() > 1) { form.ctnDetails().qmbAuthoringCP().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); //filter.setHcpType(HcpDisType.MEDICAL); 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(); } } }
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(); } } }
public HcpCollection listHcps(String text) { if(text == null || text.length() == 0) throw new DomainRuntimeException("Filter not supplied"); HcpFilter filter = new HcpFilter(); filter.setQueryName(new PersonName()); filter.getQueryName().setSurname(text); HcpAdmin impl = (HcpAdmin) getDomainImpl(HcpAdminImpl.class); return impl.listHCPs(filter); }