Skip to content

Commit dbe3977

Browse files
committed
merge development
2 parents f34e18c + ad687f0 commit dbe3977

59 files changed

Lines changed: 2565 additions & 559 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/sormas_app_ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ jobs:
111111
with:
112112
api-level: ${{ matrix.api-level }}
113113
arch: x86_64
114+
# Could be decreased to 2048M
115+
ram-size: 4096M
116+
heap-size: 512M
114117
force-avd-creation: false
115118
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
116119
disable-animations: false
@@ -121,6 +124,9 @@ jobs:
121124
with:
122125
api-level: ${{ matrix.api-level }}
123126
arch: x86_64
127+
# Could be decreased to 2048M
128+
ram-size: 4096M
129+
heap-size: 512M
124130
force-avd-creation: false
125131
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
126132
disable-animations: true

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ public enum Disease
9494
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false, true, 1, 10),
9595
GIARDIASIS(true, true, true, false, true, 14, false, false, false, true, 7, 21),
9696
CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false, true, 2, 12),
97+
SHIGELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 7),
98+
SALMONELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 3),
9799
OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0),
98100
UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0);
99101

sormas-api/src/main/java/de/symeda/sormas/api/activityascase/ActivityAsCaseType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public enum ActivityAsCaseType {
4141
@HideForCountriesExcept
4242
CARED_FOR,
4343
OTHER,
44+
BLOOD_DONATION,
45+
BONE_MARROW_DONATION,
4446
UNKNOWN;
4547

4648
@Override

sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java

Lines changed: 142 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ public class EpiDataDto extends PseudonymizableDto {
7070
public static final String IMPORTED_CASE = "importedCase";
7171
public static final String COUNTRY = "country";
7272
public static final String OTHER_DETAILS = "otherDetails";
73+
public static final String AIRPORT_WORKER = "airportWorker";
74+
public static final String HEALTHCARE_PROFESSIONAL = "healthcareProfessional";
75+
public static final String PLACE_OF_INFECTION = "placeOfInfection";
76+
public static final String RESIDENCE_AT_ONSET = "residenceAtOnset";
77+
public static final String EXPOSURE_INVESTIGATION_FROM_DATE = "exposureInvestigationFromDate";
78+
public static final String EXPOSURE_INVESTIGATION_TO_DATE = "exposureInvestigationToDate";
79+
public static final String ACTIVITY_AS_CASE_FROM_DATE = "activityAsCaseFromDate";
80+
public static final String ACTIVITY_AS_CASE_TO_DATE = "activityAsCaseToDate";
7381

7482
private YesNoUnknown exposureDetailsKnown;
7583
private YesNoUnknown activityAsCaseDetailsKnown;
@@ -81,7 +89,8 @@ public class EpiDataDto extends PseudonymizableDto {
8189
private CaseImportedStatus caseImportedStatus;
8290

8391
@Diseases({
84-
Disease.GIARDIASIS })
92+
Disease.GIARDIASIS,
93+
Disease.SALMONELLOSIS })
8594
private YesNoUnknown importedCase;
8695

8796
@HideForCountriesExcept(countries = {
@@ -114,12 +123,14 @@ public class EpiDataDto extends PseudonymizableDto {
114123

115124
@Diseases({
116125
Disease.GIARDIASIS,
117-
Disease.CRYPTOSPORIDIOSIS })
126+
Disease.CRYPTOSPORIDIOSIS,
127+
Disease.MALARIA })
118128
private ModeOfTransmission modeOfTransmission;
119129

120130
@Diseases({
121131
Disease.GIARDIASIS,
122-
Disease.CRYPTOSPORIDIOSIS })
132+
Disease.CRYPTOSPORIDIOSIS,
133+
Disease.MALARIA })
123134
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
124135
private String modeOfTransmissionType;
125136

@@ -133,7 +144,8 @@ public class EpiDataDto extends PseudonymizableDto {
133144
private String infectionSourceText;
134145

135146
@Diseases({
136-
Disease.GIARDIASIS })
147+
Disease.GIARDIASIS,
148+
Disease.SALMONELLOSIS })
137149
private CountryReferenceDto country;
138150

139151
@Valid
@@ -143,6 +155,50 @@ public class EpiDataDto extends PseudonymizableDto {
143155
private List<ActivityAsCaseDto> activitiesAsCase = new ArrayList<>();
144156

145157
private String otherDetails;
158+
// airport worker should be applicable for all countries and diseases.
159+
@Diseases
160+
@HideForCountriesExcept
161+
private YesNoUnknown airportWorker;
162+
@Diseases({
163+
Disease.MALARIA })
164+
@HideForCountriesExcept(countries = {
165+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
166+
private YesNoUnknown healthcareProfessional;
167+
168+
@Diseases({
169+
Disease.DENGUE })
170+
@HideForCountriesExcept(countries = {
171+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
172+
@Size(max = 255, message = Validations.textTooLong)
173+
private String placeOfInfection;
174+
175+
@Diseases({
176+
Disease.DENGUE })
177+
@HideForCountriesExcept(countries = {
178+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
179+
@Size(max = 255, message = Validations.textTooLong)
180+
private String residenceAtOnset;
181+
182+
@Diseases({
183+
Disease.SALMONELLOSIS })
184+
@HideForCountriesExcept(countries = {
185+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
186+
private Date exposureInvestigationFromDate;
187+
@Diseases({
188+
Disease.SALMONELLOSIS })
189+
@HideForCountriesExcept(countries = {
190+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
191+
private Date exposureInvestigationToDate;
192+
@Diseases({
193+
Disease.SALMONELLOSIS })
194+
@HideForCountriesExcept(countries = {
195+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
196+
private Date activityAsCaseFromDate;
197+
@Diseases({
198+
Disease.SALMONELLOSIS })
199+
@HideForCountriesExcept(countries = {
200+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
201+
private Date activityAsCaseToDate;
146202

147203
public YesNoUnknown getExposureDetailsKnown() {
148204
return exposureDetailsKnown;
@@ -305,6 +361,88 @@ public void setOtherDetails(String otherDetails) {
305361
this.otherDetails = otherDetails;
306362
}
307363

364+
public YesNoUnknown getAirportWorker() {
365+
return airportWorker;
366+
}
367+
368+
public void setAirportWorker(YesNoUnknown airportWorker) {
369+
this.airportWorker = airportWorker;
370+
}
371+
372+
public YesNoUnknown getHealthcareProfessional() {
373+
return healthcareProfessional;
374+
}
375+
376+
public void setHealthcareProfessional(YesNoUnknown healthcareProfessional) {
377+
this.healthcareProfessional = healthcareProfessional;
378+
}
379+
380+
public String getPlaceOfInfection() {
381+
return placeOfInfection;
382+
}
383+
384+
public void setPlaceOfInfection(String placeOfInfection) {
385+
this.placeOfInfection = placeOfInfection;
386+
}
387+
388+
public String getResidenceAtOnset() {
389+
return residenceAtOnset;
390+
}
391+
392+
public void setResidenceAtOnset(String residenceAtOnset) {
393+
this.residenceAtOnset = residenceAtOnset;
394+
}
395+
396+
public Date getExposureInvestigationFromDate() {
397+
return exposureInvestigationFromDate;
398+
}
399+
400+
public void setExposureInvestigationFromDate(Date exposureInvestigationFromDate) {
401+
validateDateRange(
402+
exposureInvestigationFromDate,
403+
this.exposureInvestigationToDate,
404+
"exposureInvestigationFromDate",
405+
"exposureInvestigationToDate");
406+
this.exposureInvestigationFromDate = exposureInvestigationFromDate;
407+
}
408+
409+
public Date getExposureInvestigationToDate() {
410+
return exposureInvestigationToDate;
411+
}
412+
413+
public void setExposureInvestigationToDate(Date exposureInvestigationToDate) {
414+
validateDateRange(
415+
this.exposureInvestigationFromDate,
416+
exposureInvestigationToDate,
417+
"exposureInvestigationFromDate",
418+
"exposureInvestigationToDate");
419+
this.exposureInvestigationToDate = exposureInvestigationToDate;
420+
}
421+
422+
public Date getActivityAsCaseFromDate() {
423+
return activityAsCaseFromDate;
424+
}
425+
426+
public void setActivityAsCaseFromDate(Date activityAsCaseFromDate) {
427+
validateDateRange(activityAsCaseFromDate, this.activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate");
428+
this.activityAsCaseFromDate = activityAsCaseFromDate;
429+
}
430+
431+
public Date getActivityAsCaseToDate() {
432+
return activityAsCaseToDate;
433+
}
434+
435+
public void setActivityAsCaseToDate(Date activityAsCaseToDate) {
436+
validateDateRange(this.activityAsCaseFromDate, activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate");
437+
this.activityAsCaseToDate = activityAsCaseToDate;
438+
}
439+
440+
private static void validateDateRange(Date from, Date to, String fromName, String toName) {
441+
if (from != null && to != null && from.after(to)) {
442+
throw new IllegalArgumentException(fromName + " must be before or equal to " + toName);
443+
}
444+
}
445+
308446
@Override
309447
public EpiDataDto clone() throws CloneNotSupportedException {
310448
EpiDataDto clone = (EpiDataDto) super.clone();
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+
*/
9+
10+
package de.symeda.sormas.api.exposure;
11+
12+
import de.symeda.sormas.api.i18n.I18nProperties;
13+
14+
public enum EatingOutVenue {
15+
16+
CANTEENS,
17+
FOOD_SERVED_ON_BOARD,
18+
GAS_STATIONS,
19+
STREET_VENDORS,
20+
FOOD_COURTS,
21+
CAFES_OR_TEA_ROOMS,
22+
SANDWICH_SHOPS_BAKERIES_DELICATESSENS,
23+
CAFETERIAS_OR_BARS,
24+
KEBAB_FALAFEL_SNACK_SHOPS,
25+
BURGER_RESTAURANTS,
26+
FAST_FOOD_SNACK_BARS,
27+
PIZZERIAS,
28+
ASIAN_RESTAURANTS,
29+
HOTELS,
30+
TAKEAWAY_FOOD,
31+
BUFFET_STYLE_RESTAURANTS,
32+
FOOD_AT_EVENTS,
33+
OTHER;
34+
35+
@Override
36+
public String toString() {
37+
return I18nProperties.getEnumCaption(this);
38+
}
39+
}

sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureCategory.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ public enum ExposureCategory {
2828
FOOD_BORNE,
2929
VECTOR_BORNE,
3030
VERTICAL_TRANSMISSION,
31-
WATER_BORNE;
31+
WATER_BORNE,
32+
MEDICAL_CARE,
33+
LAB,
34+
OTHER;
3235

3336
public boolean hasNoSetting() {
34-
return EnumSet.of(ANIMAL_CONTACT, FOMITE_TRANSMISSION, FOOD_BORNE).contains(this);
37+
return EnumSet.of(ANIMAL_CONTACT, FOMITE_TRANSMISSION, FOOD_BORNE, MEDICAL_CARE, LAB, OTHER).contains(this);
3538
}
3639

3740
public boolean hasNoSubSetting() {

0 commit comments

Comments
 (0)