private void loadContactRecords() { boolean currentClinicalContactFound = false; HomeVisitShortVoCollection voHomeVisitShortColl = domain.listHomeVisitAccContacts(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext()); loadHomeVisitsOfCareContext(voHomeVisitShortColl); if(voHomeVisitShortColl != null) { for(int i=0; i<voHomeVisitShortColl.size(); i++) { if(voHomeVisitShortColl.get(i).getClinicalContactIsNotNull()) { currentClinicalContactFound = loadHomeVisitsOfClinicalContact(voHomeVisitShortColl.get(i)); } } } if(!currentClinicalContactFound) { loadCurrentClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact(), Color.Green); } }
private void loadHomeVisitsOfCareContext(HomeVisitShortVoCollection voHomeVisitShortColl) { if(voHomeVisitShortColl != null) { voHomeVisitShortColl.sort(); //WDEV-13700 for(int i=0; i<voHomeVisitShortColl.size(); i++) { HomeVisitShortVo voHomeVisit = voHomeVisitShortColl.get(i); if(voHomeVisit.getClinicalContact() == null && voHomeVisit.getCareContext().getID_CareContext().equals(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext())) { loadHomeVisitsForACareContext(voHomeVisit); } else //start WDEV-13700 if (voHomeVisit !=null && voHomeVisit.getIsRIE() != null && voHomeVisit.getIsRIE()) { form.recbrContact().newRow(voHomeVisit, "\t\t\t\tClinical Contact:"+ voHomeVisit.getClinicalContact().getStartDateTime() +" - "+ voHomeVisit.getClinicalContact().getSeenBy()); } //end } } }
public HomeVisitShortVoCollection listHomeVisitAccContacts(Integer idCareContext) { if (idCareContext != null) { DomainFactory factory = getDomainFactory(); List RespTrList = factory.find(" from HomeVisit hv where hv.careContext.id = :ccId order by hv.authoringInformation", new String[]{"ccId"}, new Object[]{idCareContext}); return HomeVisitShortVoAssembler.createHomeVisitShortVoCollectionFromHomeVisit(RespTrList); } return null; }