private boolean findIfIncludeSetForThisCareContext(IncludeAlertInDischargeReportsVoCollection includeAlertInDischargeReports) { for(int i = 0 ; includeAlertInDischargeReports != null && i < includeAlertInDischargeReports.size() ; i++) { if (includeAlertInDischargeReports.get(i).getCareContextIsNotNull() && includeAlertInDischargeReports.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()) && includeAlertInDischargeReports.get(i).getIncludeInReport()) return true; } return false; }
private void setAlertIncludeInfo(PatientAlertEDischargeVo voAlert, boolean bInclude) { IncludeAlertInDischargeReportsVo voNewInclude = new IncludeAlertInDischargeReportsVo(); voNewInclude.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voNewInclude.setAlert(voAlert); voNewInclude.setIncludeInReport(bInclude); if (voAlert.getIncludeAlertInDischargeReports() == null) voAlert.setIncludeAlertInDischargeReports(new IncludeAlertInDischargeReportsVoCollection()); voAlert.getIncludeAlertInDischargeReports().add(voNewInclude); }