diff --git a/pom.xml b/pom.xml
index 458c7664e1..eb8390c58f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
11
3
0
- 2
+ 3
1
UTF-8
diff --git a/src/main/java/org/openelisglobal/analysis/service/AnalysisService.java b/src/main/java/org/openelisglobal/analysis/service/AnalysisService.java
index 434b04bb5a..989725665e 100644
--- a/src/main/java/org/openelisglobal/analysis/service/AnalysisService.java
+++ b/src/main/java/org/openelisglobal/analysis/service/AnalysisService.java
@@ -215,4 +215,6 @@ List getStudyAnalysisForSiteBetweenResultDates(String referringSiteId,
int getCountOfAnalysisCompletedOnByStatusId(Date completedDate, List statusIds);
int getCountOfAnalysisStartedOnByStatusId(Date startedDate, List statusIds);
+
+ String getMethodId(Analysis analysis);
}
diff --git a/src/main/java/org/openelisglobal/analysis/service/AnalysisServiceImpl.java b/src/main/java/org/openelisglobal/analysis/service/AnalysisServiceImpl.java
index eee9445de7..48ea706cab 100644
--- a/src/main/java/org/openelisglobal/analysis/service/AnalysisServiceImpl.java
+++ b/src/main/java/org/openelisglobal/analysis/service/AnalysisServiceImpl.java
@@ -772,4 +772,9 @@ public int getCountOfAnalysisStartedOnByStatusId(Date startedDate, List
public List getAnalysesResultEnteredOnExcludedByStatusId(Date completedDate, Set statusIds) {
return baseObjectDAO.getAnalysesResultEnteredOnExcludedByStatusId(completedDate, statusIds);
}
+
+ @Override
+ public String getMethodId(Analysis analysis) {
+ return analysis == null ? "" : analysis.getMethod() == null ? "" : analysis.getMethod().getId();
+ }
}
diff --git a/src/main/java/org/openelisglobal/analysis/valueholder/Analysis.java b/src/main/java/org/openelisglobal/analysis/valueholder/Analysis.java
index 14b4f9ce77..809f7f07a8 100644
--- a/src/main/java/org/openelisglobal/analysis/valueholder/Analysis.java
+++ b/src/main/java/org/openelisglobal/analysis/valueholder/Analysis.java
@@ -26,6 +26,7 @@
import org.openelisglobal.common.valueholder.BaseObject;
import org.openelisglobal.common.valueholder.ValueHolder;
import org.openelisglobal.common.valueholder.ValueHolderInterface;
+import org.openelisglobal.method.valueholder.Method;
import org.openelisglobal.note.service.NoteObject;
import org.openelisglobal.note.service.NoteServiceImpl.BoundTo;
import org.openelisglobal.panel.valueholder.Panel;
@@ -81,6 +82,7 @@ public class Analysis extends BaseObject implements NoteObject {
private String sampleTypeName;
private List children;
private boolean correctedSincePatientReport;
+ private ValueHolderInterface method;
public Analysis() {
super();
@@ -90,6 +92,7 @@ public Analysis() {
parentAnalysis = new ValueHolder();
parentResult = new ValueHolder();
panel = new ValueHolder();
+ method = new ValueHolder();
}
@Override
@@ -497,4 +500,12 @@ public UUID getFhirUuid() {
public void setFhirUuid(UUID fhirUuid) {
this.fhirUuid = fhirUuid;
}
+
+ public Method getMethod() {
+ return (Method) method.getValue();
+ }
+
+ public void setMethod(Method method) {
+ this.method.setValue(method);
+ }
}
diff --git a/src/main/java/org/openelisglobal/method/valueholder/Method.java b/src/main/java/org/openelisglobal/method/valueholder/Method.java
index 6f606bb4ab..d33d9cd213 100644
--- a/src/main/java/org/openelisglobal/method/valueholder/Method.java
+++ b/src/main/java/org/openelisglobal/method/valueholder/Method.java
@@ -135,4 +135,12 @@ public Localization getLocalization() {
public void setLocalization(Localization localization) {
this.localization.setValue(localization);
}
+
+ public String getLocalizedValue() {
+ if (getLocalization() == null) {
+ return methodName;
+ } else {
+ return getLocalization().getLocalizedValue();
+ }
+ }
}
diff --git a/src/main/java/org/openelisglobal/reports/action/implementation/ReportImplementationFactory.java b/src/main/java/org/openelisglobal/reports/action/implementation/ReportImplementationFactory.java
index 87646f116d..308a1c4a90 100644
--- a/src/main/java/org/openelisglobal/reports/action/implementation/ReportImplementationFactory.java
+++ b/src/main/java/org/openelisglobal/reports/action/implementation/ReportImplementationFactory.java
@@ -137,8 +137,6 @@ public static IReportParameterSetter getParameterSetter(String report) {
return new TBOrderReport();
} else if (report.equals("Trends")) {
return new ExportTrendsByDate();
- } else if (report.equals("WHONETReport")) {
- return new WHONETReport();
} else if (report.equals("ExportWHONETReportByDate")) {
return new WHONETExportRoutineByDate();
} else if (report.equals("covidResultsReport")) {
@@ -279,8 +277,6 @@ public static IReportCreator getReportCreator(String report) {
return new MauritiusProtocolSheet();
} else if (report.equals("ExportWHONETReportByDate")) {
return new WHONETExportRoutineByDate();
- } else if (report.equals("WHONETReport")) {
- return new WHONETReport();
} else if (report.equals("covidResultsReport")) {
return new CovidResultsReport();
} else if (report.equals("statisticsReport")) {
diff --git a/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineExportReport.java b/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineExportReport.java
index c885037fb3..64145abd40 100644
--- a/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineExportReport.java
+++ b/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineExportReport.java
@@ -18,10 +18,6 @@
import net.sf.jasperreports.engine.JRField;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
-/**
- * @author pahill (pahill@uw.edu)
- * @since Mar 17, 2011
- */
public abstract class WHONETCSVRoutineExportReport extends Report implements JRDataSource {
/**
@@ -74,4 +70,4 @@ public Object getFieldValue(JRField arg0) throws JRException {
public boolean next() throws JRException {
throw new UnsupportedOperationException();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineSampleExportReport.java b/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineSampleExportReport.java
index f880768ea6..30f3182868 100644
--- a/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineSampleExportReport.java
+++ b/src/main/java/org/openelisglobal/reports/action/implementation/WHONETCSVRoutineSampleExportReport.java
@@ -21,7 +21,7 @@
import java.util.List;
import javax.xml.ws.Response;
import net.sf.jasperreports.engine.JRException;
-import org.openelisglobal.reports.action.implementation.reportBeans.WHONETRoutineColumnBuilder;
+import org.openelisglobal.reports.action.implementation.reportBeans.WHONETCSVRoutineColumnBuilder;
public abstract class WHONETCSVRoutineSampleExportReport extends WHONETCSVRoutineExportReport {
@@ -30,7 +30,7 @@ public abstract class WHONETCSVRoutineSampleExportReport extends WHONETCSVRoutin
protected List