Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 318fa83

Browse files
committed
Merge branch 'development' into 2644-populationDataInCampaignDiagrams
# Conflicts: # sormas-api/src/main/resources/strings.properties
2 parents c5bc4cd + b878a59 commit 318fa83

485 files changed

Lines changed: 32793 additions & 13267 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.

SERVER_CUSTOMIZATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following properties are currently configurable:
1919
* **EPID prefix** `country.epidprefix`: SORMAS automatically generates EPID numbers for new cases. This is the prefix your country is using for all of these numbers. Most of the time it will be some sort of country code and should be three characters long.
2020
* **Country center/zoom** `country.center.latitude`, `country.center.longitude` and `map.zoom`: These are the geo coordinates of the geographical center of the country or region you're using SORMAS in. Used to set the initial location of the maps used in dashboards and statistics.
2121
* **App URL** `app.url`: The directory on your server where the mobile .apk file is stored that is used to automatically update the Android app after a new release. You should be able to copy the example given in the properties file and only have to replace the SERVER-NAME placeholder.
22-
* **File paths** `temp.path`, `generated.path` and `custom.path`: The folders that SORMAS stores files in, either temporarily during case export or permanently like import templates. Files in temp.path are automatically deleted at midnight. Files in custom.path can be used to customize the login page, e.g. to provide default logins for demo servers or add additional contributors to the right sidebar.
22+
* **File paths** `documents.path`, `temp.path`, `generated.path` and `custom.path`: The folders that SORMAS stores files in, either temporarily during case export or permanently like import templates or documents. Files in temp.path are automatically deleted at midnight. Files in custom.path can be used to customize the login page, e.g. to provide default logins for demo servers or add additional contributors to the right sidebar.
2323
* **Automatic case classification** `feature.automaticcaseclassification`: Determines whether SORMAS automatically classifies cases based on a number of criteria that are defined in the code.
2424
* **Email settings** `email.sender.address` and `email.sender.name`: The email address and sender name that should be used when SORMAS is sending out emails, e.g. to notify users about specific events.
2525
* **SMS settings** `sms.sender.name, sms.auth.key and sms.auth.secret`: Besides emails, SORMAS also supports sending automatic SMS to users at the same time (e.g. when a case has been classified as confirmed). The SMS provider SORMAS is using is the Vonage SMS API (https://www.vonage.com/communications-apis/sms/). If you have an account there, you can use your key and secret here to enable sending out SMS. Leaving these properties empty will disable this feature.
@@ -87,3 +87,4 @@ The following features are currently configurable:
8787
* **Area Infrastructure** `INFRASTRUCTURE_TYPE_AREA`: Enables an additional infrastructure level above region that is called area by default. Currently only used in the campaigns module.
8888
* **Case Follow-Up** `CASE_FOLLOWUP`: Enables the contact follow-up module for cases as well to allow a more detailed daily documentation of symptoms.
8989
* **Line Listing** `LINE_LISTING`: Whether or not using line listing for case entry is enabled in the specified jurisdiction for the specified disease. Configurable from the UI, no database interaction needed.
90+
* **Documents** `DOCUMENTS`: Enables document storage.

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
/*******************************************************************************
1+
/*
22
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3-
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4-
*
3+
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
54
* This program is free software: you can redistribute it and/or modify
65
* it under the terms of the GNU General Public License as published by
76
* the Free Software Foundation, either version 3 of the License, or
87
* (at your option) any later version.
9-
*
108
* This program is distributed in the hope that it will be useful,
119
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1210
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1311
* GNU General Public License for more details.
14-
*
1512
* You should have received a copy of the GNU General Public License
1613
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17-
*******************************************************************************/
14+
*/
1815
package de.symeda.sormas.api;
1916

2017
import javax.ejb.Remote;
@@ -50,6 +47,8 @@ public interface ConfigFacade {
5047

5148
String getSmsAuthSecret();
5249

50+
String getDocumentFilesPath();
51+
5352
String getTempFilesPath();
5453

5554
String getGeneratedFilesPath();
@@ -113,4 +112,7 @@ public interface ConfigFacade {
113112
boolean isExternalJournalActive();
114113

115114
int getDashboardMapMarkerLimit();
115+
116+
boolean isSmsServiceSetUp();
117+
116118
}

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
/*******************************************************************************
1+
/*
22
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3-
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4-
*
3+
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
54
* This program is free software: you can redistribute it and/or modify
65
* it under the terms of the GNU General Public License as published by
76
* the Free Software Foundation, either version 3 of the License, or
87
* (at your option) any later version.
9-
*
108
* This program is distributed in the hope that it will be useful,
119
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1210
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1311
* GNU General Public License for more details.
14-
*
1512
* You should have received a copy of the GNU General Public License
1613
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17-
*******************************************************************************/
14+
*/
1815
package de.symeda.sormas.api;
1916

2017
import javax.naming.InitialContext;
@@ -37,6 +34,7 @@
3734
import de.symeda.sormas.api.disease.DiseaseConfigurationFacade;
3835
import de.symeda.sormas.api.disease.DiseaseFacade;
3936
import de.symeda.sormas.api.docgeneneration.QuarantineOrderFacade;
37+
import de.symeda.sormas.api.document.DocumentFacade;
4038
import de.symeda.sormas.api.epidata.EpiDataFacade;
4139
import de.symeda.sormas.api.event.EventFacade;
4240
import de.symeda.sormas.api.event.EventParticipantFacade;
@@ -54,6 +52,7 @@
5452
import de.symeda.sormas.api.person.PersonFacade;
5553
import de.symeda.sormas.api.region.AreaFacade;
5654
import de.symeda.sormas.api.region.CommunityFacade;
55+
import de.symeda.sormas.api.region.CountryFacade;
5756
import de.symeda.sormas.api.region.DistrictFacade;
5857
import de.symeda.sormas.api.region.GeoShapeProvider;
5958
import de.symeda.sormas.api.region.RegionFacade;
@@ -158,6 +157,9 @@ public static FacilityFacade getFacilityFacade() {
158157
return get().lookupEjbRemote(FacilityFacade.class);
159158
}
160159

160+
public static CountryFacade getCountryFacade() {
161+
return get().lookupEjbRemote(CountryFacade.class);
162+
}
161163
public static RegionFacade getRegionFacade() {
162164
return get().lookupEjbRemote(RegionFacade.class);
163165
}
@@ -310,11 +312,15 @@ public static QuarantineOrderFacade getQuarantineOrderFacade() {
310312
return get().lookupEjbRemote(QuarantineOrderFacade.class);
311313
}
312314

313-
public static ExternalJournalFacade getExternalJournalFacade() {
315+
public static ExternalJournalFacade getExternalJournalFacade() {
314316
return get().lookupEjbRemote(ExternalJournalFacade.class);
315-
}
317+
}
318+
319+
public static DocumentFacade getDocumentFacade() {
320+
return get().lookupEjbRemote(DocumentFacade.class);
321+
}
316322

317-
@SuppressWarnings("unchecked")
323+
@SuppressWarnings("unchecked")
318324
public <P> P lookupEjbRemote(Class<P> clazz) {
319325
try {
320326
return (P) get().ic.lookup(buildJndiLookupName(clazz));

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseClassification.java

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,23 @@ public enum CaseClassification
2424
implements
2525
StatisticsGroupingKey {
2626

27-
NOT_CLASSIFIED,
28-
SUSPECT,
29-
PROBABLE,
30-
CONFIRMED,
31-
CONFIRMED_NO_SYMPTOMS,
32-
CONFIRMED_UNKNOWN_SYMPTOMS,
33-
NO_CASE;
27+
NOT_CLASSIFIED(1),
28+
SUSPECT(2),
29+
PROBABLE(3),
30+
CONFIRMED(6),
31+
CONFIRMED_NO_SYMPTOMS(4),
32+
CONFIRMED_UNKNOWN_SYMPTOMS(5),
33+
NO_CASE(0);
34+
35+
/**
36+
* Severity of the case classification; confirmed has the highest severity in terms of the classification process
37+
* while no_case has the lowest.
38+
*/
39+
private final int severity;
40+
41+
CaseClassification(int severity) {
42+
this.severity = severity;
43+
}
3444

3545
public String getName() {
3646
return this.name();
@@ -57,4 +67,8 @@ public int keyCompareTo(StatisticsGroupingKey o) {
5767

5868
return this.toString().compareTo(o.toString());
5969
}
70+
71+
public int getSeverity() {
72+
return severity;
73+
}
6074
}

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public CaseReferenceDto toReference() {
505505
* Returns true if the case is an original point of entry case and has not yet
506506
* been assigned a health facility.
507507
*/
508-
public boolean isUnreferredPortHealthCase() {
508+
public boolean checkIsUnreferredPortHealthCase() {
509509
return caseOrigin == CaseOrigin.POINT_OF_ENTRY && healthFacility == null;
510510
}
511511

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java

Lines changed: 39 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public class CaseExportDto implements Serializable {
8585
public static final String ADDRESS_REGION = "addressRegion";
8686
public static final String ADDRESS_COMMUNITY = "addressCommunity";
8787
public static final String ADDRESS_GPS_COORDINATES = "addressGpsCoordinates";
88+
public static final String BURIAL_ATTENDED = "burialAttended";
8889
public static final String TRAVELED = "traveled";
8990
public static final String TRAVEL_HISTORY = "travelHistory";
9091
public static final String NUMBER_OF_PRESCRIPTIONS = "numberOfPrescriptions";
@@ -181,14 +182,14 @@ public class CaseExportDto implements Serializable {
181182
private String facility;
182183
@SensitiveData
183184
private String phone;
185+
@SensitiveData
186+
private String emailAddress;
184187
private String occupationType;
185188
private String educationType;
186189
private String travelHistory;
187-
private YesNoUnknown traveled;
188-
private YesNoUnknown burialAttended;
189-
private YesNoUnknown directContactConfirmedCase;
190-
private YesNoUnknown directContactProbableCase;
191-
private YesNoUnknown contactWithRodent;
190+
private boolean traveled;
191+
private boolean burialAttended;
192+
private YesNoUnknown contactWithSourceCaseKnown;
192193
private SymptomsDto symptoms;
193194
// private Date onsetDate;
194195
// private String symptoms;
@@ -258,9 +259,8 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
258259
Date deathDate, Date burialDate, BurialConductor burialConductor, String burialPlaceDescription,
259260
String addressRegion, String addressDistrict, String addressCommunity, String city, String street, String houseNumber, String additionalInformation, String postalCode,
260261
String facility, String facilityUuid, String facilityDetails,
261-
String phone, String phoneOwner, EducationType educationType, String educationDetails,
262-
OccupationType occupationType, String occupationDetails, YesNoUnknown traveled,
263-
YesNoUnknown burialAttended, YesNoUnknown directContactConfirmedCase, YesNoUnknown directContactProbableCase, YesNoUnknown contactWithRodent,
262+
String phone, String phoneOwner, String emailAddress, EducationType educationType, String educationDetails,
263+
OccupationType occupationType, String occupationDetails, YesNoUnknown contactWithSourceCaseKnown,
264264
//Date onsetDate,
265265
Vaccination vaccination, String vaccinationDoses, Date vaccinationDate,
266266
VaccinationInfoSource vaccinationInfoSource, YesNoUnknown postpartum, Trimester trimester,
@@ -324,13 +324,10 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
324324
this.postalCode = postalCode;
325325
this.facility = FacilityHelper.buildFacilityString(facilityUuid, facility, facilityDetails);
326326
this.phone = PersonHelper.buildPhoneString(phone, phoneOwner);
327+
this.emailAddress = emailAddress;
327328
this.educationType = PersonHelper.buildEducationString(educationType, educationDetails);
328329
this.occupationType = PersonHelper.buildOccupationString(occupationType, occupationDetails);
329-
this.traveled = traveled;
330-
this.burialAttended = burialAttended;
331-
this.directContactConfirmedCase = directContactConfirmedCase;
332-
this.directContactProbableCase = directContactProbableCase;
333-
this.contactWithRodent = contactWithRodent;
330+
this.contactWithSourceCaseKnown = contactWithSourceCaseKnown;
334331
// this.onsetDate = onsetDate;
335332
this.vaccination = vaccination;
336333
this.vaccinationDoses = vaccinationDoses;
@@ -973,6 +970,16 @@ public String getPhone() {
973970
}
974971

975972
@Order(75)
973+
@ExportTarget(caseExportTypes = {
974+
CaseExportType.CASE_SURVEILLANCE,
975+
CaseExportType.CASE_MANAGEMENT })
976+
@ExportProperty(PersonDto.EMAIL_ADDRESS)
977+
@ExportGroup(ExportGroupType.SENSITIVE)
978+
public String getEmailAddress() {
979+
return emailAddress;
980+
}
981+
982+
@Order(76)
976983
@ExportTarget(caseExportTypes = {
977984
CaseExportType.CASE_SURVEILLANCE,
978985
CaseExportType.CASE_MANAGEMENT })
@@ -986,7 +993,7 @@ public void setEducationType(String educationType) {
986993
this.educationType = educationType;
987994
}
988995

989-
@Order(76)
996+
@Order(77)
990997
@ExportTarget(caseExportTypes = {
991998
CaseExportType.CASE_SURVEILLANCE,
992999
CaseExportType.CASE_MANAGEMENT })
@@ -996,20 +1003,20 @@ public String getOccupationType() {
9961003
return occupationType;
9971004
}
9981005

999-
@Order(77)
1006+
@Order(78)
10001007
@ExportTarget(caseExportTypes = {
10011008
CaseExportType.CASE_SURVEILLANCE })
10021009
@ExportProperty(TRAVELED)
10031010
@ExportGroup(ExportGroupType.EPIDEMIOLOGICAL)
1004-
public YesNoUnknown getTraveled() {
1011+
public boolean isTraveled() {
10051012
return traveled;
10061013
}
10071014

1008-
public void setTraveled(YesNoUnknown traveled) {
1015+
public void setTraveled(boolean traveled) {
10091016
this.traveled = traveled;
10101017
}
10111018

1012-
@Order(78)
1019+
@Order(79)
10131020
@ExportTarget(caseExportTypes = {
10141021
CaseExportType.CASE_SURVEILLANCE })
10151022
@ExportProperty(TRAVEL_HISTORY)
@@ -1018,52 +1025,30 @@ public String getTravelHistory() {
10181025
return travelHistory;
10191026
}
10201027

1021-
@Order(79)
1028+
@Order(80)
10221029
@ExportTarget(caseExportTypes = {
10231030
CaseExportType.CASE_SURVEILLANCE })
1024-
@ExportProperty(EpiDataDto.BURIAL_ATTENDED)
1031+
@ExportProperty(BURIAL_ATTENDED)
10251032
@ExportGroup(ExportGroupType.EPIDEMIOLOGICAL)
1026-
public YesNoUnknown getBurialAttended() {
1033+
public boolean isBurialAttended() {
10271034
return burialAttended;
10281035
}
10291036

1030-
public void setBurialAttended(YesNoUnknown burialAttended) {
1037+
public void setBurialAttended(boolean burialAttended) {
10311038
this.burialAttended = burialAttended;
10321039
}
10331040

1034-
@Order(80)
1035-
@ExportTarget(caseExportTypes = {
1036-
CaseExportType.CASE_SURVEILLANCE })
1037-
@ExportProperty(EpiDataDto.DIRECT_CONTACT_CONFIRMED_CASE)
1038-
@ExportGroup(ExportGroupType.EPIDEMIOLOGICAL)
1039-
public YesNoUnknown getDirectContactConfirmedCase() {
1040-
return directContactConfirmedCase;
1041-
}
1042-
1043-
public void setDirectContactConfirmedCase(YesNoUnknown directContactConfirmedCase) {
1044-
this.directContactConfirmedCase = directContactConfirmedCase;
1045-
}
1046-
1047-
@Order(90)
1041+
@Order(81)
10481042
@ExportTarget(caseExportTypes = {
10491043
CaseExportType.CASE_SURVEILLANCE })
1050-
@ExportProperty(EpiDataDto.DIRECT_CONTACT_PROBABLE_CASE)
1044+
@ExportProperty(EpiDataDto.CONTACT_WITH_SOURCE_CASE_KNOWN)
10511045
@ExportGroup(ExportGroupType.EPIDEMIOLOGICAL)
1052-
public YesNoUnknown getDirectContactProbableCase() {
1053-
return directContactProbableCase;
1054-
}
1055-
1056-
public void setDirectContactProbableCase(YesNoUnknown directContactProbableCase) {
1057-
this.directContactProbableCase = directContactProbableCase;
1046+
public YesNoUnknown getContactWithSourceCaseKnown() {
1047+
return contactWithSourceCaseKnown;
10581048
}
10591049

1060-
@Order(91)
1061-
@ExportTarget(caseExportTypes = {
1062-
CaseExportType.CASE_SURVEILLANCE })
1063-
@ExportProperty(EpiDataDto.RODENTS)
1064-
@ExportGroup(ExportGroupType.EPIDEMIOLOGICAL)
1065-
public YesNoUnknown getContactWithRodent() {
1066-
return contactWithRodent;
1050+
public void setContactWithSourceCaseKnown(YesNoUnknown contactWithSourceCaseKnown) {
1051+
this.contactWithSourceCaseKnown = contactWithSourceCaseKnown;
10671052
}
10681053

10691054
@Order(92)
@@ -1497,6 +1482,10 @@ public void setPhone(String phone) {
14971482
this.phone = phone;
14981483
}
14991484

1485+
public void setEmailAddress(String emailAddress) {
1486+
this.emailAddress = emailAddress;
1487+
}
1488+
15001489
public void setOccupationType(String occupationType) {
15011490
this.occupationType = occupationType;
15021491
}
@@ -1505,10 +1494,6 @@ public void setTravelHistory(String travelHistory) {
15051494
this.travelHistory = travelHistory;
15061495
}
15071496

1508-
public void setContactWithRodent(YesNoUnknown contactWithRodent) {
1509-
this.contactWithRodent = contactWithRodent;
1510-
}
1511-
15121497
public void setInitialDetectionPlace(String initialDetectionPlace) {
15131498
this.initialDetectionPlace = initialDetectionPlace;
15141499
}
@@ -1529,10 +1514,6 @@ public void setVaccinationInfoSource(VaccinationInfoSource vaccinationInfoSource
15291514
this.vaccinationInfoSource = vaccinationInfoSource;
15301515
}
15311516

1532-
// public void setOnsetDate(Date onsetDate) {
1533-
// this.onsetDate = onsetDate;
1534-
// }
1535-
15361517
public void setSymptoms(SymptomsDto symptoms) {
15371518
this.symptoms = symptoms;
15381519
}

sormas-api/src/main/java/de/symeda/sormas/api/caze/classification/CaseClassificationFacade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
@Remote
3131
public interface CaseClassificationFacade {
3232

33-
CaseClassification getClassification(CaseDataDto caze, List<PathogenTestDto> sampleTests);
33+
CaseClassification getClassification(CaseDataDto caze, List<PathogenTestDto> pathogenTests);
3434

3535
DiseaseClassificationCriteriaDto getByDisease(Disease disease);
3636

0 commit comments

Comments
 (0)