private ReferralsRecordingVo populateDataFromScreen(ReferralsRecordingVo rrVo) { rrVo.setReferralSource(form.lyr().tabReferralDetails().cmbSourceofReferral().getValue()); if(!form.lyr().tabReferralDetails().chkSupplyHCPDetails().getValue()){ if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof MedicVo) { rrVo.setReferredBy((Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue()); rrVo.setReferredByGP(null); } else if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo) { rrVo.setReferredByGP((GpShortVo)form.lyr().tabReferralDetails().qmbReferredBy().getValue()); rrVo.setReferredBy(null); } if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof LocShortVo){ rrVo.setReferredtoLocation((LocShortVo)form.lyr().tabReferralDetails().cmbLocations().getValue()); rrVo.setRefOrgaCode(null); } else if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof OrgLiteVo){ rrVo.setReferredtoLocation(null); rrVo.setRefOrgaCode((OrgLiteVo)form.lyr().tabReferralDetails().cmbLocations().getValue()); } rrVo.setSuppliedReferralDetails(null); } else{ SuppliedReferralDetailsVo voSuppliedReferralDetails = new SuppliedReferralDetailsVo(); voSuppliedReferralDetails.setName(form.lyr().tabReferralDetails().txtHCPName().getValue()); voSuppliedReferralDetails.setServiceLocation(form.lyr().tabReferralDetails().txtLocation().getValue()); voSuppliedReferralDetails.setAddress(form.lyr().tabReferralDetails().txtAddress().getValue()); voSuppliedReferralDetails.setWorkPhone(form.lyr().tabReferralDetails().txtWorkPhone().getValue()); voSuppliedReferralDetails.setMobilePhone(form.lyr().tabReferralDetails().txtMobilePhone().getValue()); voSuppliedReferralDetails.setEmailAddress(form.lyr().tabReferralDetails().txtEmail().getValue()); rrVo.setSuppliedReferralDetails(voSuppliedReferralDetails); rrVo.setReferredtoLocation(null); rrVo.setReferredByGP(null); rrVo.setReferredBy(null); } rrVo.setReferralPriority(form.lyr().tabReferralDetails().cmbPriority().getValue()); rrVo.setDateSent(form.lyr().tabReferralDetails().dteDecisionToRefer().getValue()); rrVo.setDateReceived(form.lyr().tabReferralDetails().dteRecieptReferral().getValue()); rrVo.setReferralHCP(form.lyr().tabReferralDetails().qmbReferredTo().getValue()); //rrVo.setReferredBy(form.lyr().tabReferralDetails().qmbHCPName().getValue()); rrVo.setSpecialtyFunctionCode(form.lyr().tabReferralDetails().cmbSpecialtyCode().getValue()); rrVo.setReasonForReferral(form.lyr().tabReferralDetails().cmbReasonReferral().getValue()); rrVo.setDiscipline(form.lyr().tabReferralDetails().cmbDiscipline().getValue()); rrVo.setReferralStatus(form.lyr().tabReferralDetails().cmbStatus().getValue()); rrVo.setDetails(form.lyr().tabReferralDetails().txtDelayResonComments().getValue()); if (rrVo.getRecordingMOS() == null && form.getLocalContext().getLoggedInMOSIsNotNull()) rrVo.setRecordingMOS(form.getLocalContext().getLoggedInMOS()); rrVo.setAssessment(form.lyr().tabAssessment().customControlAssessment().getPatientAssessment()); return rrVo; }