private boolean findIfIncludeSetForThisCareContext(IncludeDiagnosisInDischargeReportVoCollection includeDiagnosisInDiscReports) { for(int i = 0 ; includeDiagnosisInDiscReports != null && i < includeDiagnosisInDiscReports.size() ; i++) { if (includeDiagnosisInDiscReports.get(i).getCareContextIsNotNull() && includeDiagnosisInDiscReports.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()) && includeDiagnosisInDiscReports.get(i).getIncludeInReport()) return true; } return false; }
private PatientDiagnosisEDischargeVo includeValueChangedForCareContext(PatientDiagnosisEDischargeVo voPatientDiagnosis, boolean bInclude) { boolean bFound = false; for (int i = 0 ; voPatientDiagnosis.getIncludeDiagnosisInDiscReportsIsNotNull() && i < voPatientDiagnosis.getIncludeDiagnosisInDiscReports().size() ; i++) { IncludeDiagnosisInDischargeReportVo voInclude = voPatientDiagnosis.getIncludeDiagnosisInDiscReports().get(i); if (voInclude.getCareContextIsNotNull() && voInclude.getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext())) { bFound = true; voInclude.setIncludeInReport(bInclude); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().set(i, voInclude); } } if ( !bFound ) { IncludeDiagnosisInDischargeReportVo voNewInclude = new IncludeDiagnosisInDischargeReportVo(); voNewInclude.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voNewInclude.setDiagnosis(voPatientDiagnosis); voNewInclude.setIncludeInReport(bInclude); if (voPatientDiagnosis.getIncludeDiagnosisInDiscReports() == null) voPatientDiagnosis.setIncludeDiagnosisInDiscReports(new IncludeDiagnosisInDischargeReportVoCollection()); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().add(voNewInclude); } return voPatientDiagnosis; }
private boolean findIfIncludeSetForThisCareContext(IncludeDiagnosisInDischargeReportVoCollection includeDiagnosisInDiscReports) { for (int i = 0; includeDiagnosisInDiscReports != null && i < includeDiagnosisInDiscReports.size(); i++) { if (includeDiagnosisInDiscReports.get(i).getCareContextIsNotNull() && includeDiagnosisInDiscReports.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()) && includeDiagnosisInDiscReports.get(i).getIncludeInReport()) return true; } return false; }
private PatientDiagnosisEDischargeVo includeValueChangedForCareContext(PatientDiagnosisEDischargeVo voPatientDiagnosis, boolean bInclude) { boolean bFound = false; for (int i = 0; voPatientDiagnosis.getIncludeDiagnosisInDiscReportsIsNotNull() && i < voPatientDiagnosis.getIncludeDiagnosisInDiscReports().size(); i++) { IncludeDiagnosisInDischargeReportVo voInclude = voPatientDiagnosis.getIncludeDiagnosisInDiscReports().get(i); if (voInclude.getCareContextIsNotNull() && voInclude.getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext())) { // Include info exists and has not changed. if (voInclude.getIncludeInReportIsNotNull() && voInclude.getIncludeInReport().equals(bInclude)) return null; bFound = true; voInclude.setIncludeInReport(bInclude); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().set(i, voInclude);//Don't think this is necessary as we modify the object that is already in the List } } if (!bFound) { IncludeDiagnosisInDischargeReportVo voNewInclude = new IncludeDiagnosisInDischargeReportVo(); voNewInclude.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voNewInclude.setDiagnosis(voPatientDiagnosis); voNewInclude.setIncludeInReport(bInclude); if (voPatientDiagnosis.getIncludeDiagnosisInDiscReports() == null) voPatientDiagnosis.setIncludeDiagnosisInDiscReports(new IncludeDiagnosisInDischargeReportVoCollection()); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().add(voNewInclude); } return voPatientDiagnosis; }
private PatientDiagnosisEDischargeListVo includeValueChangedForCareContext(PatientDiagnosisEDischargeListVo voPatientDiagnosis, boolean bInclude) //WDEV-20511 { boolean bFound = false; for (int i = 0; voPatientDiagnosis.getIncludeDiagnosisInDiscReportsIsNotNull() && i < voPatientDiagnosis.getIncludeDiagnosisInDiscReports().size(); i++) { IncludeDiagnosisInDischargeReportVo voInclude = voPatientDiagnosis.getIncludeDiagnosisInDiscReports().get(i); if (voInclude.getCareContextIsNotNull() && voInclude.getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext())) { // Include info exists and has not changed. if (voInclude.getIncludeInReportIsNotNull() && voInclude.getIncludeInReport().equals(bInclude)) return null; bFound = true; voInclude.setIncludeInReport(bInclude); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().set(i, voInclude);//Don't think this is necessary as we modify the object that is already in the List } } if (!bFound) { IncludeDiagnosisInDischargeReportVo voNewInclude = new IncludeDiagnosisInDischargeReportVo(); voNewInclude.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voNewInclude.setDiagnosis(voPatientDiagnosis); voNewInclude.setIncludeInReport(bInclude); if (voPatientDiagnosis.getIncludeDiagnosisInDiscReports() == null) voPatientDiagnosis.setIncludeDiagnosisInDiscReports(new IncludeDiagnosisInDischargeReportVoCollection()); voPatientDiagnosis.getIncludeDiagnosisInDiscReports().add(voNewInclude); } return voPatientDiagnosis; }