protected SocialHistoryVo populateDataFromScreen(SocialHistoryVo value) { if(validateMaritalDate()) return null; value = super.populateDataFromScreen(value); //SystemInformation sysInfo = new SystemInformation(); //sysInfo.setCreationDateTime(new DateTime()); value.setSocialHistoryNotes(this.form.txtGeneralNotes().getValue()); // ----- Start of grdSmokingDetails Grid -------------------------- value.setSmokingDetails(new ims.core.vo.SmokingDetailsCollection()); for (int x = 0; x < this.form.grdSmokingDetails().getRows().size(); x++) { boolean bAddVO = false; ims.core.vo.SmokingDetails rowValue = this.form.grdSmokingDetails().getRows().get(x).getValue(); if (rowValue == null) rowValue = new ims.core.vo.SmokingDetails(); rowValue.setStatus(this.form.grdSmokingDetails().getRows().get(x).getColStatus()); bAddVO = this.form.grdSmokingDetails().getRows().get(x).getColStatus() != null ? true : false; rowValue.setSmokingWhat(this.form.grdSmokingDetails().getRows().get(x).getColWhat()); if (bAddVO == false) bAddVO = this.form.grdSmokingDetails().getRows().get(x).getColWhat() != null ? true : false; rowValue.setAmountPerDay(this.form.grdSmokingDetails().getRows().get(x).getColAmt()); if (bAddVO == false) bAddVO = this.form.grdSmokingDetails().getRows().get(x).getColAmt() != null ? true : false; rowValue.setNumberOfYears(this.form.grdSmokingDetails().getRows().get(x).getColNrYrs()); if (bAddVO == false) bAddVO = this.form.grdSmokingDetails().getRows().get(x).getColNrYrs() != null ? true : false; rowValue.setWhenStopped(this.form.grdSmokingDetails().getRows().get(x).getColWhenStopped()); if (bAddVO == false) bAddVO = this.form.grdSmokingDetails().getRows().get(x).getColWhenStopped() != null ? true : false; if (bAddVO && value.getSmokingDetailsIsNotNull()) value.getSmokingDetails().add(rowValue); } // ----- End of grdSmokingDetails Grid ---------------------------- value.setAuthoringInformation(form.customControlAuth().getValue()); AlcoholVo alcohol = new AlcoholVo(); alcohol.setDoYouDrinkAlcohol(form.cmbAlcoholStatus().getValue()); alcohol.setUnitsPerDay(form.intUnitsPerDay().getValue()); alcohol.setDescriptiveHistory(form.txtTakenLastWeek().getValue()); value.setAlcohol(alcohol); // Save Marital Status Info SocialHistoryMaritalStatusVo voMaritalStatus = new SocialHistoryMaritalStatusVo(); voMaritalStatus.setMaritalStatus(form.cmbMaritalStat().getValue()); voMaritalStatus.setStatusDate(form.pdtMaritalStatus().getValue()); value.setMaritalStatus(voMaritalStatus); if(value.getIllicitDrugsList() == null) value.setIllicitDrugsList(new IllicitDrugsVo()); value = populateDataFromIllicitDrugsGrid(value); value.getIllicitDrugsList().setDrugsUsedIntravenously(form.ansIVUser().getValue()); //WDEV-12901 set Recording Information if(value.getRecordingInformation()==null){ RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo(); voRecordingUserInformation.setRecordingUser(form.cmbRecordingHCP().getValue()); voRecordingUserInformation.setRecordingDateTime(new DateTime()); value.setRecordingInformation(voRecordingUserInformation); } return value; }