private void populateMedicationFromGrid(RACPMedicationVo medicationVo) { RACPMedicationStatusVoCollection collRACPMedicationStatusVo = new RACPMedicationStatusVoCollection(); for (int i = 0; i < form.grdMeds().getRows().size(); i++) { grdMedsRow row = form.grdMeds().getRows().get(i); RACPMedicationStatusVo voRACPMedicationStatus = new RACPMedicationStatusVo(); voRACPMedicationStatus.setMedication(row.getcolMed()); voRACPMedicationStatus.setMedicationStatus(row.getcolStatus()); collRACPMedicationStatusVo.add(voRACPMedicationStatus); } if(collRACPMedicationStatusVo.size()>0) medicationVo.setRAPCMedicationList(collRACPMedicationStatusVo); else medicationVo.setRAPCMedicationList(null); }
private void populateScreen(RACPMedicationVo voRACPMedicationVo) { if(voRACPMedicationVo.getRAPCMedicationListIsNotNull()){ RACPMedicationStatusVoCollection collRACPMedication = voRACPMedicationVo.getRAPCMedicationList(); form.grdMeds().getRows().clear(); for (int i = 0; i < collRACPMedication.size(); i++) { RACPMedicationStatusVo voRACPMedication = collRACPMedication.get(i); grdMedsRow row = form.grdMeds().getRows().newRow(); row.setcolMed(voRACPMedication.getMedication()); row.setcolStatus(voRACPMedication.getMedicationStatus()); } } form.txtOther().setValue(voRACPMedicationVo.getMedicationNotes()); }