private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) { if (ddVo == null) return null; ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue()); ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue()); ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue()); ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue()); ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null); ddVo.setPostMortem(form.cmbPostMortem().getValue()); DeathConditionsVoCollection collVo = new DeathConditionsVoCollection(); for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++) { if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null && form.grdCauseofDeath().getRows().get(i).getColCondition() != "") { collVo.add(form.grdCauseofDeath().getRows().get(i).getValue()); } } ddVo.setDeathConditions(collVo); return ddVo; }
private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) { if (ddVo == null) return null; ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue()); ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue()); ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue()); ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue()); ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null); ddVo.setPostMortem(form.cmbPostMortem().getValue()); DeathConditionsVoCollection collVo = new DeathConditionsVoCollection(); for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++) { if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null && form.grdCauseofDeath().getRows().get(i).getColCondition() != "") { collVo.add(form.grdCauseofDeath().getRows().get(i).getValue()); } } ddVo.setDeathConditions(collVo); if(isPds()) { ddVo.setPDSDeathNotificationStatus(form.cmbDeathNotificationStatus().getValue()); // WDEV-21930 - If the death notification is blank and this is PDS, we need to set it to informal if (!ddVo.getPDSDeathNotificationStatusIsNotNull()) ddVo.setPDSDeathNotificationStatus(PDSDeathNotificationStatus.INFORMAL); } return ddVo; }