/** * populates the screen from data from specified FamilyHistoryVoCollection * @param voCollFamHist * @return void */ private void populateListControl(FamilyHistoryVoCollection voCollFamHist) { clear(); if (voCollFamHist != null) { GenForm.grdListRow row; for (int i =0; i < voCollFamHist.size();i++) { row = form.grdList().getRows().newRow(); row.setValue(voCollFamHist.get(i)); row.setcolRelativeName(voCollFamHist.get(i).getRelativeName()); row.setcolRelationship(voCollFamHist.get(i).getRelationship()); row.setcolDiagnosis(voCollFamHist.get(i).getDiagnosisDescriptionIsNotNull() ? voCollFamHist.get(i).getDiagnosisDescription() : NO_CODE_ITEM_SELECTED); row.setcolAgeOnset(voCollFamHist.get(i).getAgeAtOnset()); row.setcolLiving(voCollFamHist.get(i).getRelativeLiving()); } } }
public FamilyHistoryVoCollection list(ClinicalContactShortVo voClinicalContact, PatientShort voPatientShort) { if(voPatientShort == null || voPatientShort.getID_Patient() == null) throw new DomainRuntimeException("Patient Filter not provided for list call. "); DomainFactory factory = getDomainFactory(); java.util.List famhistList = factory.find("select p1_1 from PatientFamilyHistory as p1_1 left join p1_1.clinicalContact as c1_1 left join c1_1.careContext as c2_1 left join c2_1.episodeOfCare as e1_1 left join e1_1.careSpell as c3_1 left join c3_1.patient as p2_1 left join p1_1.patient as p3_1 where( (c3_1.patient.id = :patientId or p1_1.patient.id = :patientId))", new String[]{"patientId"}, new Object[]{voPatientShort.getID_Patient()}); //wdev-18559 if ((famhistList != null) && (famhistList.size()>0)) return FamilyHistoryVoAssembler.createFamilyHistoryVoCollectionFromPatientFamilyHistory(famhistList).sort(); else return null; }