map = new HashMap<>();
+
+ map.put(Property.ALPHANUM_ACCESSION_PREFIX.getName(),
+ form.getAlphanumPrefix() != null ? form.getAlphanumPrefix().toUpperCase() : "");
+ map.put(Property.AccessionFormat.getName(), form.getLabNumberType().name());
+ map.put(Property.USE_ALPHANUM_ACCESSION_PREFIX.getName(), form.getUsePrefix().toString());
+ siteInformationService.updateSiteInformationByName(map);
+
+ ConfigurationProperties.forceReload();
+ return form;
+ }
}
diff --git a/src/main/java/org/openelisglobal/admin/form/LabNumberManagementForm.java b/src/main/java/org/openelisglobal/admin/form/LabNumberManagementForm.java
index 743a26d362..50823a25a1 100644
--- a/src/main/java/org/openelisglobal/admin/form/LabNumberManagementForm.java
+++ b/src/main/java/org/openelisglobal/admin/form/LabNumberManagementForm.java
@@ -6,35 +6,35 @@
public class LabNumberManagementForm {
- private AccessionFormat labNumberType;
+ private AccessionFormat labNumberType;
- private Boolean usePrefix;
+ private Boolean usePrefix;
- @Length(max = 5, min = 0)
- @SafeHtml
- private String alphanumPrefix;
+ @Length(max = 5, min = 0)
+ @SafeHtml
+ private String alphanumPrefix;
- public AccessionFormat getLabNumberType() {
- return labNumberType;
- }
+ public AccessionFormat getLabNumberType() {
+ return labNumberType;
+ }
- public void setLabNumberType(AccessionFormat labNumberType) {
- this.labNumberType = labNumberType;
- }
+ public void setLabNumberType(AccessionFormat labNumberType) {
+ this.labNumberType = labNumberType;
+ }
- public Boolean getUsePrefix() {
- return usePrefix;
- }
+ public Boolean getUsePrefix() {
+ return usePrefix;
+ }
- public void setUsePrefix(Boolean usePrefix) {
- this.usePrefix = usePrefix;
- }
+ public void setUsePrefix(Boolean usePrefix) {
+ this.usePrefix = usePrefix;
+ }
- public String getAlphanumPrefix() {
- return alphanumPrefix;
- }
+ public String getAlphanumPrefix() {
+ return alphanumPrefix;
+ }
- public void setAlphanumPrefix(String alphanumPrefix) {
- this.alphanumPrefix = alphanumPrefix;
- }
+ public void setAlphanumPrefix(String alphanumPrefix) {
+ this.alphanumPrefix = alphanumPrefix;
+ }
}
diff --git a/src/main/java/org/openelisglobal/analysis/dao/AnalysisDAO.java b/src/main/java/org/openelisglobal/analysis/dao/AnalysisDAO.java
index f08123c375..2e0fc53883 100644
--- a/src/main/java/org/openelisglobal/analysis/dao/AnalysisDAO.java
+++ b/src/main/java/org/openelisglobal/analysis/dao/AnalysisDAO.java
@@ -31,234 +31,214 @@
/**
* @author diane benz
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
+ *
+ * To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public interface AnalysisDAO extends BaseDAO {
- // boolean insertData(Analysis analysis, boolean duplicateCheck) throws LIMSRuntimeException;
+ // boolean insertData(Analysis analysis, boolean duplicateCheck) throws
+ // LIMSRuntimeException;
- //
- // void deleteData(List analysiss) throws LIMSRuntimeException;
+ //
+ // void deleteData(List analysiss) throws LIMSRuntimeException;
- //
- // List getAllAnalyses() throws LIMSRuntimeException;
+ //
+ // List getAllAnalyses() throws LIMSRuntimeException;
- //
- // List getPageOfAnalyses(int startingRecNo) throws LIMSRuntimeException;
+ //
+ // List getPageOfAnalyses(int startingRecNo) throws LIMSRuntimeException;
- void getData(Analysis analysis) throws LIMSRuntimeException;
+ void getData(Analysis analysis) throws LIMSRuntimeException;
- // void updateData(Analysis analysis) throws LIMSRuntimeException;
+ // void updateData(Analysis analysis) throws LIMSRuntimeException;
- //
- // List getAnalyses(String filter) throws LIMSRuntimeException;
+ //
+ // List getAnalyses(String filter) throws LIMSRuntimeException;
- //
+ //
- //
- //
+ //
+ //
- //
- // List getAllAnalysesPerTest(Test test) throws LIMSRuntimeException;
+ //
+ // List getAllAnalysesPerTest(Test test) throws LIMSRuntimeException;
- List getAllAnalysisByTestAndStatus(String testId, List statusIdList)
- throws LIMSRuntimeException;
+ List getAllAnalysisByTestAndStatus(String testId, List statusIdList) throws LIMSRuntimeException;
- List getAllAnalysisByTestsAndStatus(List testIdList, List statusIdList)
- throws LIMSRuntimeException;
+ List getAllAnalysisByTestsAndStatus(List testIdList, List statusIdList)
+ throws LIMSRuntimeException;
- List getAllAnalysisByTestAndExcludedStatus(String testId, List statusIdList)
- throws LIMSRuntimeException;
+ List getAllAnalysisByTestAndExcludedStatus(String testId, List statusIdList)
+ throws LIMSRuntimeException;
- List getAllAnalysisByTestSectionAndStatus(
- String testSectionId, List statusIdList, boolean sortedByDateAndAccession)
- throws LIMSRuntimeException;
+ List getAllAnalysisByTestSectionAndStatus(String testSectionId, List statusIdList,
+ boolean sortedByDateAndAccession) throws LIMSRuntimeException;
- List getAllAnalysisByTestSectionAndExcludedStatus(
- String testSectionId, List statusIdList) throws LIMSRuntimeException;
+ List getAllAnalysisByTestSectionAndExcludedStatus(String testSectionId, List statusIdList)
+ throws LIMSRuntimeException;
- List getAnalysesBySampleItem(SampleItem sampleItem) throws LIMSRuntimeException;
+ List getAnalysesBySampleItem(SampleItem sampleItem) throws LIMSRuntimeException;
- List getAnalysesBySampleItemsExcludingByStatusIds(
- SampleItem sampleItem, Set statusIds) throws LIMSRuntimeException;
+ List getAnalysesBySampleItemsExcludingByStatusIds(SampleItem sampleItem, Set statusIds)
+ throws LIMSRuntimeException;
- List getAnalysesBySampleStatusId(String statusId) throws LIMSRuntimeException;
+ List getAnalysesBySampleStatusId(String statusId) throws LIMSRuntimeException;
- List getAnalysesBySampleStatusIdExcludingByStatusId(
- String statusId, Set statusIds) throws LIMSRuntimeException;
+ List getAnalysesBySampleStatusIdExcludingByStatusId(String statusId, Set statusIds)
+ throws LIMSRuntimeException;
- List getAnalysesReadyToBeReported() throws LIMSRuntimeException;
+ List getAnalysesReadyToBeReported() throws LIMSRuntimeException;
- List getAllChildAnalysesByResult(Result result) throws LIMSRuntimeException;
+ List getAllChildAnalysesByResult(Result result) throws LIMSRuntimeException;
- List getMaxRevisionAnalysesReadyToBeReported() throws LIMSRuntimeException;
+ List getMaxRevisionAnalysesReadyToBeReported() throws LIMSRuntimeException;
- List getMaxRevisionAnalysesReadyForReportPreviewBySample(List accessionNumbers)
- throws LIMSRuntimeException;
+ List getMaxRevisionAnalysesReadyForReportPreviewBySample(List accessionNumbers)
+ throws LIMSRuntimeException;
- List getAnalysesAlreadyReportedBySample(Sample sample) throws LIMSRuntimeException;
+ List getAnalysesAlreadyReportedBySample(Sample sample) throws LIMSRuntimeException;
- List getMaxRevisionAnalysesBySample(SampleItem sampleItem) throws LIMSRuntimeException;
+ List getMaxRevisionAnalysesBySample(SampleItem sampleItem) throws LIMSRuntimeException;
- List getMaxRevisionAnalysesBySampleIncludeCanceled(SampleItem sampleItem)
- throws LIMSRuntimeException;
+ List getMaxRevisionAnalysesBySampleIncludeCanceled(SampleItem sampleItem) throws LIMSRuntimeException;
- List getRevisionHistoryOfAnalysesBySample(SampleItem sampleItem)
- throws LIMSRuntimeException;
+ List getRevisionHistoryOfAnalysesBySample(SampleItem sampleItem) throws LIMSRuntimeException;
- List getRevisionHistoryOfAnalysesBySampleAndTest(
- SampleItem sampleItem, Test test, boolean includeLatestRevision) throws LIMSRuntimeException;
+ List getRevisionHistoryOfAnalysesBySampleAndTest(SampleItem sampleItem, Test test,
+ boolean includeLatestRevision) throws LIMSRuntimeException;
- List getAllMaxRevisionAnalysesPerTest(Test test) throws LIMSRuntimeException;
+ List getAllMaxRevisionAnalysesPerTest(Test test) throws LIMSRuntimeException;
- List getMaxRevisionPendingAnalysesReadyToBeReportedBySample(Sample sample)
- throws LIMSRuntimeException;
+ List getMaxRevisionPendingAnalysesReadyToBeReportedBySample(Sample sample) throws LIMSRuntimeException;
- List getMaxRevisionPendingAnalysesReadyForReportPreviewBySample(Sample sample)
- throws LIMSRuntimeException;
+ List getMaxRevisionPendingAnalysesReadyForReportPreviewBySample(Sample sample)
+ throws LIMSRuntimeException;
- Analysis getPreviousAnalysisForAmendedAnalysis(Analysis analysis) throws LIMSRuntimeException;
+ Analysis getPreviousAnalysisForAmendedAnalysis(Analysis analysis) throws LIMSRuntimeException;
- void getMaxRevisionAnalysisBySampleAndTest(Analysis analysis) throws LIMSRuntimeException;
+ void getMaxRevisionAnalysisBySampleAndTest(Analysis analysis) throws LIMSRuntimeException;
- List getMaxRevisionParentTestAnalysesBySample(SampleItem sampleItem)
- throws LIMSRuntimeException;
+ List getMaxRevisionParentTestAnalysesBySample(SampleItem sampleItem) throws LIMSRuntimeException;
- List getAnalysesForStatusId(String statusId) throws LIMSRuntimeException;
+ List getAnalysesForStatusId(String statusId) throws LIMSRuntimeException;
- List getAnalysisStartedOnExcludedByStatusId(Date collectionDate, Set statusIds)
- throws LIMSRuntimeException;
+ List getAnalysisStartedOnExcludedByStatusId(Date collectionDate, Set statusIds)
+ throws LIMSRuntimeException;
- List getAnalysisStartedOn(Date collectionDate) throws LIMSRuntimeException;
+ List getAnalysisStartedOn(Date collectionDate) throws LIMSRuntimeException;
- List getAnalysisCollectedOnExcludedByStatusId(
- Date collectionDate, Set statusIds) throws LIMSRuntimeException;
+ List getAnalysisCollectedOnExcludedByStatusId(Date collectionDate, Set statusIds)
+ throws LIMSRuntimeException;
- List getAnalysisCollectedOn(Date collectionDate) throws LIMSRuntimeException;
+ List getAnalysisCollectedOn(Date collectionDate) throws LIMSRuntimeException;
- List getAnalysesBySampleId(String id) throws LIMSRuntimeException;
+ List getAnalysesBySampleId(String id) throws LIMSRuntimeException;
- List getAnalysesBySampleIdExcludedByStatusId(String id, Set statusIds)
- throws LIMSRuntimeException;
+ List getAnalysesBySampleIdExcludedByStatusId(String id, Set statusIds)
+ throws LIMSRuntimeException;
- List getAnalysisBySampleAndTestIds(String sampleKey, List testIds);
+ List getAnalysisBySampleAndTestIds(String sampleKey, List testIds);
- List getAnalysesBySampleIdTestIdAndStatusId(
- List sampleIdList, List testIdList, List statusIdList);
+ List getAnalysesBySampleIdTestIdAndStatusId(List sampleIdList, List testIdList,
+ List statusIdList);
- // Analysis getPatientPreviousAnalysisForTestName(Patient patient, Sample currentSample, String
- // testName);
+ // Analysis getPatientPreviousAnalysisForTestName(Patient patient, Sample
+ // currentSample, String
+ // testName);
- List getAnalysisByTestSectionAndCompletedDateRange(
- String sectionID, Date lowDate, Date highDate) throws LIMSRuntimeException;
+ List getAnalysisByTestSectionAndCompletedDateRange(String sectionID, Date lowDate, Date highDate)
+ throws LIMSRuntimeException;
- List getAnalysisStartedOrCompletedInDateRange(Date lowDate, Date highDate)
- throws LIMSRuntimeException;
+ List getAnalysisStartedOrCompletedInDateRange(Date lowDate, Date highDate) throws LIMSRuntimeException;
- List getAnalysisByTestIdAndTestSectionIdsAndStartedInDateRange(
- Date lowDate, Date highDate, String testId, List testSectionIds)
- throws LIMSRuntimeException;
+ List getAnalysisByTestIdAndTestSectionIdsAndStartedInDateRange(Date lowDate, Date highDate, String testId,
+ List testSectionIds) throws LIMSRuntimeException;
- List getAllAnalysisByTestSectionAndStatus(
- String testSectionId, List analysisStatusList, List sampleStatusList)
- throws LIMSRuntimeException;
+ List getAllAnalysisByTestSectionAndStatus(String testSectionId, List analysisStatusList,
+ List sampleStatusList) throws LIMSRuntimeException;
- List getAnalysisStartedOnRangeByStatusId(Date lowDate, Date highDate, String statusID)
- throws LIMSRuntimeException;
+ List getAnalysisStartedOnRangeByStatusId(Date lowDate, Date highDate, String statusID)
+ throws LIMSRuntimeException;
- List getAnalysisCompleteInRange(Timestamp lowDate, Timestamp highDate)
- throws LIMSRuntimeException;
+ List getAnalysisCompleteInRange(Timestamp lowDate, Timestamp highDate) throws LIMSRuntimeException;
- List getAnalysisEnteredAfterDate(Timestamp latestCollectionDate)
- throws LIMSRuntimeException;
+ List getAnalysisEnteredAfterDate(Timestamp latestCollectionDate) throws LIMSRuntimeException;
- List getAnalysisByAccessionAndTestId(String accessionNumber, String testId)
- throws LIMSRuntimeException;
+ List getAnalysisByAccessionAndTestId(String accessionNumber, String testId) throws LIMSRuntimeException;
- List getAnalysesBySampleIdAndStatusId(String id, Set analysisStatusIds)
- throws LIMSRuntimeException;
+ List getAnalysesBySampleIdAndStatusId(String id, Set analysisStatusIds)
+ throws LIMSRuntimeException;
- List getAnalysisByTestNamesAndCompletedDateRange(
- List testNames, Date lowDate, Date highDate) throws LIMSRuntimeException;
+ List getAnalysisByTestNamesAndCompletedDateRange(List testNames, Date lowDate, Date highDate)
+ throws LIMSRuntimeException;
- List getAnalysesBySampleItemIdAndStatusId(String sampleItemId, String statusId)
- throws LIMSRuntimeException;
+ List getAnalysesBySampleItemIdAndStatusId(String sampleItemId, String statusId)
+ throws LIMSRuntimeException;
- List getAnalysisByTestDescriptionAndCompletedDateRange(
- List descriptions, Date sqlDayOne, Date sqlDayTwo) throws LIMSRuntimeException;
+ List getAnalysisByTestDescriptionAndCompletedDateRange(List descriptions, Date sqlDayOne,
+ Date sqlDayTwo) throws LIMSRuntimeException;
- Analysis getAnalysisById(String analysisId) throws LIMSRuntimeException;
+ Analysis getAnalysisById(String analysisId) throws LIMSRuntimeException;
- List getAllAnalysisByTestsAndStatus(
- List testIds, List analysisStatusList, List sampleStatusList);
+ List getAllAnalysisByTestsAndStatus(List testIds, List analysisStatusList,
+ List sampleStatusList);
- @Override
- List get(List value);
+ @Override
+ List get(List value);
- List getAllAnalysisByTestsAndStatusAndCompletedDateRange(
- List testIdList,
- List analysisStatusList,
- List sampleStatusList,
- Date lowDate,
- Date highDate);
+ List getAllAnalysisByTestsAndStatusAndCompletedDateRange(List testIdList,
+ List analysisStatusList, List sampleStatusList, Date lowDate, Date highDate);
- List getAllAnalysisByTestsAndStatusAndCompletedDateRange(
- List nfsTestIdList, List statusList, Date lowDate, Date highDate);
+ List getAllAnalysisByTestsAndStatusAndCompletedDateRange(List nfsTestIdList,
+ List statusList, Date lowDate, Date highDate);
- List getPageAnalysisByTestSectionAndStatus(
- String testSectionId, List analysisStatusList, List sampleStatusList);
+ List getPageAnalysisByTestSectionAndStatus(String testSectionId, List analysisStatusList,
+ List sampleStatusList);
- int getCountAnalysisByTestSectionAndStatus(
- String testSectionId, List analysisStatusList, List sampleStatusList);
- // void updateData(Analysis analysis, boolean skipAuditTrail) throws LIMSRuntimeException;
+ int getCountAnalysisByTestSectionAndStatus(String testSectionId, List analysisStatusList,
+ List sampleStatusList);
+ // void updateData(Analysis analysis, boolean skipAuditTrail) throws
+ // LIMSRuntimeException;
- List getPageAnalysisByTestSectionAndStatus(
- String testSectionId, List statusIdList, boolean sortedByDateAndAccession)
- throws LIMSRuntimeException;
+ List getPageAnalysisByTestSectionAndStatus(String testSectionId, List statusIdList,
+ boolean sortedByDateAndAccession) throws LIMSRuntimeException;
- List getPageAnalysisAtAccessionNumberAndStatus(
- String accessionNumber, List statusIdList, boolean sortedByDateAndAccession)
- throws LIMSRuntimeException;
+ List getPageAnalysisAtAccessionNumberAndStatus(String accessionNumber, List statusIdList,
+ boolean sortedByDateAndAccession) throws LIMSRuntimeException;
- int getCountAnalysisByTestSectionAndStatus(
- String testSectionId, List analysisStatusList);
+ int getCountAnalysisByTestSectionAndStatus(String testSectionId, List analysisStatusList);
- int getCountAnalysisByStatusFromAccession(
- List analysisStatusList, List sampleStatusList, String accessionNumber);
+ int getCountAnalysisByStatusFromAccession(List analysisStatusList, List sampleStatusList,
+ String accessionNumber);
- List getPageAnalysisByStatusFromAccession(
- List