Skip to content

Commit 367b9a2

Browse files
committed
tb specific sample and testing update
1 parent 8b97231 commit 367b9a2

12 files changed

Lines changed: 683 additions & 11 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/Disease.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public enum Disease
5858
SNAKE_BITE(true, false, false, true, false, 0, true, false, false),
5959
RUBELLA(true, false, false, true, false, 0, true, false, false),
6060
TUBERCULOSIS(true, true, true, true, false, 0, true, false, false),
61+
LATENT_TUBERCULOSIS(true, true, true, true, false, 0, true, false, false),
6162
LEPROSY(true, false, false, true, false, 0, true, false, false),
6263
LYMPHATIC_FILARIASIS(true, false, false, true, false, 0, true, false, false),
6364
BURULI_ULCER(true, false, false, true, false, 0, true, false, false),
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2024 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+
public enum BeijingGenotypeStatus {
21+
22+
BEIJING,
23+
NOBEIJING,
24+
POSSBEIJING,
25+
UNKNOWN;
26+
27+
@Override
28+
public String toString() {
29+
return I18nProperties.getEnumCaption(this);
30+
}
31+
}

sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
public enum PathogenTestType {
2626

2727
@Diseases(value = {
28-
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
28+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
2929
ANTIBODY_DETECTION,
3030
ANTIGEN_DETECTION,
3131
RAPID_TEST,
3232
@Diseases(value = {
33-
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
33+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
3434
CULTURE,
3535
@Diseases(value = {
3636
Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
@@ -57,14 +57,16 @@ public enum PathogenTestType {
5757
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
5858
DIRECT_FLUORESCENT_ANTIBODY,
5959
@Diseases(value = {
60-
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
60+
Disease.CORONAVIRUS,
61+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
6162
MICROSCOPY,
6263
@Diseases(value = {
6364
Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
6465
NEUTRALIZING_ANTIBODIES,
6566
PCR_RT_PCR,
6667
@Diseases(value = {
67-
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
68+
Disease.CORONAVIRUS,
69+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
6870
GRAM_STAIN,
6971
@Diseases(value = {
7072
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
@@ -81,6 +83,12 @@ public enum PathogenTestType {
8183
@Diseases(value = {
8284
Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
8385
TMA,
86+
IGRA,
87+
TST,
88+
BEJINGGENOTYPING,
89+
SPOLIGOTYPING,
90+
MIRU_PATTERN_CODE,
91+
ANTIBIOTIC_SUSCEPTIBILITY,
8492
MULTILOCUS_SEQUENCE_TYPING,
8593
SLIDE_AGGLUTINATION,
8694
WHOLE_GENOME_SEQUENCING,

sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
public enum SampleMaterial {
2626

2727
@Diseases(value = {
28-
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
28+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
2929
BLOOD,
3030
@Diseases(value = {
3131
Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
@@ -46,7 +46,7 @@ public enum SampleMaterial {
4646
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
4747
RECTAL_SWAB,
4848
@Diseases(value = {
49-
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
49+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS }, hide = true)
5050
CEREBROSPINAL_FLUID,
5151
@Diseases(value = {
5252
Disease.CORONAVIRUS, Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }, hide = true)
@@ -93,6 +93,7 @@ public enum SampleMaterial {
9393
@Diseases(value = {
9494
Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
9595
PLEURAL_FLUID,
96+
CLINICAL_SAMPLE,
9697
@Diseases(value = {
9798
Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
9899
PERITONEAL_FLUID,
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2024 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+
public enum SpoligotypeSpecie {
21+
22+
MYCOBATERIUM_AFRICANUM,
23+
MYCOBATERIUM_BOVIS,
24+
MYCOBATERIUM_TUBERCULOSIS,
25+
OTHER_MTBC_MEMBER,
26+
UNKNOWN,
27+
NOT_APPLICABLE;
28+
29+
@Override
30+
public String toString() {
31+
return I18nProperties.getEnumCaption(this);
32+
}
33+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2024 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.therapy;
17+
18+
import java.lang.reflect.Field;
19+
import java.util.Arrays;
20+
import java.util.List;
21+
import java.util.stream.Collectors;
22+
23+
import de.symeda.sormas.api.i18n.I18nProperties;
24+
import de.symeda.sormas.api.utils.DrugTypes;
25+
26+
public enum Drug {
27+
28+
@DrugTypes(value = {
29+
TypeOfDrug.ANTIBIOTIC })
30+
AMIKACIN,
31+
@DrugTypes(value = {
32+
TypeOfDrug.ANTIBIOTIC })
33+
BEDAQUILINE,
34+
@DrugTypes(value = {
35+
TypeOfDrug.ANTIBIOTIC })
36+
CAPREOMYCIN,
37+
@DrugTypes(value = {
38+
TypeOfDrug.ANTIBIOTIC })
39+
CIPROFLOXACIN,
40+
@DrugTypes(value = {
41+
TypeOfDrug.ANTIBIOTIC })
42+
DELAMANID,
43+
@DrugTypes(value = {
44+
TypeOfDrug.ANTIBIOTIC })
45+
ETHAMBUTOL,
46+
@DrugTypes(value = {
47+
TypeOfDrug.ANTIBIOTIC })
48+
GATIFLOXACIN,
49+
@DrugTypes(value = {
50+
TypeOfDrug.ANTIBIOTIC })
51+
ISONIAZID,
52+
@DrugTypes(value = {
53+
TypeOfDrug.ANTIBIOTIC })
54+
KANAMYCIN,
55+
@DrugTypes(value = {
56+
TypeOfDrug.ANTIBIOTIC })
57+
LEVOFLOXACIN,
58+
@DrugTypes(value = {
59+
TypeOfDrug.ANTIBIOTIC })
60+
MOXIFLOXACIN,
61+
@DrugTypes(value = {
62+
TypeOfDrug.ANTIBIOTIC })
63+
OFLOXACIN,
64+
@DrugTypes(value = {
65+
TypeOfDrug.ANTIBIOTIC })
66+
RIFAMPICIN,
67+
@DrugTypes(value = {
68+
TypeOfDrug.ANTIBIOTIC })
69+
STREPTOMYCIN;
70+
71+
@Override
72+
public String toString() {
73+
return I18nProperties.getEnumCaption(this);
74+
}
75+
76+
public static List<Drug> byTypeOfDrug(TypeOfDrug typeOfDrug) {
77+
return Arrays.stream(values()).filter(drug -> {
78+
try {
79+
Field f = Drug.class.getField(drug.name());
80+
DrugTypes ann = f.getAnnotation(DrugTypes.class);
81+
return ann != null && Arrays.asList(ann.value()).contains(typeOfDrug);
82+
} catch (NoSuchFieldException e) {
83+
return false;
84+
}
85+
}).collect(Collectors.toList());
86+
}
87+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2024 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.therapy;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum DrugSusceptibilityType {
21+
22+
NOT_APPLICABLE,
23+
RESISTANT,
24+
SUSCEPTIBLE,
25+
UNKNOWN;
26+
27+
@Override
28+
public String toString() {
29+
return I18nProperties.getEnumCaption(this);
30+
}
31+
}

sormas-api/src/main/java/de/symeda/sormas/api/therapy/TypeOfDrug.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public enum TypeOfDrug {
66

77
ANTIMICROBIAL,
88
ANTIVIRAL,
9+
ANTIBIOTIC,
910
OTHER;
1011

1112
@Override
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2024 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.utils;
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+
import de.symeda.sormas.api.therapy.TypeOfDrug;
24+
25+
@Retention(RetentionPolicy.RUNTIME)
26+
@Target(ElementType.FIELD)
27+
public @interface DrugTypes {
28+
29+
TypeOfDrug[] value() default {};
30+
}

sormas-api/src/main/resources/enum.properties

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ Disease.DIARRHEA_BLOOD = Diarrhea w/ Blood (Shigella)
498498
Disease.SNAKE_BITE = Snake Bite
499499
Disease.RUBELLA = Rubella
500500
Disease.TUBERCULOSIS = Tuberculosis
501+
Disease.LATENT_TUBERCULOSIS = Latent Tuberculosis
501502
Disease.LEPROSY = Leprosy
502503
Disease.LYMPHATIC_FILARIASIS = Lymphatic Filariasis
503504
Disease.BURULI_ULCER = Buruli Ulcer
@@ -562,6 +563,7 @@ Disease.Short.DIARRHEA_BLOOD = Diarrhea w/ Blood (Shigella)
562563
Disease.Short.SNAKE_BITE = Snake Bite
563564
Disease.Short.RUBELLA = Rubella
564565
Disease.Short.TUBERCULOSIS = TB
566+
Disease.Short.LATENT_TUBERCULOSIS = Latent Tuberculosis
565567
Disease.Short.LEPROSY = Leprosy
566568
Disease.Short.LYMPHATIC_FILARIASIS = Lymphatic Filariasis
567569
Disease.Short.BURULI_ULCER = Buruli Ulcer
@@ -1055,18 +1057,37 @@ PathogenTestType.LATEX_AGGLUTINATION = Latex Agglutination
10551057
PathogenTestType.CQ_VALUE_DETECTION = CQ Value Detection
10561058
PathogenTestType.SEQUENCING = Sequencing
10571059
PathogenTestType.TMA = Transcription-mediated amplification (TMA)
1060+
PathogenTestType.IGRA = Interferon-Gamma Release Assays
1061+
PathogenTestType.TST = Tuberculine Skin Test
1062+
PathogenTestType.BEJINGGENOTYPING = Bejing Genotyping
1063+
PathogenTestType.SPOLIGOTYPING = Spoligotyping
1064+
PathogenTestType.MIRU_PATTERN_CODE = MIRU Pattern Code
1065+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY = Antibiotic susceptibility
10581066
PathogenTestType.MULTILOCUS_SEQUENCE_TYPING = Multilocus Sequence Typing (MLST)
10591067
PathogenTestType.SLIDE_AGGLUTINATION = Slide Agglutination
10601068
PathogenTestType.WHOLE_GENOME_SEQUENCING = Whole-Genome Sequencing (WGS)
1061-
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY_TESTING = Antibiotic Susceptibility Testing (AST)
10621069
PathogenTestType.SEROGROUPING = Serogrouping
10631070

10641071
PCRTestSpecification.VARIANT_SPECIFIC = Variant specific
10651072
PCRTestSpecification.N501Y_MUTATION_DETECTION = N501Y mutation detection
10661073

1067-
PersonContactDetailType.PHONE = Phone
1074+
# BeijingGenotypeStatus
1075+
BeijingGenotypeStatus.BEIJING = Beijing
1076+
BeijingGenotypeStatus.NOBEIJING = Not Beijing
1077+
BeijingGenotypeStatus.POSSBEIJING = Possible Beijing
1078+
BeijingGenotypeStatus.UNKNOWN = Unknown
1079+
1080+
# SpoligotypeSpecie
1081+
SpoligotypeSpecie.MYCOBATERIUM_AFRICANUM = Mycobaterium Africanum
1082+
SpoligotypeSpecie.MYCOBATERIUM_BOVIS = Mycobaterium bovis
1083+
SpoligotypeSpecie.MYCOBATERIUM_TUBERCULOSIS = Mycobaterium tuberculosis
1084+
SpoligotypeSpecie.OTHER_MTBC_MEMBER = Other member of the MTBC
1085+
SpoligotypeSpecie.UNKNOWN = Unknown
1086+
SpoligotypeSpecie.NOT_APPLICABLE = NOT_APPLICABLE
1087+
1088+
PersonContactDetailType.PHONE = Phone
10681089
PersonContactDetailType.EMAIL = Email
1069-
PersonContactDetailType.OTHER = Other
1090+
PersonContactDetailType.OTHER = Other
10701091

10711092
PhoneNumberType.LANDLINE = Landline
10721093
PhoneNumberType.MOBILE = Mobile
@@ -1185,6 +1206,7 @@ SampleMaterial.ANTERIOR_NARES_SWAB=Anterior nares swab
11851206
SampleMaterial.OP_ASPIRATE=Oropharyngeal aspirate
11861207
SampleMaterial.NP_ASPIRATE=Nasopharyngeal aspirate
11871208
SampleMaterial.PLEURAL_FLUID=Pleural fluid specimen
1209+
SampleMaterial.CLINICAL_SAMPLE=Clinical sample
11881210
SampleMaterial.PERITONEAL_FLUID = Peritoneal Fluid
11891211
SampleMaterial.SYNOVIAL_FLUID = Synovial Fluid
11901212
# SampleSource
@@ -1432,8 +1454,25 @@ TypeOfAnimal.OTHER=Other
14321454
# TypeOfDrug
14331455
TypeOfDrug.ANTIMICROBIAL = Antimicrobial
14341456
TypeOfDrug.ANTIVIRAL = Antiviral
1457+
TypeOfDrug.ANTIBIOTIC = Antibiotic
14351458
TypeOfDrug.OTHER = Other
14361459

1460+
# Drug
1461+
Drug.AMIKACIN = Amikacin
1462+
Drug.BEDAQUILINE = Bedaquiline
1463+
Drug.CAPREOMYCIN = Capreomycin
1464+
Drug.CIPROFLOXACIN = Ciprofloxacin
1465+
Drug.DELAMANID = Delamanid
1466+
Drug.ETHAMBUTOL = Ethambutol
1467+
Drug.GATIFLOXACIN = Gatifloxacin
1468+
Drug.ISONIAZID = Isoniazid
1469+
Drug.KANAMYCIN = Kanamycin
1470+
Drug.LEVOFLOXACIN = Levofloxacin
1471+
Drug.MOXIFLOXACIN = Moxifloxacin
1472+
Drug.OFLOXACIN = Ofloxacin
1473+
Drug.RIFAMPICIN = Rifampicin
1474+
Drug.STREPTOMYCIN =Streptomycin
1475+
14371476
# TypeOfPlace
14381477
TypeOfPlace.FACILITY = Facility
14391478
TypeOfPlace.FACILITY_23_IFSG = Facility (§ 23 IfSG)

0 commit comments

Comments
 (0)