Skip to content

Commit 43da043

Browse files
authored
Merge pull request #13961 from SORMAS-Foundation/feature/13948-ast-refactor
Tests are categorised and AST structure (DrugSusceptibility) enhancement
2 parents 2d3ed0d + 3e27038 commit 43da043

19 files changed

Lines changed: 2589 additions & 170 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,7 @@ public interface Captions {
24012401
String PathogenTest_specie = "PathogenTest.specie";
24022402
String PathogenTest_specieText = "PathogenTest.specieText";
24032403
String PathogenTest_strainCallStatus = "PathogenTest.strainCallStatus";
2404+
String PathogenTest_testCategory = "PathogenTest.testCategory";
24042405
String PathogenTest_testDateTime = "PathogenTest.testDateTime";
24052406
String PathogenTest_testedDisease = "PathogenTest.testedDisease";
24062407
String PathogenTest_testedDiseaseDetails = "PathogenTest.testedDiseaseDetails";

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,12 +1925,14 @@ public interface Strings {
19251925
String promptSelfReportEpiWeekFrom = "promptSelfReportEpiWeekFrom";
19261926
String promptSelfReportEpiWeekTo = "promptSelfReportEpiWeekTo";
19271927
String promptSelfReportFreeTextSearch = "promptSelfReportFreeTextSearch";
1928+
String promptSurveillanceInterpretation = "promptSurveillanceInterpretation";
19281929
String promptSurvey = "promptSurvey";
19291930
String promptSurveyAssignedFrom = "promptSurveyAssignedFrom";
19301931
String promptSurveyAssignedTo = "promptSurveyAssignedTo";
19311932
String promptSurveyFreeTextSearch = "promptSurveyFreeTextSearch";
19321933
String promptSurveyResponseStatus = "promptSurveyResponseStatus";
19331934
String promptSurveyTokenFreeTextSearch = "promptSurveyTokenFreeTextSearch";
1935+
String promptSusceptibilityMethod = "promptSusceptibilityMethod";
19341936
String promptSystemConfigurationSearchField = "promptSystemConfigurationSearchField";
19351937
String promptTaskDateFrom = "promptTaskDateFrom";
19361938
String promptTaskDateTo = "promptTaskDateTo";
@@ -1947,6 +1949,7 @@ public interface Strings {
19471949
String promptTreatmentTextFilter = "promptTreatmentTextFilter";
19481950
String promptTypeToAdd = "promptTypeToAdd";
19491951
String promptUserSearch = "promptUserSearch";
1952+
String promptZoneDiameter = "promptZoneDiameter";
19501953
String promtSampleDataType = "promtSampleDataType";
19511954
String pseudonymizedCasesSelectedWarning = "pseudonymizedCasesSelectedWarning";
19521955
String pseudonymizedEntitiesSelectedWarning = "pseudonymizedEntitiesSelectedWarning";
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2026 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.sample;
17+
18+
import java.lang.annotation.ElementType;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
22+
23+
/**
24+
* Marks a {@link PathogenTestType} value as a legacy method that must no longer be offered when
25+
* adding a <em>new</em> pathogen test, regardless of disease — for example methods that were merged
26+
* into a broader entry (the old IgM/IgG/IgA serum antibody values, now ELISA) or superseded
27+
* (e.g. {@code CQ_VALUE_DETECTION}).
28+
*
29+
* <p>
30+
* The constant is intentionally kept rather than deleted: it is still referenced by case
31+
* classification, external-message mapping and exports, and existing tests recorded with it must
32+
* continue to display and export unchanged. Only the new-test method picker filters it out (read at
33+
* runtime by {@link PathogenTestType#isSelectableForNewTests(PathogenTestType)}); the "keep the
34+
* currently-saved value" behaviour of the form still lets such records be edited.
35+
*/
36+
@Retention(RetentionPolicy.RUNTIME)
37+
@Target(ElementType.FIELD)
38+
public @interface NotSelectableForNewTests {
39+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2026 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.sample;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
/**
21+
* Broad grouping of laboratory test methods. When adding a pathogen test the user first picks a
22+
* category, which scopes the available {@link PathogenTestType} methods to those annotated with the
23+
* matching {@link PathogenTestCategoryRel}. The seven values come from the approved
24+
* "Categories" reference sheet of the laboratory specification.
25+
*/
26+
public enum PathogenTestCategory {
27+
28+
MOLECULAR_ASSAYS,
29+
SEROLOGICAL_TESTS,
30+
ANTIGEN_DETECTION,
31+
CULTURE_AND_ISOLATION,
32+
MICROSCOPY_AND_STAINING,
33+
ANTIMICROBIAL_SUSCEPTIBILITY_TESTING,
34+
FUNCTIONAL_IMMUNE_ASSAYS;
35+
36+
@Override
37+
public String toString() {
38+
return I18nProperties.getEnumCaption(this);
39+
}
40+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2026 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.sample;
17+
18+
import java.lang.annotation.ElementType;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
22+
23+
/**
24+
* Associates a {@link PathogenTestType} value with the {@link PathogenTestCategory} it belongs to.
25+
*
26+
* <p>
27+
* Read at runtime by {@link PathogenTestType#getCategory(PathogenTestType)}; the category is derived
28+
* from the method rather than persisted, so editing an existing test re-selects its category from the
29+
* saved method. A value without this annotation has no category (e.g. the free-text {@code OTHER}).
30+
*/
31+
@Retention(RetentionPolicy.RUNTIME)
32+
@Target(ElementType.FIELD)
33+
public @interface PathogenTestCategoryRel {
34+
35+
PathogenTestCategory value();
36+
}

0 commit comments

Comments
 (0)