diff --git a/.gitignore b/.gitignore
index 8476a0288..faca1f443 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ deploy.sh
openelis/WebContent/.sass-cache
openElisCore.css
OpenElis.zip
+.java-version
diff --git a/README.md b/README.md
index 1639db3a0..7e9fcd759 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ OpenElis
forked from OpenElis_v3.1_r2013_02_21 branch in svn
*Requirements to build OpeneLIS*
-* `java` version <= "1.7"
+* `java` version <= "1.8"
* `ant` version <= "1.9.1"
* `ruby` version <= "2.2" and `gem install compass`
diff --git a/build.xml b/build.xml
index 035152dbe..fe538ea7a 100644
--- a/build.xml
+++ b/build.xml
@@ -47,14 +47,14 @@
-
-
+
diff --git a/build/lib/commons-collections-2.1.1.jar b/build/lib/commons-collections-2.1.1.jar
deleted file mode 100644
index 3272f2be6..000000000
Binary files a/build/lib/commons-collections-2.1.1.jar and /dev/null differ
diff --git a/build/lib/commons-collections-3.2.2.jar b/build/lib/commons-collections-3.2.2.jar
new file mode 100644
index 000000000..fa5df82a6
Binary files /dev/null and b/build/lib/commons-collections-3.2.2.jar differ
diff --git a/build/lib/ecj-4.3.1.jar b/build/lib/ecj-4.3.1.jar
new file mode 100644
index 000000000..dc070076f
Binary files /dev/null and b/build/lib/ecj-4.3.1.jar differ
diff --git a/build/lib/jasperreports-3.7.2.jar b/build/lib/jasperreports-3.7.2.jar
deleted file mode 100644
index 2f2f8d8fe..000000000
Binary files a/build/lib/jasperreports-3.7.2.jar and /dev/null differ
diff --git a/build/lib/jasperreports-6.3.1.jar b/build/lib/jasperreports-6.3.1.jar
new file mode 100644
index 000000000..4e7000797
Binary files /dev/null and b/build/lib/jasperreports-6.3.1.jar differ
diff --git a/build/lib/jdt-compiler-3.1.1.jar b/build/lib/jdt-compiler-3.1.1.jar
deleted file mode 100644
index d37776aca..000000000
Binary files a/build/lib/jdt-compiler-3.1.1.jar and /dev/null differ
diff --git a/openelis/WebContent/WEB-INF/lib/commons-collections-2.1.1.jar b/openelis/WebContent/WEB-INF/lib/commons-collections-2.1.1.jar
deleted file mode 100644
index 3272f2be6..000000000
Binary files a/openelis/WebContent/WEB-INF/lib/commons-collections-2.1.1.jar and /dev/null differ
diff --git a/openelis/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar b/openelis/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar
new file mode 100644
index 000000000..fa5df82a6
Binary files /dev/null and b/openelis/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar differ
diff --git a/openelis/WebContent/WEB-INF/lib/ecj-4.3.1.jar b/openelis/WebContent/WEB-INF/lib/ecj-4.3.1.jar
new file mode 100644
index 000000000..dc070076f
Binary files /dev/null and b/openelis/WebContent/WEB-INF/lib/ecj-4.3.1.jar differ
diff --git a/openelis/WebContent/WEB-INF/lib/jasperreports-3.7.2.jar b/openelis/WebContent/WEB-INF/lib/jasperreports-3.7.2.jar
deleted file mode 100644
index 2f2f8d8fe..000000000
Binary files a/openelis/WebContent/WEB-INF/lib/jasperreports-3.7.2.jar and /dev/null differ
diff --git a/openelis/WebContent/WEB-INF/lib/jasperreports-6.3.1.jar b/openelis/WebContent/WEB-INF/lib/jasperreports-6.3.1.jar
new file mode 100644
index 000000000..4e7000797
Binary files /dev/null and b/openelis/WebContent/WEB-INF/lib/jasperreports-6.3.1.jar differ
diff --git a/openelis/WebContent/WEB-INF/lib/jdt-compiler-3.1.1.jar b/openelis/WebContent/WEB-INF/lib/jdt-compiler-3.1.1.jar
deleted file mode 100644
index d37776aca..000000000
Binary files a/openelis/WebContent/WEB-INF/lib/jdt-compiler-3.1.1.jar and /dev/null differ
diff --git a/openelis/src/us/mn/state/health/lims/common/provider/reports/ResultsReportProvider.java b/openelis/src/us/mn/state/health/lims/common/provider/reports/ResultsReportProvider.java
index ec8a423c6..84dc09bef 100644
--- a/openelis/src/us/mn/state/health/lims/common/provider/reports/ResultsReportProvider.java
+++ b/openelis/src/us/mn/state/health/lims/common/provider/reports/ResultsReportProvider.java
@@ -170,17 +170,17 @@ public boolean processRequest(Map parameters, HttpServletRequest request,
//turn subreport jasper files into JasperReport objects to pass in as parameters
JasperReport providerDetailsReport = (JasperReport) JRLoader
- .loadObject(providerDetailsReportFile.getPath());
+ .loadObject(providerDetailsReportFile);
JasperReport projectDetailsReport = (JasperReport) JRLoader
- .loadObject(projectDetailsReportFile.getPath());
+ .loadObject(projectDetailsReportFile);
JasperReport sourceTypeDetailsReport = (JasperReport) JRLoader
- .loadObject(sourceTypeDetailsReportFile.getPath());
+ .loadObject(sourceTypeDetailsReportFile);
JasperReport patientDetailsReport = (JasperReport) JRLoader
- .loadObject(patientDetailsReportFile.getPath());
+ .loadObject(patientDetailsReportFile);
JasperReport testResultsReport = (JasperReport) JRLoader
- .loadObject(testResultsReportFile.getPath());
+ .loadObject(testResultsReportFile);
JasperReport resultValueReport = (JasperReport) JRLoader
- .loadObject(resultValueReportFile.getPath());
+ .loadObject(resultValueReportFile);
parameters.put("Provider_Details", providerDetailsReport);
parameters.put("Project_Details", projectDetailsReport);
diff --git a/openelis/src/us/mn/state/health/lims/dashboard/daoimpl/OrderListDAOHelper.java b/openelis/src/us/mn/state/health/lims/dashboard/daoimpl/OrderListDAOHelper.java
index 50aca5228..011bc8ae6 100644
--- a/openelis/src/us/mn/state/health/lims/dashboard/daoimpl/OrderListDAOHelper.java
+++ b/openelis/src/us/mn/state/health/lims/dashboard/daoimpl/OrderListDAOHelper.java
@@ -245,7 +245,7 @@ private Order getOrderWithPriority(ResultSet accessionResultSet, String comments
accessionResultSet.getBoolean("is_printed"),
accessionResultSet.getInt("pending_tests_count"),
accessionResultSet.getInt("pending_validation_count"),
- accessionResultSet.getInt("referred_test_count"),
+ accessionResultSet.getInt("referred_tests_count"),
accessionResultSet.getInt("total_test_count"),
accessionResultSet.getDate("collection_date"),
accessionResultSet.getDate("entered_date"),
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/CommonReportPrintAction.java b/openelis/src/us/mn/state/health/lims/reports/action/CommonReportPrintAction.java
index e02ccb831..8a3cac67a 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/CommonReportPrintAction.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/CommonReportPrintAction.java
@@ -33,7 +33,7 @@
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
+import java.util.Map;
public class CommonReportPrintAction extends BaseAction {
@@ -58,7 +58,7 @@ protected ActionForward performAction(ActionMapping mapping, ActionForm form, Ht
reportCreator.initializeReport(dynaForm);
reportCreator.setReportPath(getReportPath());
- HashMap parameterMap = (HashMap) reportCreator.getReportParameters();
+ Map parameterMap = reportCreator.getReportParameters();
parameterMap.put("SUBREPORT_DIR", getReportPath());
try {
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/implementation/CollectionReport.java b/openelis/src/us/mn/state/health/lims/reports/action/implementation/CollectionReport.java
index cbb2a38e0..c2a771976 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/implementation/CollectionReport.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/implementation/CollectionReport.java
@@ -22,9 +22,11 @@
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Map;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.Collections;
import net.sf.jasperreports.engine.JasperRunManager;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
@@ -68,15 +70,15 @@ public void initializeReport(BaseActionForm dynaForm) {
}
@Override
- public HashMap getReportParameters() throws IllegalStateException {
- return new HashMap();
+ public Map getReportParameters() throws IllegalStateException {
+ return Collections.emptyMap();
}
@Override
public byte[] runReport() throws Exception {
List byteList = generateReports();
if (byteList.isEmpty()) {
- HashMap parameterMap = new HashMap();
+ HashMap parameterMap = new HashMap();
parameterMap.put("SUBREPORT_DIR", reportPath);
parameterMap.put("directorName", ConfigurationProperties.getInstance().getPropertyValue(Property.labDirectorName));
List errorMsgs = new ArrayList();
@@ -150,7 +152,7 @@ protected byte[] createReport(String reportName) {
reportCreator.setReportPath(reportPath);
@SuppressWarnings("unchecked")
- HashMap parameterMap = (HashMap) reportCreator.getReportParameters();
+ Map parameterMap = reportCreator.getReportParameters();
parameterMap.put("SUBREPORT_DIR", reportPath);
handledOrders.addAll(reportCreator.getReportedOrders());
try {
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/implementation/IReportCreator.java b/openelis/src/us/mn/state/health/lims/reports/action/implementation/IReportCreator.java
index be3798fa0..40d0110d5 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/implementation/IReportCreator.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/implementation/IReportCreator.java
@@ -16,7 +16,7 @@
*/
package us.mn.state.health.lims.reports.action.implementation;
-import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import us.mn.state.health.lims.common.action.BaseActionForm;
@@ -31,7 +31,7 @@ public interface IReportCreator {
public String getContentType();
public String getResponseHeaderName();
public String getResponseHeaderContent();
- public HashMap getReportParameters() throws IllegalStateException;
+ public Map getReportParameters() throws IllegalStateException;
public byte[] runReport( ) throws Exception;
public void setReportPath( String path);
public List getReportedOrders();
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/implementation/IndicatorSectionPerformanceReport.java b/openelis/src/us/mn/state/health/lims/reports/action/implementation/IndicatorSectionPerformanceReport.java
index 4d646841d..978afc837 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/implementation/IndicatorSectionPerformanceReport.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/implementation/IndicatorSectionPerformanceReport.java
@@ -107,8 +107,8 @@ public JRDataSource getReportDataSource() throws IllegalStateException {
return new JRBeanCollectionDataSource(reportItems);
}
- public HashMap getReportParameters() throws IllegalStateException {
- return new HashMap();
+ public Map getReportParameters() throws IllegalStateException {
+ return Collections.emptyMap();
}
public void initializeReport(BaseActionForm dynaForm) {
@@ -226,7 +226,8 @@ private void addIntakeItems() throws LIMSInvalidConfigurationException {
List initialRegisteredList = observationHistoryDAO.getObservationHistoryByDictonaryValues(initialRegisteredID);
fillDataForRecords(notRegisteredList, "Pas d'inscription initiale");
- fillDataForRecords(initialRegisteredList, "Entrée non validé");
+ fillDataForRecords(initialRegisteredList, "Entrée non validé");
+
}
private void fillDataForRecords(List observationList, String category) throws LIMSInvalidConfigurationException {
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/implementation/PatientIndeterminateByLocationReport.java b/openelis/src/us/mn/state/health/lims/reports/action/implementation/PatientIndeterminateByLocationReport.java
index 7df1df9d7..6974c71bf 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/implementation/PatientIndeterminateByLocationReport.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/implementation/PatientIndeterminateByLocationReport.java
@@ -17,7 +17,7 @@
package us.mn.state.health.lims.reports.action.implementation;
-import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import net.sf.jasperreports.engine.JRDataSource;
@@ -116,7 +116,7 @@ protected void createReportItems() {
reportPatient = null;
}
- public HashMap getReportParameters() throws IllegalStateException {
+ public Map getReportParameters() throws IllegalStateException {
return super.getReportParameters();
}
public JRDataSource getReportDataSource() throws IllegalStateException {
diff --git a/openelis/src/us/mn/state/health/lims/reports/action/implementation/Report.java b/openelis/src/us/mn/state/health/lims/reports/action/implementation/Report.java
index 9638e511a..28f71922c 100644
--- a/openelis/src/us/mn/state/health/lims/reports/action/implementation/Report.java
+++ b/openelis/src/us/mn/state/health/lims/reports/action/implementation/Report.java
@@ -118,7 +118,7 @@ public byte[] runReport( ) throws Exception {
*/
public abstract JRDataSource getReportDataSource() throws IllegalStateException;
- public HashMap getReportParameters() throws IllegalStateException {
+ public Map getReportParameters() throws IllegalStateException {
if (!initialized) {
throw new IllegalStateException("initializeReport not called first");
}
diff --git a/openelis/src/us/mn/state/health/lims/workplan/action/PrintWorkplanReportAction.java b/openelis/src/us/mn/state/health/lims/workplan/action/PrintWorkplanReportAction.java
index 7ef895754..6f50c29d1 100644
--- a/openelis/src/us/mn/state/health/lims/workplan/action/PrintWorkplanReportAction.java
+++ b/openelis/src/us/mn/state/health/lims/workplan/action/PrintWorkplanReportAction.java
@@ -19,6 +19,7 @@
import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import javax.servlet.ServletOutputStream;
@@ -81,7 +82,7 @@ protected ActionForward performAction(ActionMapping mapping, ActionForm form, Ht
workplanReport = getWorkplanReport(workplanType, workplanName);
//set jasper report parameters
- HashMap parameterMap = workplanReport.getParameters();
+ Map parameterMap = workplanReport.getParameters();
//prepare report
List> workplanRows = workplanReport.prepareRows(dynaForm);
@@ -173,4 +174,4 @@ public IWorkplanReport getWorkplanReport(String testType, String name) {
}
-
+
diff --git a/openelis/src/us/mn/state/health/lims/workplan/reports/ElisaWorkplanReport.java b/openelis/src/us/mn/state/health/lims/workplan/reports/ElisaWorkplanReport.java
index a4b1075c2..9e3aff247 100644
--- a/openelis/src/us/mn/state/health/lims/workplan/reports/ElisaWorkplanReport.java
+++ b/openelis/src/us/mn/state/health/lims/workplan/reports/ElisaWorkplanReport.java
@@ -18,6 +18,7 @@
package us.mn.state.health.lims.workplan.reports;
import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import us.mn.state.health.lims.common.action.BaseActionForm;
@@ -41,7 +42,7 @@ public String getFileName() {
return fileName;
}
- public HashMap getParameters() {
+ public Map getParameters() {
parameterMap.put("testSection", testSection);
return parameterMap;
diff --git a/openelis/src/us/mn/state/health/lims/workplan/reports/IWorkplanReport.java b/openelis/src/us/mn/state/health/lims/workplan/reports/IWorkplanReport.java
index 882fa96c8..0a2a458a2 100644
--- a/openelis/src/us/mn/state/health/lims/workplan/reports/IWorkplanReport.java
+++ b/openelis/src/us/mn/state/health/lims/workplan/reports/IWorkplanReport.java
@@ -18,7 +18,7 @@
package us.mn.state.health.lims.workplan.reports;
-import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import us.mn.state.health.lims.common.action.BaseActionForm;
@@ -26,7 +26,7 @@
public interface IWorkplanReport {
- public HashMap getParameters();
+ public Map getParameters();
public String getFileName();
diff --git a/openelis/test/org/bahmni/feed/openelis/feed/event/EncounterFeedWorkerTest.java b/openelis/test/org/bahmni/feed/openelis/feed/event/EncounterFeedWorkerTest.java
index 4b4732b5d..d8d7ef56b 100644
--- a/openelis/test/org/bahmni/feed/openelis/feed/event/EncounterFeedWorkerTest.java
+++ b/openelis/test/org/bahmni/feed/openelis/feed/event/EncounterFeedWorkerTest.java
@@ -1,7 +1,6 @@
package org.bahmni.feed.openelis.feed.event;
import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
import org.bahmni.feed.openelis.feed.contract.openmrs.encounter.OpenMRSEncounter;
import org.bahmni.feed.openelis.utils.AuditingService;
import org.bahmni.webclients.HttpClient;
@@ -9,6 +8,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import us.mn.state.health.lims.login.daoimpl.LoginDAOImpl;
@@ -24,7 +24,9 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({Logger.class, EncounterFeedWorker.class})
-public class EncounterFeedWorkerTest {
+@PowerMockIgnore("javax.management.*")
+public class
+EncounterFeedWorkerTest {
@Mock
private HttpClient httpClient;
@@ -32,9 +34,6 @@ public class EncounterFeedWorkerTest {
@Mock
private OpenMRSEncounter openMRSEncounter;
- @Mock
- private Logger logger;
-
@Mock
private LoginDAOImpl loginDAO;
@@ -60,9 +59,7 @@ public void setUp() throws Exception {
whenNew(SiteInformationDAOImpl.class).withNoArguments().thenReturn(siteInformationDAO);
whenNew(AuditingService.class).withArguments(loginDAO, siteInformationDAO).thenReturn(auditingService);
- when(LogManager.getLogger(EncounterFeedWorker.class)).thenReturn(logger);
when(openMRSEncounter.getEncounterUuid()).thenReturn("encounter uuid");
- doNothing().when(logger).info("Processing encounter with ID='encounter uuid'");
when(auditingService.getSysUserId()).thenReturn("1");
}