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

Commit

Permalink
Merge remote-tracking branch 'origin/development' into 3610_BAG-expor…
Browse files Browse the repository at this point in the history
…t-rest

# Conflicts:
#	sormas-api/src/main/java/de/symeda/sormas/api/user/UserRole.java
  • Loading branch information
lgal authored and lgal committed Dec 9, 2020
2 parents de8379e + 2e9d9c9 commit e9f367f
Show file tree
Hide file tree
Showing 105 changed files with 2,572 additions and 716 deletions.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,18 @@ The GitHub project has been configured to **automatically** move issues that are
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.


### Managing dependencies

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.

1. **Payara modules**: Provided by Payara in *{payara-home}/glassfish/modules* and used in that version by other libs.
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.
3. **Compile dependencies**: Bundled in respective artifacts who need the dependency explicitly. Usually for dependencies singularly needed in one artifact.
4. **Test libraries**: Libraries used in automated tests in one or more modules.

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*.


### Eclipse Troubleshooting

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:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
- Clone the SORMAS-Project repository and open the project in IntelliJ
- 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 +
- Make sure under "File -> Settings -> Plugins" Glassfish & Ant integrations are enabled (look into the "Installed" tab)
- Install the Vaadin Designer plugin
- Install the Vaadin plugin (not the Vaadin Designer plugin!)
- 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
- Run "Maven install" on the sormas-base project
- Add a Payara server to IntelliJ:
Expand Down
11 changes: 11 additions & 0 deletions SERVER_CUSTOMIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,14 @@ The following features are currently configurable:
* **Case Follow-Up** `CASE_FOLLOWUP`: Enables the contact follow-up module for cases as well to allow a more detailed daily documentation of symptoms.
* **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.
* **Documents** `DOCUMENTS`: Enables document storage.

## Proxy Settings
Some SORMAS integrations support proxy settings:
* **Patient diary interface**
* **Geocoding**
* **SORMAS 2 SORMAS**

The proxy can be configured through the following system properties which can be passed as JVM arguments to the server:
* `org.jboss.resteasy.jaxrs.client.proxy.host`
* `org.jboss.resteasy.jaxrs.client.proxy.port`
* `org.jboss.resteasy.jaxrs.client.proxy.scheme`
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ public class CaseDataDto extends PseudonymizableDto {
public static final String ADDITIONAL_DETAILS = "additionalDetails";
public static final String EXTERNAL_ID = "externalID";
public static final String SHARED_TO_COUNTRY = "sharedToCountry";
public static final String NOSOCOMIAL_OUTBREAK = "nosocomialOutbreak";
public static final String INFECTION_SETTING = "infectionSetting";
public static final String QUARANTINE = "quarantine";
public static final String QUARANTINE_TYPE_DETAILS = "quarantineTypeDetails";
public static final String QUARANTINE_FROM = "quarantineFrom";
Expand Down Expand Up @@ -367,6 +369,10 @@ public class CaseDataDto extends PseudonymizableDto {
COUNTRY_CODE_SWITZERLAND })
private String externalID;
private boolean sharedToCountry;
@HideForCountriesExcept
private boolean nosocomialOutbreak;
@HideForCountriesExcept
private InfectionSetting infectionSetting;
private QuarantineType quarantine;
@SensitiveData
private String quarantineTypeDetails;
Expand Down Expand Up @@ -1008,6 +1014,22 @@ public void setSharedToCountry(boolean sharedToCountry) {
this.sharedToCountry = sharedToCountry;
}

public boolean isNosocomialOutbreak() {
return nosocomialOutbreak;
}

public void setNosocomialOutbreak(boolean nosocomialOutbreak) {
this.nosocomialOutbreak = nosocomialOutbreak;
}

public InfectionSetting getInfectionSetting() {
return infectionSetting;
}

public void setInfectionSetting(InfectionSetting infectionSetting) {
this.infectionSetting = infectionSetting;
}

public QuarantineType getQuarantine() {
return quarantine;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ public class CaseExportDto implements Serializable {
private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto();
private List<EmbeddedSampleExportDto> otherSamples = new ArrayList<>();

private Boolean nosocomialOutbreak;
private InfectionSetting infectionSetting;

private QuarantineType quarantine;
@SensitiveData
private String quarantineTypeDetails;
Expand Down Expand Up @@ -252,6 +255,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
String pointOfEntryUuid, String pointOfEntryDetails, CaseClassification caseClassification,
InvestigationStatus investigationStatus, CaseOutcome outcome,
FollowUpStatus followUpStatus, Date followUpUntil,
Boolean nosocomialOutbreak, InfectionSetting infectionSetting,
// Quarantine
QuarantineType quarantine, String quarantineTypeDetails, Date quarantineFrom, Date quarantineTo,
boolean quarantineOrderedVerbally, boolean quarantineOrderedOfficialDocument, Date quarantineOrderedVerballyDate,
Expand Down Expand Up @@ -296,6 +300,8 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
this.caseClassification = caseClassification;
this.investigationStatus = investigationStatus;
this.outcome = outcome;
this.nosocomialOutbreak = nosocomialOutbreak;
this.infectionSetting = infectionSetting;
this.quarantine = quarantine;
this.quarantineTypeDetails = quarantineTypeDetails;
this.quarantineFrom = quarantineFrom;
Expand Down Expand Up @@ -628,6 +634,28 @@ public CaseOutcome getOutcome() {
}

@Order(33)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
@ExportProperty(value = CaseDataDto.NOSOCOMIAL_OUTBREAK, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
@HideForCountriesExcept
public Boolean getNosocomialOutbreak() {
return nosocomialOutbreak;
}

@Order(34)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
@ExportProperty(value = CaseDataDto.INFECTION_SETTING, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
@HideForCountriesExcept
public InfectionSetting getInfectionSetting() {
return infectionSetting;
}

@Order(35)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -637,7 +665,7 @@ public QuarantineType getQuarantine() {
return quarantine;
}

@Order(34)
@Order(36)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -647,7 +675,7 @@ public String getQuarantineTypeDetails() {
return quarantineTypeDetails;
}

@Order(35)
@Order(37)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -657,7 +685,7 @@ public Date getQuarantineFrom() {
return quarantineFrom;
}

@Order(36)
@Order(38)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -667,7 +695,7 @@ public Date getQuarantineTo() {
return quarantineTo;
}

@Order(37)
@Order(39)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -680,7 +708,7 @@ public boolean isQuarantineOrderedVerbally() {
return quarantineOrderedVerbally;
}

@Order(38)
@Order(40)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -693,7 +721,7 @@ public boolean isQuarantineOrderedOfficialDocument() {
return quarantineOrderedOfficialDocument;
}

@Order(39)
@Order(41)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -706,7 +734,7 @@ public Date getQuarantineOrderedVerballyDate() {
return quarantineOrderedVerballyDate;
}

@Order(40)
@Order(42)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -719,7 +747,7 @@ public Date getQuarantineOrderedOfficialDocumentDate() {
return quarantineOrderedOfficialDocumentDate;
}

@Order(41)
@Order(43)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -732,7 +760,7 @@ public boolean isQuarantineOfficialOrderSent() {
return quarantineOfficialOrderSent;
}

@Order(42)
@Order(44)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -745,7 +773,7 @@ public Date getQuarantineOfficialOrderSentDate() {
return quarantineOfficialOrderSentDate;
}

@Order(43)
@Order(45)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -755,7 +783,7 @@ public boolean isQuarantineExtended() {
return quarantineExtended;
}

@Order(44)
@Order(46)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -765,7 +793,7 @@ public boolean isQuarantineReduced() {
return quarantineReduced;
}

@Order(45)
@Order(47)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE })
@ExportProperty(MAX_SOURCE_CASE_CLASSIFICATION)
Expand All @@ -774,7 +802,7 @@ public CaseClassification getMaxSourceCaseClassification() {
return maxSourceCaseClassification;
}

@Order(46)
@Order(48)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE })
@ExportProperty(ASSOCIATED_WITH_OUTBREAK)
Expand All @@ -787,7 +815,7 @@ public void setMaxSourceCaseClassification(CaseClassification maxSourceCaseClass
this.maxSourceCaseClassification = maxSourceCaseClassification;
}

@Order(47)
@Order(49)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -797,7 +825,7 @@ public YesNoUnknown getAdmittedToHealthFacility() {
return admittedToHealthFacility;
}

@Order(48)
@Order(50)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -807,7 +835,7 @@ public Date getAdmissionDate() {
return admissionDate;
}

@Order(49)
@Order(51)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -821,7 +849,7 @@ public void setDischargeDate(Date dischargeDate) {
this.dischargeDate = dischargeDate;
}

@Order(50)
@Order(52)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -835,7 +863,7 @@ public void setLeftAgainstAdvice(YesNoUnknown leftAgainstAdvice) {
this.leftAgainstAdvice = leftAgainstAdvice;
}

@Order(51)
@Order(53)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE,
CaseExportType.CASE_MANAGEMENT })
Expand All @@ -845,7 +873,7 @@ public PresentCondition getPresentCondition() {
return presentCondition;
}

@Order(52)
@Order(54)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE })
@ExportProperty(PersonDto.DEATH_DATE)
Expand All @@ -854,7 +882,7 @@ public Date getDeathDate() {
return deathDate;
}

@Order(53)
@Order(55)
@ExportTarget(caseExportTypes = {
CaseExportType.CASE_SURVEILLANCE })
@ExportProperty(BURIAL_INFO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Map<PresentCondition, Long> getCaseCountPerPersonCondition(

Date getOldestCaseReportDate();

Date getOldestCaseOutcomeDate();

boolean isArchived(String caseUuid);

boolean isDeleted(String caseUuid);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package de.symeda.sormas.api.caze;

import de.symeda.sormas.api.i18n.I18nProperties;

public enum InfectionSetting {

UNKNOWN(null),
AMBULATORY(null),
MEDICAL_PRACTICE(AMBULATORY),
OPERATIVE_1200(AMBULATORY),
HOSPITAL_1300(AMBULATORY),
OTHER_OUTPATIENT_FACILITY(AMBULATORY),
STATIONARY(null),
HOSPITAL_2100(STATIONARY),
NORMAL_WARD(HOSPITAL_2100),
OPERATIVE_2111(NORMAL_WARD),
NOT_OPERATIVE(NORMAL_WARD),
HEMATOLOGICAL_ONCOLOGY(NORMAL_WARD),
CHILDREN_WARD(HOSPITAL_2100),
NEONATOLOGY(HOSPITAL_2100),
INTENSIVE_CARE_UNIT(HOSPITAL_2100),
OTHER_STATION(HOSPITAL_2100),
NURSING_HOME(STATIONARY),
REHAB_FACILITY(STATIONARY),
OTHER_STATIONARY_FACILITY(STATIONARY);

private final InfectionSetting parent;

InfectionSetting(InfectionSetting parent) {
this.parent = parent;
}

public InfectionSetting getParent() {
return this.parent;
}

public String toString() {
String caption = I18nProperties.getEnumCaption(this);
if (this.parent != null) {
caption = this.parent.toString() + " / " + caption;
}

return caption;
}
}
Loading

0 comments on commit e9f367f

Please sign in to comment.