public OutpatientNotesOutcomeVo getOutpatientNotesOutcomeForClinicalNote(ClinicalNotesRefVo clinnoteRefVo) { DomainFactory factory = getDomainFactory(); if(clinnoteRefVo != null) { StringBuffer hql = new StringBuffer(" from OutpatientNotesOutcome opnote where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " opnote.clinicalNote.clinicalNote.id = :refid"); markers.add("refid"); values.add(clinnoteRefVo.getID_ClinicalNotes()); andStr = " and "; List listNotes = factory.find(hql.toString(), markers,values); if(listNotes != null && listNotes.size() > 0) { OutpatientNotesOutcomeVoCollection voColl = OutpatientNotesOutcomeVoAssembler.createOutpatientNotesOutcomeVoCollectionFromOutpatientNotesOutcome(listNotes); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }