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

Commit cbba204

Browse files
lgallgal
authored andcommitted
Merge remote-tracking branch 'remotes/origin/development' into 2975_BAG-export-contacts
2 parents be2c453 + aa36a30 commit cbba204

604 files changed

Lines changed: 34612 additions & 14250 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/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.symeda.sormas</groupId>
44
<artifactId>sormas-base</artifactId>
5-
<version>1.51.0-SNAPSHOT</version>
5+
<version>1.52.0-SNAPSHOT</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

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/ReferenceDto.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api;
1919

20+
import de.symeda.sormas.api.utils.Required;
21+
2022
import java.io.Serializable;
2123

2224
import org.apache.commons.lang3.ObjectUtils;
@@ -26,6 +28,7 @@ public abstract class ReferenceDto implements Serializable, HasUuid, Comparable<
2628

2729
public static final String CAPTION = "caption";
2830

31+
@Required
2932
private String uuid;
3033
private String caption;
3134

sormas-api/src/main/java/de/symeda/sormas/api/campaign/CampaignDto.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public class CampaignDto extends EntityDto {
2121
public static final String START_DATE = "startDate";
2222
public static final String END_DATE = "endDate";
2323
public static final String CREATING_USER = "creatingUser";
24+
public static final String CAMPAIGN_FORM_METAS = "campaignFormMetas";
2425

2526
private String name;
2627
private String description;

sormas-api/src/main/java/de/symeda/sormas/api/campaign/diagram/CampaignDashboardElement.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
package de.symeda.sormas.api.campaign.diagram;
22

33
import java.io.Serializable;
4-
import java.util.Objects;
54

65
public class CampaignDashboardElement implements Serializable {
76

87
public static String DIAGRAM_ID = "diagramId";
98
public static String TAB_ID = "tabId";
9+
public static String SUB_TAB_ID = "subTabId";
1010
public static String ORDER = "order";
1111
public static String WIDTH = "width";
1212
public static String HEIGHT = "height";
1313

1414
private String diagramId;
1515
private String tabId;
16+
private String subTabId;
1617
private Integer order;
1718
private Integer width;
1819
private Integer height;
@@ -28,6 +29,11 @@ public CampaignDashboardElement(String diagramId, String tabId, Integer order, I
2829
this.height = height;
2930
}
3031

32+
public CampaignDashboardElement(String diagramId, String tabId, String subTabId, Integer order, Integer width, Integer height) {
33+
this(diagramId, tabId, order, width, height);
34+
this.subTabId = subTabId;
35+
}
36+
3137
public String getDiagramId() {
3238
return diagramId;
3339
}
@@ -44,6 +50,14 @@ public void setTabId(String tabId) {
4450
this.tabId = tabId;
4551
}
4652

53+
public String getSubTabId() {
54+
return subTabId;
55+
}
56+
57+
public void setSubTabId(String subTabId) {
58+
this.subTabId = subTabId;
59+
}
60+
4761
public Integer getOrder() {
4862
return order;
4963
}

sormas-api/src/main/java/de/symeda/sormas/api/campaign/diagram/CampaignDiagramDefinitionDto.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package de.symeda.sormas.api.campaign.diagram;
22

33
import de.symeda.sormas.api.EntityDto;
4+
import de.symeda.sormas.api.campaign.CampaignDto;
5+
import de.symeda.sormas.api.utils.DataHelper;
46

57
import java.util.List;
68

@@ -13,6 +15,12 @@ public class CampaignDiagramDefinitionDto extends EntityDto {
1315
private List<CampaignDiagramSeries> campaignSeriesTotal;
1416
private boolean percentageDefault;
1517

18+
public static CampaignDiagramDefinitionDto build() {
19+
CampaignDiagramDefinitionDto campaignDiagramDefinition = new CampaignDiagramDefinitionDto();
20+
campaignDiagramDefinition.setUuid(DataHelper.createUuid());
21+
return campaignDiagramDefinition;
22+
}
23+
1624
public String getDiagramId() {
1725
return diagramId;
1826
}

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/CaseCriteria.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public class CaseCriteria extends BaseCriteria implements Cloneable {
4646
public static final String MUST_HAVE_NO_GEO_COORDINATES = "mustHaveNoGeoCoordinates";
4747
public static final String MUST_BE_PORT_HEALTH_CASE_WITHOUT_FACILITY = "mustBePortHealthCaseWithoutFacility";
4848
public static final String MUST_HAVE_CASE_MANAGEMENT_DATA = "mustHaveCaseManagementData";
49-
public static final String EXCLUDE_SHARED_CASES = "excludeSharedCases";
5049
public static final String WITHOUT_RESPONSIBLE_OFFICER = "withoutResponsibleOfficer";
5150
public static final String WITH_EXTENDED_QUARANTINE = "withExtendedQuarantine";
5251
public static final String WITH_REDUCED_QUARANTINE = "withReducedQuarantine";
@@ -102,7 +101,6 @@ public class CaseCriteria extends BaseCriteria implements Cloneable {
102101
private EntityRelevanceStatus relevanceStatus;
103102
private String sourceCaseInfoLike;
104103
private Date quarantineTo;
105-
public Boolean excludeSharedCases;
106104
private Integer birthdateYYYY;
107105
private Integer birthdateMM;
108106
private Integer birthdateDD;
@@ -472,14 +470,6 @@ public void setQuarantineTo(Date quarantineTo) {
472470
this.quarantineTo = quarantineTo;
473471
}
474472

475-
public Boolean getExcludeSharedCases() {
476-
return excludeSharedCases;
477-
}
478-
479-
public void setExcludeSharedCases(Boolean excludeSharedCases) {
480-
this.excludeSharedCases = excludeSharedCases;
481-
}
482-
483473
public Integer getBirthdateYYYY() {
484474
return birthdateYYYY;
485475
}

0 commit comments

Comments
 (0)