private void setupOccupationControls() { Occupation occupationValue = form.cmbOccupation().getValue(); if (occupationValue == null) { enableOccupationControls(false); form.txtOccupation().setValue(null); //wdev-16362 return; } if (occupationValue.getId() == Occupation.OTHER.getId()) { enableOccupationControls(true); } else { enableOccupationControls(false); form.txtOccupation().setValue(null); //wdev-16362 } }
private void populatePatientOccupationFromPD1(Patient patVo, PD1 pd1, ProviderSystemVo providerSystem) throws HL7Exception { // PD1-2 (Living Arrangement) contains patient's occupation (NON-STANDARD) String occupation = pd1.getLivingArrangement().getValue(); if (occupation != null) { if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH")) { patVo.setTxtOccupation(occupation); } else { if (occupation.equals(Hl7Null)) patVo.setOccupation(null); else patVo.setOccupation((Occupation) svc.getLocalLookup(Occupation.class, Occupation.TYPE_ID, providerSystem.getCodeSystem().getText(), occupation)); } } }
protected void populateScreenFromData(NurAssessmentPersonalDetailsVo voPersonal) { super.populateScreenFromData(voPersonal); //Care Plans if (voPersonal.getCarePlanTemplate() != null && voPersonal.getCarePlanTemplate().size() > 0) { GenForm.grdCarePlanRow cpRow; CarePlanTemplateCollection templateColl = voPersonal.getCarePlanTemplate(); CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.grdCarePlan().getRows().size(); j++) { cpRow = form.grdCarePlan().getRows().get(j); for (i=0; i<templateColl.size(); i++) { template = templateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelect(true); cpRow.setReadOnly(true); break; } } } } if (voPersonal.getIsComplete().booleanValue() == true) // Complete { form.setMode(FormMode.VIEW); } else { if ((form.cmbOccupation().getValue() != null)) if(form.getMode().equals(FormMode.EDIT)) form.txtOtherOccupation().setEnabled(form.cmbOccupation().getValue().equals(Occupation.OTHER)); } form.chkCopy().setEnabled(false); }
protected void onCmbOccupationValueChanged() throws PresentationLogicException { if (form.getMode().equals(FormMode.EDIT)) { if (form.cmbOccupation().getValue() != null) form.txtOtherOccupation().setEnabled(form.cmbOccupation().getValue().equals(Occupation.OTHER)); else { form.txtOtherOccupation().setEnabled(false); form.txtOtherOccupation().setValue(null); } } }