public VTERiskAssessmentVo getInProgressVTERiskAsessment(PASEventRefVo pasEventRefVo) { if(pasEventRefVo == null ) throw new CodingRuntimeException("PAS EVENT not provided"); DomainFactory factory = getDomainFactory(); List vteriskassess = factory.find("select v1_1 from InpatientEpisode as ie left join ie.vTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 left join v1_1.vTEAssessmentStatus as l1_1 where (p1_1.id =:idPasEvent and l1_1.id = :idStatus) ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRefVo.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});//WDEV-14993 if( vteriskassess != null && vteriskassess.size() > 0) { VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING); if( tempColl != null && tempColl.size() > 0) return tempColl.get(0); } return null; }
public VTERiskAssessmentVo getInProgressVTERiskAssessmentFromDischargeEpisode(PASEventRefVo pasEventRef) { if(pasEventRef == null ) throw new CodingRuntimeException("PAS EVENT not provided"); DomainFactory factory = getDomainFactory(); List vteriskassess = factory.find("select vte from DischargedEpisode as de left join de.vTERiskAssessment as vte left join vte.careContext as cc left join cc.pasEvent as pas left join vte.vTEAssessmentStatus as vtes where (pas.id =:idPasEvent and vtes.id = :idStatus) ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRef.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()}); if( vteriskassess != null && vteriskassess.size() > 0) { VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING); if( tempColl != null && tempColl.size() > 0) return tempColl.get(0); } return null; }
public ims.clinical.vo.VTERiskAssessmentVo getVTERiskAssessment(ims.core.clinical.vo.VTERiskAssessmentRefVo vTERiskAssRef) { if(vTERiskAssRef == null) return null; DomainFactory factory = getDomainFactory(); return VTERiskAssessmentVoAssembler.create((VTERiskAssessment)factory.getDomainObject(VTERiskAssessment.class, vTERiskAssRef.getID_VTERiskAssessment())); }
public VTERiskAssessmentVo saveVTERiskAssess(VTERiskAssessmentVo vteToSave) throws StaleObjectException { if (vteToSave == null) { throw new DomainRuntimeException("VTERiskAssessment cannot be null"); } DomainFactory factory = getDomainFactory(); VTERiskAssessment doVTERiskAssessment = VTERiskAssessmentVoAssembler.extractVTERiskAssessment(factory, vteToSave); factory.save(doVTERiskAssessment); return VTERiskAssessmentVoAssembler.create(doVTERiskAssessment); }