public AppSiteVo getSite() throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); List list = factory.find("from AppSite"); if(list.size() > 1) { throw new ims.domain.exceptions.DomainInterfaceException("There is more than 1 record in core_appsite table !"); } if(list.size() == 1) return AppSiteVoAssembler.create((AppSite) list.get(0)); return null; }
private void open() { form.setMode(FormMode.VIEW); AppSiteVo appSite = null; try { appSite = domain.getSite(); } catch (DomainInterfaceException e) { engine.showMessage(e.toString()); form.setMode(FormMode.VIEW); } form.btnNew().setVisible(appSite == null); form.btnEdit().setVisible(!(appSite == null)); if(appSite != null) { form.cmbSite().setValue(appSite.getSite()); form.getLocalContext().setAppSite(appSite); } }
private String setEmailSummaryMessage(CareContextRefVo careContext) { if(careContext == null) return EMAIL_SUBJECT; //PatientLiteVo patVo = getPatientByCareContext(careContext); PatientShort patVo = getPatientShortByCareContext(careContext); if(patVo != null) { //return EMAIL_SUBJECT + patVo.getName().getSurname(); //wdev-16298 AppSiteVo site = getSite(); if(site.getSite().equals(ApplicationSiteName.RCHT)) { return EMAIL_SUBJECT + getnhsNumber(patVo.getIdentifiers()) + " - Hospital Correspondence"; } else { return EMAIL_SUBJECT + patVo.getName().getSurname(); } //------------- } return EMAIL_SUBJECT; }
public AppSiteVo getSite() { DomainFactory factory = getDomainFactory(); List list = factory.find("from AppSite"); if(list.size() > 0) return AppSiteVoAssembler.create((AppSite) list.get(0)); return null; }