private String getGpMail(GPLiteWithCommChannelsVo gp) { if(gp == null || gp.getCommChannels() == null) return null; for(CommChannelVo channel : gp.getCommChannels()) { if(channel == null) continue; if(ChannelType.EMAIL.equals(channel.getChannelType())) return channel.getCommValue(); } return null; }
private void addGpToGrid(GPLiteWithCommChannelsVo voGp) { if (voGp == null ) return; //check if this GP already exists if (isGpAlreadyAdded(voGp)){ engine.showErrors(new String[]{"The GP is already in the list"}); return; } grdReciepientRow row = form.grdReciepient().getRows().newRow(); String gpName = voGp.getNameIsNotNull() ? voGp.getName().toString() : ""; row.setValue(voGp); String emails = ""; if (voGp != null) { for (int j = 0; j < voGp.getCommChannels().size(); j++) { if (voGp.getCommChannels().get(j).getChannelType().equals(ChannelType.EMAIL)) { emails += "Email : " + voGp.getCommChannels().get(j).getCommValue() + "<br>"; } } if (emails == "") emails = "No email"; } row.setColRecipient(gpName+", "+emails); row.setTooltip(emails); }
public GPLiteWithCommChannelsVo getGPLiteWithCommChannels(GpRefVo gp) { if(gp == null || gp.getID_Gp() == null) throw new CodingRuntimeException("GpRefVo is null or id not provided for getMedicVo"); return GPLiteWithCommChannelsVoAssembler.create((Gp) getDomainFactory().getDomainObject(gp)); }
public GPLiteWithCommChannelsVo getGPLiteWithCommChannelsFromPatientShort( PatientShort patientShort) { if(patientShort == null || patientShort.getID_Patient() == null) throw new CodingRuntimeException("PatientShort is null "); Patient pat = (Patient) getDomainFactory().getDomainObject(patientShort); if(pat == null) throw new CodingRuntimeException("Patient is null "); return GPLiteWithCommChannelsVoAssembler.create((Gp)pat.getGp() ); }
private void prePopulateRecipients(PatientShort patientShort) { GPLiteWithCommChannelsVo gp = domain.getGPLiteWithCommChannelsFromPatientShort(patientShort); addGpToGrid(gp); }