private VTERiskAssessmentShortVo getVTEAssess(VTERiskAssessmentVo voVTERiskAss , VTERiskAssessmentShortVoCollection temVoColl) { if(temVoColl == null) return null; for(int i = 0; i < temVoColl.size();i++) { if(temVoColl.get(i) != null && voVTERiskAss != null) { if(voVTERiskAss.getID_VTERiskAssessmentIsNotNull() && temVoColl.get(i).getID_VTERiskAssessmentIsNotNull() && voVTERiskAss.getID_VTERiskAssessment().equals( temVoColl.get(i).getID_VTERiskAssessment())) return temVoColl.get(i); } } return null; }
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; }
private void newClickInst() { clearScreen(); if(form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVo() != null)//WDEV-15414 { form.cmbContextType().setValue(form.getLocalContext().getInpatientEpisode() != null ? VTEAssessmentContextType.INPATIENT : null); } else form.cmbContextType().setValue((Boolean.TRUE.equals(form.getLocalContext().getPatientIsInpatient()) || Boolean.TRUE.equals(form.getLocalContext().getPatientHasTCIForToday()))? VTEAssessmentContextType.INPATIENT : null); form.getLocalContext().setCurrentRecord(new VTERiskAssessmentVo()); form.ccAuthoringInfo().initializeComponent(); form.setMode(FormMode.EDIT); }
private boolean clearSummaryRecords(VTERiskAssessmentVo currentRecord) { PatientSummaryRecordVo summaryRecord = domain.getPatientSummaryForRecord(currentRecord, form.getGlobalContext().Core.getPatientShort()); if (summaryRecord != null) { summaryRecord.setPreOpVTEAssessment(null); summaryRecord.setPreOpVTECompletedDate(null); summaryRecord.setPreOpVTEValidationDate(null); summaryRecord.setInpatientVTEAssessment(null); try { domain.savePatientSummaryRecord(summaryRecord); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setCurrentRecord(null); open(); return false; } } return true; }
private void newClickInst() { clearScreen(); form.getLocalContext().setCurrentRecord(new VTERiskAssessmentVo()); form.ccAuthoringInfo().initializeComponent(); form.setMode(FormMode.EDIT); }
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())); }
private void updateVteStatus(VTEAsessmentStatus status, VTERemoveDeclineReasonVo reasonDeclined) { VTERiskAssessmentVo voVTERiskAss = form.getLocalContext().getCurrentRecord(); voVTERiskAss.setVTEAssessmentStatus(status); if (VTEAsessmentStatus.VALIDATED.equals(status)) { AuthoringInformationVo validateInfo = new AuthoringInformationVo(); validateInfo.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser()); validateInfo.setAuthoringDateTime(new DateTime()); voVTERiskAss.setValidatedInformation(validateInfo); } else if (VTEAsessmentStatus.VALIDATION_DECLINED.equals(status)) { AuthoringInformationVo declinedInfo = new AuthoringInformationVo(); declinedInfo.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser()); declinedInfo.setAuthoringDateTime(new DateTime()); voVTERiskAss.setDeclinedInformation(declinedInfo); voVTERiskAss.setDeclinedReason(reasonDeclined != null ? reasonDeclined.getReason() : null); } voVTERiskAss.validate(); try { domain.saveVTERiskAssess(voVTERiskAss); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return; } }
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); }