private void open() { clearScreen(); if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) { RACPExerciseECGVo voRACPExerciseECGVo = domain.getRACPExerciseECGForrefCareContext(form.getGlobalContext().Core.getCurrentCareContext()); form.getLocalContext().setRACPExerciseECGVo(voRACPExerciseECGVo); if(voRACPExerciseECGVo!=null) { populateScreen(voRACPExerciseECGVo); } } form.setMode(FormMode.VIEW);// WDEV-13437 }
public ims.clinical.vo.RACPExerciseECGVo getRACPExerciseECGForrefCareContext(CareContextRefVo refCareContextRefVo) { if (refCareContextRefVo == null) throw new CodingRuntimeException("Cannot get RACPMedicationVo for null ClinicalContactRefVo"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from RACPExerciseECG ecg where "); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" ecg.careContext.id = :ccId"); markers.add("ccId"); values.add(refCareContextRefVo.getID_CareContext()); List listRACPExerciseECG = factory.find(hql.toString(), markers,values); if(listRACPExerciseECG != null && listRACPExerciseECG.size() > 0) { RACPExerciseECGVoCollection voColl = RACPExerciseECGVoAssembler.createRACPExerciseECGVoCollectionFromRACPExerciseECG(listRACPExerciseECG); if(voColl != null && voColl.size() > 0) return voColl.get(0); } return null; }