private void loadSpecialRequirements() { ActivitySpecRequirementsCollection coll = LookupHelper.getActivitySpecRequirements(domain.getLookupService()); GenForm.lyrActivityLayer.tabSchedullingContainer.grdActSpecialRequirementsRow row = null; for (int i = 0; i < coll.size(); i++) { row = form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().newRow(); row.setcolRequirement(coll.get(i).getText()); row.setValue(coll.get(i)); } }
private void populateActivityVoFromScreen(ActivityVo voActivity) { if (voActivity == null) return; if (voActivity instanceof ActivitySchedVo) { //scheduling if (voActivity.getActivityType() == null) voActivity.setActivityType((ActivityType) form.treActivity().getSelectedNode().getValue()); //if (form.lyrActivity().tabSchedulling().txtActName().getValue() != null) WDEV-15167 voActivity.setName(form.lyrActivity().tabSchedulling().txtActName().getValue()); if (form.lyrActivity().tabSchedulling().intTimeRequired().getValue() != null) ((ActivitySchedVo) voActivity).setTmReq(form.lyrActivity().tabSchedulling().intTimeRequired().getValue()); if (form.lyrActivity().tabSchedulling().intIntervalRequired().getValue() != null) ((ActivitySchedVo) voActivity).setIntReq(form.lyrActivity().tabSchedulling().intIntervalRequired().getValue()); if (form.getGlobalContext().Admin.getSelectedImageIsNotNull()) ((ActivitySchedVo) voActivity).setActivityImage(form.getGlobalContext().Admin.getSelectedImage()); ((ActivitySchedVo) voActivity).setIsPatReq(new Boolean(form.lyrActivity().tabSchedulling().chkPatientRequired().getValue())); ((ActivitySchedVo) voActivity).setIsScheduled(new Boolean(form.lyrActivity().tabSchedulling().chkScheduled().getValue())); voActivity.setIsActive(new Boolean(form.lyrActivity().tabSchedulling().chkActActive().getValue())); // Save Activity special requirements. ActivitySpecRequirementsCollection asrColl = new ActivitySpecRequirementsCollection(); GenForm.lyrActivityLayer.tabSchedullingContainer.grdActSpecialRequirementsRow row; for (int i = 0; i < form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().size(); i++) { row = form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().get(i); if (row.getcolSelected()) asrColl.add(row.getValue()); } ((ActivitySchedVo) voActivity).setSpecialRequirements(asrColl); // Save Activity taxonomy mappings (WDEV-6108) voActivity.setCodeMappings(form.lyrActivity().tabSchedulling().ccTaxonomyTab2().getValue()); voActivity.setFirstAppointment(form.lyrActivity().tabSchedulling().chkFirstAppointment().getValue()); voActivity.setDiagnostic(form.lyrActivity().tabSchedulling().chkDiagnosticActivity().getValue()); } else { if (voActivity.getActivityType() == null) voActivity.setActivityType((ActivityType) form.treActivity().getSelectedNode().getValue()); if (form.lyrActivity().tabNtpf().txtName().getValue() != null) voActivity.setName(form.lyrActivity().tabNtpf().txtName().getValue()); voActivity.setIsWorkQueue(new Boolean(form.lyrActivity().tabNtpf().chkItem().getValue())); voActivity.setIsActive(new Boolean(form.lyrActivity().tabNtpf().chkActive().getValue())); // Save Activity taxonomy mappings (WDEV-6108) voActivity.setCodeMappings(form.lyrActivity().tabNtpf().ccTaxonomyTab1().getValue()); } }
private void populateScreenFromActivityVo(ActivityVo localActivity) { if (localActivity == null) return; if (localActivity instanceof ActivitySchedVo) { if (localActivity.getActivityTypeIsNotNull()) form.lyrActivity().tabSchedulling().txtActType().setValue(localActivity.getActivityType().getText()); if (localActivity.getName() != null) form.lyrActivity().tabSchedulling().txtActName().setValue(localActivity.getName()); if (((ActivitySchedVo) localActivity).getTmReq() != null) form.lyrActivity().tabSchedulling().intTimeRequired().setValue(((ActivitySchedVo) localActivity).getTmReq()); if (((ActivitySchedVo) localActivity).getIntReq() != null) form.lyrActivity().tabSchedulling().intIntervalRequired().setValue(((ActivitySchedVo) localActivity).getIntReq()); if (((ActivitySchedVo) localActivity).getActivityImage() != null) form.lyrActivity().tabSchedulling().txtActImage().setValue(((ActivitySchedVo) localActivity).getActivityImage().getImagePath()); form.getGlobalContext().Admin.setSelectedImage(((ActivitySchedVo) localActivity).getActivityImage()); if (((ActivitySchedVo) localActivity).getIsPatReq() != null) form.lyrActivity().tabSchedulling().chkPatientRequired().setValue(((ActivitySchedVo) localActivity).getIsPatReq().booleanValue()); if (((ActivitySchedVo) localActivity).getIsScheduled() != null) form.lyrActivity().tabSchedulling().chkScheduled().setValue(((ActivitySchedVo) localActivity).getIsScheduled().booleanValue()); if (((ActivitySchedVo) localActivity).getIsActive() != null) form.lyrActivity().tabSchedulling().chkActActive().setValue(localActivity.getIsActive().booleanValue()); form.lyrActivity().tabSchedulling().chkFirstAppointment().setValue(((ActivitySchedVo) localActivity).getFirstAppointment()); form.lyrActivity().tabSchedulling().chkDiagnosticActivity().setValue(((ActivitySchedVo) localActivity).getDiagnostic()); if(((ActivitySchedVo) localActivity).getSpecialRequirementsIsNotNull()) { GenForm.lyrActivityLayer.tabSchedullingContainer.grdActSpecialRequirementsRow row; ActivitySpecRequirementsCollection requirements = ((ActivitySchedVo) localActivity).getSpecialRequirements(); for (int i=0; i<requirements.size(); i++) { ActivitySpecRequirements requirement = requirements.get(i); row = form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRowByValue(requirement); if (row != null) row.setcolSelected(true); else { row = form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().newRow(); row.setValue(requirement); row.setcolRequirement(requirement.getText()); row.setcolSelected(true); } } } // Populate the taxonomy mappings (WDEV-6108) form.lyrActivity().tabSchedulling().ccTaxonomyTab2().setValue(localActivity.getCodeMappings()); } else { if (localActivity.getActivityTypeIsNotNull()) form.lyrActivity().tabNtpf().txtActivity().setValue(localActivity.getActivityType().getText()); if (localActivity.getName() != null) form.lyrActivity().tabNtpf().txtName().setValue(localActivity.getName()); form.lyrActivity().tabNtpf().chkActive().setValue(localActivity.getIsActive().booleanValue()); form.lyrActivity().tabNtpf().chkItem().setValue(localActivity.getIsWorkQueue().booleanValue()); // Populate the taxonomy mappings (WDEV-6108) form.lyrActivity().tabNtpf().ccTaxonomyTab1().setValue(localActivity.getCodeMappings()); } }