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

Commit d64cbc3

Browse files
lgallgal
authored andcommitted
Merge remote-tracking branch 'origin/development' into 3409_prohibition-to-work-fields
# Conflicts: # sormas-api/src/main/resources/captions.properties # sormas-api/src/main/resources/captions_de-DE.properties # sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java # sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java # sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java # sormas-app/app/src/main/res/layout/fragment_case_read_layout.xml # sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java # sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java # sormas-backend/src/main/resources/sql/sormas_schema.sql
2 parents 7c4fbc0 + d05ea4f commit d64cbc3

83 files changed

Lines changed: 2250 additions & 649 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:

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";
@@ -371,6 +373,10 @@ public class CaseDataDto extends PseudonymizableDto {
371373
COUNTRY_CODE_SWITZERLAND })
372374
private String externalID;
373375
private boolean sharedToCountry;
376+
@HideForCountriesExcept
377+
private boolean nosocomialOutbreak;
378+
@HideForCountriesExcept
379+
private InfectionSetting infectionSetting;
374380
private QuarantineType quarantine;
375381
@SensitiveData
376382
private String quarantineTypeDetails;
@@ -1019,6 +1025,22 @@ public void setSharedToCountry(boolean sharedToCountry) {
10191025
this.sharedToCountry = sharedToCountry;
10201026
}
10211027

1028+
public boolean isNosocomialOutbreak() {
1029+
return nosocomialOutbreak;
1030+
}
1031+
1032+
public void setNosocomialOutbreak(boolean nosocomialOutbreak) {
1033+
this.nosocomialOutbreak = nosocomialOutbreak;
1034+
}
1035+
1036+
public InfectionSetting getInfectionSetting() {
1037+
return infectionSetting;
1038+
}
1039+
1040+
public void setInfectionSetting(InfectionSetting infectionSetting) {
1041+
this.infectionSetting = infectionSetting;
1042+
}
1043+
10221044
public QuarantineType getQuarantine() {
10231045
return quarantine;
10241046
}

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
@@ -206,6 +206,9 @@ public class CaseExportDto implements Serializable {
206206
private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto();
207207
private List<EmbeddedSampleExportDto> otherSamples = new ArrayList<>();
208208

209+
private Boolean nosocomialOutbreak;
210+
private InfectionSetting infectionSetting;
211+
209212
private QuarantineType quarantine;
210213
@SensitiveData
211214
private String quarantineTypeDetails;
@@ -250,6 +253,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
250253
String pointOfEntryUuid, String pointOfEntryDetails, CaseClassification caseClassification,
251254
InvestigationStatus investigationStatus, CaseOutcome outcome,
252255
FollowUpStatus followUpStatus, Date followUpUntil,
256+
Boolean nosocomialOutbreak, InfectionSetting infectionSetting,
253257
// Quarantine
254258
QuarantineType quarantine, String quarantineTypeDetails, Date quarantineFrom, Date quarantineTo,
255259
boolean quarantineOrderedVerbally, boolean quarantineOrderedOfficialDocument, Date quarantineOrderedVerballyDate,
@@ -293,6 +297,8 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
293297
this.caseClassification = caseClassification;
294298
this.investigationStatus = investigationStatus;
295299
this.outcome = outcome;
300+
this.nosocomialOutbreak = nosocomialOutbreak;
301+
this.infectionSetting = infectionSetting;
296302
this.quarantine = quarantine;
297303
this.quarantineTypeDetails = quarantineTypeDetails;
298304
this.quarantineFrom = quarantineFrom;
@@ -624,6 +630,28 @@ public CaseOutcome getOutcome() {
624630
}
625631

626632
@Order(33)
633+
@ExportTarget(caseExportTypes = {
634+
CaseExportType.CASE_SURVEILLANCE,
635+
CaseExportType.CASE_MANAGEMENT })
636+
@ExportProperty(value = CaseDataDto.NOSOCOMIAL_OUTBREAK, combined = true)
637+
@ExportGroup(ExportGroupType.ADDITIONAL)
638+
@HideForCountriesExcept
639+
public Boolean getNosocomialOutbreak() {
640+
return nosocomialOutbreak;
641+
}
642+
643+
@Order(34)
644+
@ExportTarget(caseExportTypes = {
645+
CaseExportType.CASE_SURVEILLANCE,
646+
CaseExportType.CASE_MANAGEMENT })
647+
@ExportProperty(value = CaseDataDto.INFECTION_SETTING, combined = true)
648+
@ExportGroup(ExportGroupType.ADDITIONAL)
649+
@HideForCountriesExcept
650+
public InfectionSetting getInfectionSetting() {
651+
return infectionSetting;
652+
}
653+
654+
@Order(35)
627655
@ExportTarget(caseExportTypes = {
628656
CaseExportType.CASE_SURVEILLANCE,
629657
CaseExportType.CASE_MANAGEMENT })
@@ -633,7 +661,7 @@ public QuarantineType getQuarantine() {
633661
return quarantine;
634662
}
635663

636-
@Order(34)
664+
@Order(36)
637665
@ExportTarget(caseExportTypes = {
638666
CaseExportType.CASE_SURVEILLANCE,
639667
CaseExportType.CASE_MANAGEMENT })
@@ -643,7 +671,7 @@ public String getQuarantineTypeDetails() {
643671
return quarantineTypeDetails;
644672
}
645673

646-
@Order(35)
674+
@Order(37)
647675
@ExportTarget(caseExportTypes = {
648676
CaseExportType.CASE_SURVEILLANCE,
649677
CaseExportType.CASE_MANAGEMENT })
@@ -653,7 +681,7 @@ public Date getQuarantineFrom() {
653681
return quarantineFrom;
654682
}
655683

656-
@Order(36)
684+
@Order(38)
657685
@ExportTarget(caseExportTypes = {
658686
CaseExportType.CASE_SURVEILLANCE,
659687
CaseExportType.CASE_MANAGEMENT })
@@ -663,7 +691,7 @@ public Date getQuarantineTo() {
663691
return quarantineTo;
664692
}
665693

666-
@Order(37)
694+
@Order(39)
667695
@ExportTarget(caseExportTypes = {
668696
CaseExportType.CASE_SURVEILLANCE,
669697
CaseExportType.CASE_MANAGEMENT })
@@ -676,7 +704,7 @@ public boolean isQuarantineOrderedVerbally() {
676704
return quarantineOrderedVerbally;
677705
}
678706

679-
@Order(38)
707+
@Order(40)
680708
@ExportTarget(caseExportTypes = {
681709
CaseExportType.CASE_SURVEILLANCE,
682710
CaseExportType.CASE_MANAGEMENT })
@@ -689,7 +717,7 @@ public boolean isQuarantineOrderedOfficialDocument() {
689717
return quarantineOrderedOfficialDocument;
690718
}
691719

692-
@Order(39)
720+
@Order(41)
693721
@ExportTarget(caseExportTypes = {
694722
CaseExportType.CASE_SURVEILLANCE,
695723
CaseExportType.CASE_MANAGEMENT })
@@ -702,7 +730,7 @@ public Date getQuarantineOrderedVerballyDate() {
702730
return quarantineOrderedVerballyDate;
703731
}
704732

705-
@Order(40)
733+
@Order(42)
706734
@ExportTarget(caseExportTypes = {
707735
CaseExportType.CASE_SURVEILLANCE,
708736
CaseExportType.CASE_MANAGEMENT })
@@ -715,7 +743,7 @@ public Date getQuarantineOrderedOfficialDocumentDate() {
715743
return quarantineOrderedOfficialDocumentDate;
716744
}
717745

718-
@Order(41)
746+
@Order(43)
719747
@ExportTarget(caseExportTypes = {
720748
CaseExportType.CASE_SURVEILLANCE,
721749
CaseExportType.CASE_MANAGEMENT })
@@ -728,7 +756,7 @@ public boolean isQuarantineOfficialOrderSent() {
728756
return quarantineOfficialOrderSent;
729757
}
730758

731-
@Order(42)
759+
@Order(44)
732760
@ExportTarget(caseExportTypes = {
733761
CaseExportType.CASE_SURVEILLANCE,
734762
CaseExportType.CASE_MANAGEMENT })
@@ -741,7 +769,7 @@ public Date getQuarantineOfficialOrderSentDate() {
741769
return quarantineOfficialOrderSentDate;
742770
}
743771

744-
@Order(43)
772+
@Order(45)
745773
@ExportTarget(caseExportTypes = {
746774
CaseExportType.CASE_SURVEILLANCE,
747775
CaseExportType.CASE_MANAGEMENT })
@@ -751,7 +779,7 @@ public boolean isQuarantineExtended() {
751779
return quarantineExtended;
752780
}
753781

754-
@Order(44)
782+
@Order(46)
755783
@ExportTarget(caseExportTypes = {
756784
CaseExportType.CASE_SURVEILLANCE,
757785
CaseExportType.CASE_MANAGEMENT })
@@ -761,7 +789,7 @@ public boolean isQuarantineReduced() {
761789
return quarantineReduced;
762790
}
763791

764-
@Order(45)
792+
@Order(47)
765793
@ExportTarget(caseExportTypes = {
766794
CaseExportType.CASE_SURVEILLANCE })
767795
@ExportProperty(MAX_SOURCE_CASE_CLASSIFICATION)
@@ -770,7 +798,7 @@ public CaseClassification getMaxSourceCaseClassification() {
770798
return maxSourceCaseClassification;
771799
}
772800

773-
@Order(46)
801+
@Order(48)
774802
@ExportTarget(caseExportTypes = {
775803
CaseExportType.CASE_SURVEILLANCE })
776804
@ExportProperty(ASSOCIATED_WITH_OUTBREAK)
@@ -783,7 +811,7 @@ public void setMaxSourceCaseClassification(CaseClassification maxSourceCaseClass
783811
this.maxSourceCaseClassification = maxSourceCaseClassification;
784812
}
785813

786-
@Order(47)
814+
@Order(49)
787815
@ExportTarget(caseExportTypes = {
788816
CaseExportType.CASE_SURVEILLANCE,
789817
CaseExportType.CASE_MANAGEMENT })
@@ -793,7 +821,7 @@ public YesNoUnknown getAdmittedToHealthFacility() {
793821
return admittedToHealthFacility;
794822
}
795823

796-
@Order(48)
824+
@Order(50)
797825
@ExportTarget(caseExportTypes = {
798826
CaseExportType.CASE_SURVEILLANCE,
799827
CaseExportType.CASE_MANAGEMENT })
@@ -803,7 +831,7 @@ public Date getAdmissionDate() {
803831
return admissionDate;
804832
}
805833

806-
@Order(49)
834+
@Order(51)
807835
@ExportTarget(caseExportTypes = {
808836
CaseExportType.CASE_SURVEILLANCE,
809837
CaseExportType.CASE_MANAGEMENT })
@@ -817,7 +845,7 @@ public void setDischargeDate(Date dischargeDate) {
817845
this.dischargeDate = dischargeDate;
818846
}
819847

820-
@Order(50)
848+
@Order(52)
821849
@ExportTarget(caseExportTypes = {
822850
CaseExportType.CASE_SURVEILLANCE,
823851
CaseExportType.CASE_MANAGEMENT })
@@ -831,7 +859,7 @@ public void setLeftAgainstAdvice(YesNoUnknown leftAgainstAdvice) {
831859
this.leftAgainstAdvice = leftAgainstAdvice;
832860
}
833861

834-
@Order(51)
862+
@Order(53)
835863
@ExportTarget(caseExportTypes = {
836864
CaseExportType.CASE_SURVEILLANCE,
837865
CaseExportType.CASE_MANAGEMENT })
@@ -841,7 +869,7 @@ public PresentCondition getPresentCondition() {
841869
return presentCondition;
842870
}
843871

844-
@Order(52)
872+
@Order(54)
845873
@ExportTarget(caseExportTypes = {
846874
CaseExportType.CASE_SURVEILLANCE })
847875
@ExportProperty(PersonDto.DEATH_DATE)
@@ -850,7 +878,7 @@ public Date getDeathDate() {
850878
return deathDate;
851879
}
852880

853-
@Order(53)
881+
@Order(55)
854882
@ExportTarget(caseExportTypes = {
855883
CaseExportType.CASE_SURVEILLANCE })
856884
@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)