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

Commit e9f367f

Browse files
lgallgal
authored andcommitted
Merge remote-tracking branch 'origin/development' into 3610_BAG-export-rest
# Conflicts: # sormas-api/src/main/java/de/symeda/sormas/api/user/UserRole.java
2 parents de8379e + 2e9d9c9 commit e9f367f

105 files changed

Lines changed: 2572 additions & 716 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.

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ The GitHub project has been configured to **automatically** move issues that are
110110
The Development Team is responsible to keep the tickets up to date on this board and to assign the appropriate milestone in which the work is going to be released.
111111

112112

113+
### Managing dependencies
114+
115+
For managing Java libraries as dependencies, they are managed by Maven and listed in *sormas-base/pom.xml*. The purpose of a centralized management is to have an overview of the used libraries and adjust for new versions.
116+
117+
1. **Payara modules**: Provided by Payara in *{payara-home}/glassfish/modules* and used in that version by other libs.
118+
2. **Domain libs**: Provided in Payara domain under *{payara-domain}/lib* to be usable by deployed artifacts (ear, war). They have to be listed in *sormas-base/dependencies/serverlibs.pom*. Usually for helper libraries that several artifacts need.
119+
3. **Compile dependencies**: Bundled in respective artifacts who need the dependency explicitly. Usually for dependencies singularly needed in one artifact.
120+
4. **Test libraries**: Libraries used in automated tests in one or more modules.
121+
122+
Due to the separate build management tool Gradle for *sormas-app*, there exists a redundant listing of compile dependencies in *sormas-app/app/build.gradle*.
123+
124+
113125
### Eclipse Troubleshooting
114126

115127
Unfortunatley, when using eclipse together with the Payara Tools, there are a number of deployment problems that you might run into. Examples of these include:

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
- Clone the SORMAS-Project repository and open the project in IntelliJ
5252
- make sure the under "File -> Project Structure -> Modules" all the modules (except the android app - this should not be added) are recognized, if not add the modules with +
5353
- Make sure under "File -> Settings -> Plugins" Glassfish & Ant integrations are enabled (look into the "Installed" tab)
54-
- Install the Vaadin Designer plugin
54+
- Install the Vaadin plugin (not the Vaadin Designer plugin!)
5555
- Make a copy of "build.properties.example" contained in "sormas-base", rename it to "build.properties" and set "glassfish.domain.root" to the location of the sormas domain located in the "glassfish/domains" folder inside your payara installation
5656
- Run "Maven install" on the sormas-base project
5757
- Add a Payara server to IntelliJ:

SERVER_CUSTOMIZATION.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,14 @@ The following features are currently configurable:
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.
9090
* **Documents** `DOCUMENTS`: Enables document storage.
91+
92+
## Proxy Settings
93+
Some SORMAS integrations support proxy settings:
94+
* **Patient diary interface**
95+
* **Geocoding**
96+
* **SORMAS 2 SORMAS**
97+
98+
The proxy can be configured through the following system properties which can be passed as JVM arguments to the server:
99+
* `org.jboss.resteasy.jaxrs.client.proxy.host`
100+
* `org.jboss.resteasy.jaxrs.client.proxy.port`
101+
* `org.jboss.resteasy.jaxrs.client.proxy.scheme`

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public class CaseDataDto extends PseudonymizableDto {
127127
public static final String ADDITIONAL_DETAILS = "additionalDetails";
128128
public static final String EXTERNAL_ID = "externalID";
129129
public static final String SHARED_TO_COUNTRY = "sharedToCountry";
130+
public static final String NOSOCOMIAL_OUTBREAK = "nosocomialOutbreak";
131+
public static final String INFECTION_SETTING = "infectionSetting";
130132
public static final String QUARANTINE = "quarantine";
131133
public static final String QUARANTINE_TYPE_DETAILS = "quarantineTypeDetails";
132134
public static final String QUARANTINE_FROM = "quarantineFrom";
@@ -367,6 +369,10 @@ public class CaseDataDto extends PseudonymizableDto {
367369
COUNTRY_CODE_SWITZERLAND })
368370
private String externalID;
369371
private boolean sharedToCountry;
372+
@HideForCountriesExcept
373+
private boolean nosocomialOutbreak;
374+
@HideForCountriesExcept
375+
private InfectionSetting infectionSetting;
370376
private QuarantineType quarantine;
371377
@SensitiveData
372378
private String quarantineTypeDetails;
@@ -1008,6 +1014,22 @@ public void setSharedToCountry(boolean sharedToCountry) {
10081014
this.sharedToCountry = sharedToCountry;
10091015
}
10101016

1017+
public boolean isNosocomialOutbreak() {
1018+
return nosocomialOutbreak;
1019+
}
1020+
1021+
public void setNosocomialOutbreak(boolean nosocomialOutbreak) {
1022+
this.nosocomialOutbreak = nosocomialOutbreak;
1023+
}
1024+
1025+
public InfectionSetting getInfectionSetting() {
1026+
return infectionSetting;
1027+
}
1028+
1029+
public void setInfectionSetting(InfectionSetting infectionSetting) {
1030+
this.infectionSetting = infectionSetting;
1031+
}
1032+
10111033
public QuarantineType getQuarantine() {
10121034
return quarantine;
10131035
}

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

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ public class CaseExportDto implements Serializable {
208208
private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto();
209209
private List<EmbeddedSampleExportDto> otherSamples = new ArrayList<>();
210210

211+
private Boolean nosocomialOutbreak;
212+
private InfectionSetting infectionSetting;
213+
211214
private QuarantineType quarantine;
212215
@SensitiveData
213216
private String quarantineTypeDetails;
@@ -252,6 +255,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
252255
String pointOfEntryUuid, String pointOfEntryDetails, CaseClassification caseClassification,
253256
InvestigationStatus investigationStatus, CaseOutcome outcome,
254257
FollowUpStatus followUpStatus, Date followUpUntil,
258+
Boolean nosocomialOutbreak, InfectionSetting infectionSetting,
255259
// Quarantine
256260
QuarantineType quarantine, String quarantineTypeDetails, Date quarantineFrom, Date quarantineTo,
257261
boolean quarantineOrderedVerbally, boolean quarantineOrderedOfficialDocument, Date quarantineOrderedVerballyDate,
@@ -296,6 +300,8 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
296300
this.caseClassification = caseClassification;
297301
this.investigationStatus = investigationStatus;
298302
this.outcome = outcome;
303+
this.nosocomialOutbreak = nosocomialOutbreak;
304+
this.infectionSetting = infectionSetting;
299305
this.quarantine = quarantine;
300306
this.quarantineTypeDetails = quarantineTypeDetails;
301307
this.quarantineFrom = quarantineFrom;
@@ -628,6 +634,28 @@ public CaseOutcome getOutcome() {
628634
}
629635

630636
@Order(33)
637+
@ExportTarget(caseExportTypes = {
638+
CaseExportType.CASE_SURVEILLANCE,
639+
CaseExportType.CASE_MANAGEMENT })
640+
@ExportProperty(value = CaseDataDto.NOSOCOMIAL_OUTBREAK, combined = true)
641+
@ExportGroup(ExportGroupType.ADDITIONAL)
642+
@HideForCountriesExcept
643+
public Boolean getNosocomialOutbreak() {
644+
return nosocomialOutbreak;
645+
}
646+
647+
@Order(34)
648+
@ExportTarget(caseExportTypes = {
649+
CaseExportType.CASE_SURVEILLANCE,
650+
CaseExportType.CASE_MANAGEMENT })
651+
@ExportProperty(value = CaseDataDto.INFECTION_SETTING, combined = true)
652+
@ExportGroup(ExportGroupType.ADDITIONAL)
653+
@HideForCountriesExcept
654+
public InfectionSetting getInfectionSetting() {
655+
return infectionSetting;
656+
}
657+
658+
@Order(35)
631659
@ExportTarget(caseExportTypes = {
632660
CaseExportType.CASE_SURVEILLANCE,
633661
CaseExportType.CASE_MANAGEMENT })
@@ -637,7 +665,7 @@ public QuarantineType getQuarantine() {
637665
return quarantine;
638666
}
639667

640-
@Order(34)
668+
@Order(36)
641669
@ExportTarget(caseExportTypes = {
642670
CaseExportType.CASE_SURVEILLANCE,
643671
CaseExportType.CASE_MANAGEMENT })
@@ -647,7 +675,7 @@ public String getQuarantineTypeDetails() {
647675
return quarantineTypeDetails;
648676
}
649677

650-
@Order(35)
678+
@Order(37)
651679
@ExportTarget(caseExportTypes = {
652680
CaseExportType.CASE_SURVEILLANCE,
653681
CaseExportType.CASE_MANAGEMENT })
@@ -657,7 +685,7 @@ public Date getQuarantineFrom() {
657685
return quarantineFrom;
658686
}
659687

660-
@Order(36)
688+
@Order(38)
661689
@ExportTarget(caseExportTypes = {
662690
CaseExportType.CASE_SURVEILLANCE,
663691
CaseExportType.CASE_MANAGEMENT })
@@ -667,7 +695,7 @@ public Date getQuarantineTo() {
667695
return quarantineTo;
668696
}
669697

670-
@Order(37)
698+
@Order(39)
671699
@ExportTarget(caseExportTypes = {
672700
CaseExportType.CASE_SURVEILLANCE,
673701
CaseExportType.CASE_MANAGEMENT })
@@ -680,7 +708,7 @@ public boolean isQuarantineOrderedVerbally() {
680708
return quarantineOrderedVerbally;
681709
}
682710

683-
@Order(38)
711+
@Order(40)
684712
@ExportTarget(caseExportTypes = {
685713
CaseExportType.CASE_SURVEILLANCE,
686714
CaseExportType.CASE_MANAGEMENT })
@@ -693,7 +721,7 @@ public boolean isQuarantineOrderedOfficialDocument() {
693721
return quarantineOrderedOfficialDocument;
694722
}
695723

696-
@Order(39)
724+
@Order(41)
697725
@ExportTarget(caseExportTypes = {
698726
CaseExportType.CASE_SURVEILLANCE,
699727
CaseExportType.CASE_MANAGEMENT })
@@ -706,7 +734,7 @@ public Date getQuarantineOrderedVerballyDate() {
706734
return quarantineOrderedVerballyDate;
707735
}
708736

709-
@Order(40)
737+
@Order(42)
710738
@ExportTarget(caseExportTypes = {
711739
CaseExportType.CASE_SURVEILLANCE,
712740
CaseExportType.CASE_MANAGEMENT })
@@ -719,7 +747,7 @@ public Date getQuarantineOrderedOfficialDocumentDate() {
719747
return quarantineOrderedOfficialDocumentDate;
720748
}
721749

722-
@Order(41)
750+
@Order(43)
723751
@ExportTarget(caseExportTypes = {
724752
CaseExportType.CASE_SURVEILLANCE,
725753
CaseExportType.CASE_MANAGEMENT })
@@ -732,7 +760,7 @@ public boolean isQuarantineOfficialOrderSent() {
732760
return quarantineOfficialOrderSent;
733761
}
734762

735-
@Order(42)
763+
@Order(44)
736764
@ExportTarget(caseExportTypes = {
737765
CaseExportType.CASE_SURVEILLANCE,
738766
CaseExportType.CASE_MANAGEMENT })
@@ -745,7 +773,7 @@ public Date getQuarantineOfficialOrderSentDate() {
745773
return quarantineOfficialOrderSentDate;
746774
}
747775

748-
@Order(43)
776+
@Order(45)
749777
@ExportTarget(caseExportTypes = {
750778
CaseExportType.CASE_SURVEILLANCE,
751779
CaseExportType.CASE_MANAGEMENT })
@@ -755,7 +783,7 @@ public boolean isQuarantineExtended() {
755783
return quarantineExtended;
756784
}
757785

758-
@Order(44)
786+
@Order(46)
759787
@ExportTarget(caseExportTypes = {
760788
CaseExportType.CASE_SURVEILLANCE,
761789
CaseExportType.CASE_MANAGEMENT })
@@ -765,7 +793,7 @@ public boolean isQuarantineReduced() {
765793
return quarantineReduced;
766794
}
767795

768-
@Order(45)
796+
@Order(47)
769797
@ExportTarget(caseExportTypes = {
770798
CaseExportType.CASE_SURVEILLANCE })
771799
@ExportProperty(MAX_SOURCE_CASE_CLASSIFICATION)
@@ -774,7 +802,7 @@ public CaseClassification getMaxSourceCaseClassification() {
774802
return maxSourceCaseClassification;
775803
}
776804

777-
@Order(46)
805+
@Order(48)
778806
@ExportTarget(caseExportTypes = {
779807
CaseExportType.CASE_SURVEILLANCE })
780808
@ExportProperty(ASSOCIATED_WITH_OUTBREAK)
@@ -787,7 +815,7 @@ public void setMaxSourceCaseClassification(CaseClassification maxSourceCaseClass
787815
this.maxSourceCaseClassification = maxSourceCaseClassification;
788816
}
789817

790-
@Order(47)
818+
@Order(49)
791819
@ExportTarget(caseExportTypes = {
792820
CaseExportType.CASE_SURVEILLANCE,
793821
CaseExportType.CASE_MANAGEMENT })
@@ -797,7 +825,7 @@ public YesNoUnknown getAdmittedToHealthFacility() {
797825
return admittedToHealthFacility;
798826
}
799827

800-
@Order(48)
828+
@Order(50)
801829
@ExportTarget(caseExportTypes = {
802830
CaseExportType.CASE_SURVEILLANCE,
803831
CaseExportType.CASE_MANAGEMENT })
@@ -807,7 +835,7 @@ public Date getAdmissionDate() {
807835
return admissionDate;
808836
}
809837

810-
@Order(49)
838+
@Order(51)
811839
@ExportTarget(caseExportTypes = {
812840
CaseExportType.CASE_SURVEILLANCE,
813841
CaseExportType.CASE_MANAGEMENT })
@@ -821,7 +849,7 @@ public void setDischargeDate(Date dischargeDate) {
821849
this.dischargeDate = dischargeDate;
822850
}
823851

824-
@Order(50)
852+
@Order(52)
825853
@ExportTarget(caseExportTypes = {
826854
CaseExportType.CASE_SURVEILLANCE,
827855
CaseExportType.CASE_MANAGEMENT })
@@ -835,7 +863,7 @@ public void setLeftAgainstAdvice(YesNoUnknown leftAgainstAdvice) {
835863
this.leftAgainstAdvice = leftAgainstAdvice;
836864
}
837865

838-
@Order(51)
866+
@Order(53)
839867
@ExportTarget(caseExportTypes = {
840868
CaseExportType.CASE_SURVEILLANCE,
841869
CaseExportType.CASE_MANAGEMENT })
@@ -845,7 +873,7 @@ public PresentCondition getPresentCondition() {
845873
return presentCondition;
846874
}
847875

848-
@Order(52)
876+
@Order(54)
849877
@ExportTarget(caseExportTypes = {
850878
CaseExportType.CASE_SURVEILLANCE })
851879
@ExportProperty(PersonDto.DEATH_DATE)
@@ -854,7 +882,7 @@ public Date getDeathDate() {
854882
return deathDate;
855883
}
856884

857-
@Order(53)
885+
@Order(55)
858886
@ExportTarget(caseExportTypes = {
859887
CaseExportType.CASE_SURVEILLANCE })
860888
@ExportProperty(BURIAL_INFO)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Map<PresentCondition, Long> getCaseCountPerPersonCondition(
115115

116116
Date getOldestCaseReportDate();
117117

118+
Date getOldestCaseOutcomeDate();
119+
118120
boolean isArchived(String caseUuid);
119121

120122
boolean isDeleted(String caseUuid);
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2020 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.caze;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum InfectionSetting {
21+
22+
UNKNOWN(null),
23+
AMBULATORY(null),
24+
MEDICAL_PRACTICE(AMBULATORY),
25+
OPERATIVE_1200(AMBULATORY),
26+
HOSPITAL_1300(AMBULATORY),
27+
OTHER_OUTPATIENT_FACILITY(AMBULATORY),
28+
STATIONARY(null),
29+
HOSPITAL_2100(STATIONARY),
30+
NORMAL_WARD(HOSPITAL_2100),
31+
OPERATIVE_2111(NORMAL_WARD),
32+
NOT_OPERATIVE(NORMAL_WARD),
33+
HEMATOLOGICAL_ONCOLOGY(NORMAL_WARD),
34+
CHILDREN_WARD(HOSPITAL_2100),
35+
NEONATOLOGY(HOSPITAL_2100),
36+
INTENSIVE_CARE_UNIT(HOSPITAL_2100),
37+
OTHER_STATION(HOSPITAL_2100),
38+
NURSING_HOME(STATIONARY),
39+
REHAB_FACILITY(STATIONARY),
40+
OTHER_STATIONARY_FACILITY(STATIONARY);
41+
42+
private final InfectionSetting parent;
43+
44+
InfectionSetting(InfectionSetting parent) {
45+
this.parent = parent;
46+
}
47+
48+
public InfectionSetting getParent() {
49+
return this.parent;
50+
}
51+
52+
public String toString() {
53+
String caption = I18nProperties.getEnumCaption(this);
54+
if (this.parent != null) {
55+
caption = this.parent.toString() + " / " + caption;
56+
}
57+
58+
return caption;
59+
}
60+
}

0 commit comments

Comments
 (0)