private void populateRecordBrwoser(SocialHistoryLiteVoCollection socialHistorycoll) { if(socialHistorycoll == null) return; form.recbrSocialHistory().clear(); for (int i = 0; i < socialHistorycoll.size(); i++) { SocialHistoryLiteVo vo = socialHistorycoll.get(i); form.recbrSocialHistory().newRow(socialHistorycoll.get(i), getAuthoring(vo)); } if (form.getLocalContext().getvoSocialHistoryIsNotNull()) form.recbrSocialHistory().setValue(form.getLocalContext().getvoSocialHistory()); else if(socialHistorycoll.size()>0) form.recbrSocialHistory().setValue(socialHistorycoll.get(0)); }
public SocialHistoryLiteVoCollection getSocialHistoryByPatientColl( PatientRefVo patient) { if(patient == null || patient.getID_Patient() == null) return null; DomainFactory factory = getDomainFactory(); String hql = "from SocialHistory socHist where socHist.careContext.episodeOfCare.careSpell.patient.id = :idPatient order by socHist.authoringInformation.authoringDateTime desc"; List socialHistory = factory.find(hql, new String[] {"idPatient"}, new Object[] {patient.getID_Patient()}); if (socialHistory != null && socialHistory.size() > 0) return SocialHistoryLiteVoAssembler.createSocialHistoryLiteVoCollectionFromSocialHistory(socialHistory); return null; }