public VTERiskAssessmentShortVoCollection getVTEByCareContext(CareContextRefVo careContextRef) { if (careContextRef == null) throw new CodingRuntimeException("Cannot get VTEs on null careContextRef"); DomainFactory factory = getDomainFactory(); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); String query = "SELECT vte FROM VTERiskAssessment AS vte LEFT JOIN vte.careContext AS cc WHERE cc.id = :ID_CC"; paramNames.add("ID_CC"); paramValues.add(careContextRef.getID_CareContext()); return VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(factory.find(query.toString(), paramNames, paramValues)); }
public VTERiskAssessmentShortVo getVTERiskAssessmentShortVo( InpatientEpisodeRefVo inpatEpRef) { if(inpatEpRef == null) return null; DomainFactory factory = getDomainFactory(); List vteriskassess = factory.find("select v1_1 from InpatientEpisode as i1_1 left join i1_1.vTERiskAssessment as v1_1 where( i1_1.id = :idInpatEp )", new String[] {"idInpatEp"}, new Object[] {inpatEpRef.getID_InpatientEpisode()}); if( vteriskassess != null && vteriskassess.size() > 0 ) { VTERiskAssessmentShortVoCollection tempColl = VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(vteriskassess); if ( tempColl != null && tempColl.size() > 0) return tempColl.get(0); } return null; }
public VTERiskAssessmentShortVo getVTERiskAssessmentShortByDischargeEpisode(DischargedEpisodeRefVo dischargeRef) { if(dischargeRef == null) return null; DomainFactory factory = getDomainFactory(); List<?> vteriskassess = factory.find("select v1_1 from DischargedEpisode as dis left join dis.vTERiskAssessment as vte where( dis.id = :idDisEp )", new String[] {"idDisEp"}, new Object[] {dischargeRef.getID_DischargedEpisode()}); if( vteriskassess != null && vteriskassess.size() > 0 ) { VTERiskAssessmentShortVoCollection tempColl = VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(vteriskassess); if ( tempColl != null && tempColl.size() > 0) return tempColl.get(0); } return null; }
public VTERiskAssessmentShortVo getValidPreOpVteFromPatientSummaryForValidation(PatientRefVo patientRef) { ims.framework.utils.Date today = new ims.framework.utils.Date(); VTEAssessmentConfigVo vteConfig = getVteConfig(); if (vteConfig != null && vteConfig.getPreOpAssessmentValidPeriod() != null) { today.addDay(-1*vteConfig.getPreOpAssessmentValidPeriod()); } List list = getDomainFactory().find("select preOpVte from PatientSummaryRecord as summaryRecord left join summaryRecord.patient as pat left join summaryRecord.preOpVTEAssessment as preOpVte where pat.id = :patientID and " + " (preOpVte.isRIE is null or preOpVte.isRIE = 0) and summaryRecord.preOpVTECompletedDate >= :invalidDate and summaryRecord.preOpVTEValidationDate is null", new String[] {"patientID", "invalidDate"}, new Object[] {patientRef.getID_Patient(), today.getDate()}); if (list == null || list.size() == 0 || list.get(0) == null) return null; return VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(list).get(0); }
public ims.clinical.vo.VTERiskAssessmentShortVoCollection listVTERiskAssessments(ims.core.vo.PatientShort patient) { if(patient == null ) throw new CodingRuntimeException("Patient not provided"); DomainFactory factory = getDomainFactory(); List vteriskassess = factory.find("select v1_1 from VTERiskAssessment as v1_1 left join v1_1.patient as p1_1 where p1_1.id =:idPatient", new String[] {"idPatient"}, new Object[] {patient.getID_Patient()}); if( vteriskassess != null && vteriskassess.size() > 0) return VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING); return null; }
public ims.clinical.vo.VTERiskAssessmentShortVo getVTERiskAssessmentShortVo(ims.core.clinical.vo.VTERiskAssessmentRefVo vTERiskRef) { if(vTERiskRef == null) return null; DomainFactory factory = getDomainFactory(); return VTERiskAssessmentShortVoAssembler.create((VTERiskAssessment)factory.getDomainObject(VTERiskAssessment.class, vTERiskRef.getID_VTERiskAssessment())); }
public VTERiskAssessmentShortVoCollection listVTERiskAssessByPasId(PASEventRefVo pasRefVo) { if(pasRefVo == null ) throw new CodingRuntimeException("Patient not provided"); DomainFactory factory = getDomainFactory(); List vteriskassess = factory.find("select v1_1 from VTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 where p1_1.id =:idPasEvent", new String[] {"idPasEvent"}, new Object[] {pasRefVo.getID_PASEvent()}); if( vteriskassess != null && vteriskassess.size() > 0) return VTERiskAssessmentShortVoAssembler.createVTERiskAssessmentShortVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING); return null; }
public VTERiskAssessmentShortVo getVTERiskAssessmentShortVoBYId( VTERiskAssessmentRefVo vTERef) { if(vTERef == null || vTERef.getID_VTERiskAssessment() == null) //wdev-14944 return null; DomainFactory factory = getDomainFactory(); VTERiskAssessment doVTERiskAssessment =(VTERiskAssessment) factory.getDomainObject(VTERiskAssessment.class, vTERef.getID_VTERiskAssessment()); return VTERiskAssessmentShortVoAssembler.create(doVTERiskAssessment); }