private void populateMedication(EMISMedicationVoCollection medications) { if(medications!=null) for(int i=0; i<medications.size(); i++){ EMISMedicationVo med = medications.get(i); grdMedicationRow row = form.lyrDetails().tabMedicationEntity().grdMedication().getRows().newRow(); row.setColDrugRecord(med.getDrugRecord()); row.setColLatestIssueDate(med.getMostRecentIssueDate()); row.setColPrescriptionType(med.getPrescriptionType()); row.setColDrugName(med.getDrugName()); row.setColOriginalTerm(med.getOriginalTerm()); row.setColDosage(med.getDosage()); row.setColQuantity(med.getQuantityRepresentation()); row.setValue(medications.get(i)); } }