private Integer getCurrentVersionNumber() { AdmisSpineExamVo voAdmisSpineExam = form.getLocalContext().getadmisSpineExam(); if(voAdmisSpineExam != null && voAdmisSpineExam.getMskExamIsNotNull() && voAdmisSpineExam.getMskExam().getImageVersionIsNotNull() && voAdmisSpineExam.getMskExam().getImageVersion().getVersionNumberIsNotNull()) return voAdmisSpineExam.getMskExam().getImageVersion().getVersionNumber(); DrawingImageVersionVo voDrawImgVersion = form.getLocalContext().getvoDrawingImageVersion(); return voDrawImgVersion != null?voDrawImgVersion.getVersionNumber():null; }
private void populateControls() { //Prepopulate Controls if(domain.getMosUser() != null) form.textBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); form.dateAssess().setValue(new Date()); form.timeAssess().setValue(new Time()); form.chkSkinIntact().setValue(false); //Save the previous Assessment form.getLocalContext().setPreviousSkinAssessment(form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO()); SkinAssessment skinAssVO = new SkinAssessment(); DrawingImageVersionVo drawingVO = new DrawingImageVersionVo(); //Set the Current Image Name & Version No drawingVO.setImageName(getCurrentImageName()); if(getCurrentVersionNumber() != null) drawingVO.setVersionNumber(getCurrentVersionNumber()); skinAssVO.setImageVersion(drawingVO); skinAssVO.setSkinAssessmentFindings(new SkinAssessmentFindingsCollection()); //Copy the previous Findings getPreviousFindings(skinAssVO); //Set back to the context the SkinAssVO form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO); form.bNew().setEnabled(false); form.setMode(FormMode.EDIT); }
private void populateScreen() { DateTime now = new DateTime(new Date(), new Time()); //Prepopulate Controls---------------------------------------------------- if(domain.getMosUser() != null) form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); form.dteAssessment().setValue(new Date()); form.timAssessment().setValue(new Time()); form.dteRecording().setValue(new Date()); form.timRecording().setValue(new Time()); //------------------------------------------------------------------------- //Save previous PainAssessment form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO()); PainAssessment painAssessmentVO = new PainAssessment(); painAssessmentVO.setAssessmentDateTime(now); painAssessmentVO.setDateTimeInitiated(now); Object hcpLite = domain.getHcpLiteUser(); painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null); painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection()); DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo(); versionNoVo.setImageName(getCurrentImageName()); if(getCurrentVersionNumber() != null) versionNoVo.setVersionNumber(getCurrentVersionNumber()); painAssessmentVO.setImageVersion(versionNoVo); //Copy the previous Active(Not Discontinued) Findings copyPreviousFindings(painAssessmentVO); //Add a new VO form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO); }