private void bindCmbCareContext() { form.cmbCContext().clear(); form.cmbCContant().clear(); if(form.cmbEpisode().getValue() instanceof EpisodeofCareShortVo) { CareContextForPatientDocumentVoCollection careContextList = domain.listCareContext(form.cmbEpisode().getValue()); for(int i=0; careContextList != null && i<careContextList.size(); i++) { CareContextForPatientDocumentVo cc = careContextList.get(i); if(cc != null) { form.cmbCContext().newRow(cc, getTextForCareContext(cc)); } } } }
public CareContextForPatientDocumentVoCollection listCareContext(EpisodeOfCareRefVo episodeOfCare) { if(episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull()) { throw new CodingRuntimeException("Supplied Episode Of Care is null or doesn't have an id."); } String hql = "from CareContext as cc where cc.episodeOfCare.id = :ep order by cc.startDateTime desc";//WDEV-12385 List<?> list = getDomainFactory().find(hql, "ep", episodeOfCare.getID_EpisodeOfCare()); if (list == null || list.size() == 0) return null; return CareContextForPatientDocumentVoAssembler.createCareContextForPatientDocumentVoCollectionFromCareContext(list); }