Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into qu-auto/SORQA-482
Browse files Browse the repository at this point in the history
# Conflicts:
#	sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePage.java
#	sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCaseSteps.java
  • Loading branch information
hms-sgent committed Sep 19, 2022
2 parents cb788e7 + 8bcdcc3 commit 2180884
Show file tree
Hide file tree
Showing 197 changed files with 1,946 additions and 980 deletions.
3 changes: 3 additions & 0 deletions openapi/external_visits_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@
"type" : "object",
"properties" : {
"uuid" : {
"maxLength" : 36,
"minLength" : 20,
"pattern" : "^[0-9a-zA-Z-]*$",
"type" : "string"
},
"pseudonymized" : {
Expand Down
3 changes: 3 additions & 0 deletions openapi/external_visits_API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ components:
type: object
properties:
uuid:
maxLength: 36
minLength: 20
pattern: "^[0-9a-zA-Z-]*$"
type: string
pseudonymized:
type: boolean
Expand Down
8 changes: 5 additions & 3 deletions sormas-api/src/main/java/de/symeda/sormas/api/CoreFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ public interface CoreFacade<DTO extends EntityDto, INDEX_DTO extends Serializabl
void dearchive(List<String> entityUuids, String dearchiveReason);

default void setArchiveInExternalSurveillanceToolForEntity(String uuid, boolean archived) throws ExternalSurveillanceToolException {
};
}

default void setArchiveInExternalSurveillanceToolForEntities(List<String> uuid, boolean archived) throws ExternalSurveillanceToolException {
};
}

Date calculateEndOfProcessingDate(String entityUuids);

EditPermissionType isEditAllowed(String uuid);
EditPermissionType getEditPermissionType(String uuid);

boolean isEditAllowed(String uuid);

}
10 changes: 4 additions & 6 deletions sormas-api/src/main/java/de/symeda/sormas/api/EntityDto.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
/*******************************************************************************
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
* Copyright © 2016-2022 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;

import java.io.Serializable;
Expand All @@ -31,6 +28,7 @@
import de.symeda.sormas.api.i18n.Validations;
import de.symeda.sormas.api.utils.FieldConstraints;
import de.symeda.sormas.api.utils.Outbreaks;
import de.symeda.sormas.api.uuid.HasUuid;

/**
* All inheriting classes of EntityDto must include a build() method that sets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.HashMap;
import java.util.Map;

import de.symeda.sormas.api.uuid.HasUuid;
import org.apache.commons.lang3.StringUtils;

import de.symeda.sormas.api.caze.BirthDateDto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package de.symeda.sormas.api;

import de.symeda.sormas.api.uuid.HasUuid;

public interface MergeableIndexDto extends HasUuid {
/**
*
Expand Down
18 changes: 8 additions & 10 deletions sormas-api/src/main/java/de/symeda/sormas/api/ReferenceDto.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*******************************************************************************
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
* Copyright © 2016-2022 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;

import java.io.Serializable;
Expand All @@ -25,8 +23,8 @@

import de.symeda.sormas.api.i18n.Validations;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.uuid.HasUuid;

@SuppressWarnings("serial")
public abstract class ReferenceDto implements Serializable, HasUuid, Comparable<ReferenceDto> {

public static final String CAPTION = "caption";
Expand All @@ -37,15 +35,15 @@ public abstract class ReferenceDto implements Serializable, HasUuid, Comparable<
private String uuid;
private String caption;

public ReferenceDto() {
protected ReferenceDto() {

}

public ReferenceDto(String uuid) {
protected ReferenceDto(String uuid) {
this.uuid = uuid;
}

public ReferenceDto(String uuid, String caption) {
protected ReferenceDto(String uuid, String caption) {
this.uuid = uuid;
this.caption = caption;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import javax.ejb.Remote;

import de.symeda.sormas.api.CoreFacade;
import de.symeda.sormas.api.EditPermissionType;
import de.symeda.sormas.api.campaign.diagram.CampaignDashboardElement;

@Remote
Expand All @@ -21,5 +20,4 @@ public interface CampaignFacade extends CoreFacade<CampaignDto, CampaignIndexDto

void validate(CampaignReferenceDto campaignReferenceDto);

EditPermissionType isCampaignEditAllowed(String caseUuid);
}
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2022 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.campaign;

import java.io.Serializable;
import java.util.Date;

public class CampaignIndexDto implements Serializable {
import de.symeda.sormas.api.uuid.AbstractUuidDto;

public class CampaignIndexDto extends AbstractUuidDto {
private static final long serialVersionUID = 2448753530580084851L;

public static final String I18N_PREFIX = "Campaign";

public static final String UUID = "uuid";
public static final String NAME = "name";
public static final String START_DATE = "startDate";
public static final String END_DATE = "endDate";

private String uuid;
private String name;
private Date startDate;
private Date endDate;

public CampaignIndexDto(String uuid, String name, Date startDate, Date endDate) {
this.uuid = uuid;
super(uuid);
this.name = name;
this.startDate = startDate;
this.endDate = endDate;
}

public String getUuid() {
return uuid;
}

public void setUuid(String uuid) {
this.uuid = uuid;
}

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
* Copyright © 2016-2022 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
Expand All @@ -15,15 +15,14 @@

package de.symeda.sormas.api.campaign.data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class CampaignFormDataIndexDto implements Serializable, Cloneable {
import de.symeda.sormas.api.uuid.AbstractUuidDto;

public static final String I18N_PREFIX = "CampaignFormData";
public class CampaignFormDataIndexDto extends AbstractUuidDto implements Cloneable {

public static final String UUID = "uuid";
public static final String I18N_PREFIX = "CampaignFormData";
public static final String CAMPAIGN = "campaign";
public static final String FORM = "form";
public static final String REGION = "region";
Expand All @@ -33,7 +32,6 @@ public class CampaignFormDataIndexDto implements Serializable, Cloneable {

private static final long serialVersionUID = -6672198324526771162L;

private String uuid;
private String campaign;
private String form;
private List<CampaignFormDataEntry> formValues;
Expand All @@ -51,7 +49,7 @@ public CampaignFormDataIndexDto(
String district,
String community,
Date formDate) {
this.uuid = uuid;
super(uuid);
this.campaign = campaign;
this.form = form;
this.formValues = (List<CampaignFormDataEntry>) formValues;
Expand All @@ -61,14 +59,6 @@ public CampaignFormDataIndexDto(
this.formDate = formDate;
}

public String getUuid() {
return uuid;
}

public void setUuid(String uuid) {
this.uuid = uuid;
}

public String getCampaign() {
return campaign;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
/*******************************************************************************
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
* Copyright © 2016-2022 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 java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -71,6 +67,7 @@
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.PostalCodePseudonymizer;
import de.symeda.sormas.api.uuid.AbstractUuidDto;
import de.symeda.sormas.api.vaccination.VaccinationDto;

/**
Expand All @@ -83,7 +80,7 @@
* recommended to remove properties that are removed from this file from existing export configurations.
*/
@ExportEntity(CaseDataDto.class)
public class CaseExportDto implements Serializable {
public class CaseExportDto extends AbstractUuidDto {

private static final long serialVersionUID = 8581579464816945555L;

Expand Down Expand Up @@ -123,7 +120,7 @@ public class CaseExportDto implements Serializable {
private long hospitalizationId;
private long symptomsId;
private long healthConditionsId;
private String uuid;

private String epidNumber;
private Disease disease;
private String diseaseDetails;
Expand Down Expand Up @@ -262,9 +259,9 @@ public class CaseExportDto implements Serializable {
private int numberOfPrescriptions;
private int numberOfTreatments;
private int numberOfClinicalVisits;
private EmbeddedSampleExportDto sample1 = new EmbeddedSampleExportDto();
private EmbeddedSampleExportDto sample2 = new EmbeddedSampleExportDto();
private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto();
private EmbeddedSampleExportDto sample1 = new EmbeddedSampleExportDto(null);
private EmbeddedSampleExportDto sample2 = new EmbeddedSampleExportDto(null);
private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto(null);
private List<EmbeddedSampleExportDto> otherSamples = new ArrayList<>();

private Boolean nosocomialOutbreak;
Expand Down Expand Up @@ -394,15 +391,14 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl
String associatedWithOutbreak, boolean isInJurisdiction
) {
//@formatter:on

super(uuid);
this.id = id;
this.personId = personId;
this.addressGpsCoordinates = LocationHelper.buildGpsCoordinatesCaption(personAddressLatitude, personAddressLongitude, personAddressLatLonAcc);
this.epiDataId = epiDataId;
this.symptomsId = symptomsId;
this.hospitalizationId = hospitalizationId;
this.healthConditionsId = healthConditionsId;
this.uuid = uuid;
this.epidNumber = epidNumber;
this.armedForcesRelationType = ArmedForcesRelationType;
this.disease = disease;
Expand Down Expand Up @@ -499,7 +495,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl
this.trimester = trimester;
this.followUpStatus = followUpStatus;
this.followUpUntil = followUpUntil;

this.eventCount = eventCount;
this.numberOfPrescriptions = prescriptionCount != null ? prescriptionCount.intValue() : 0;
this.numberOfTreatments = treatmentCount != null ? treatmentCount.intValue() : 0;
Expand Down Expand Up @@ -533,7 +529,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl
}

public CaseReferenceDto toReference() {
return new CaseReferenceDto(uuid, firstName, lastName);
return new CaseReferenceDto(getUuid(), firstName, lastName);
}

public Boolean getInJurisdiction() {
Expand Down Expand Up @@ -586,8 +582,9 @@ public long getHospitalizationId() {
CaseExportType.CASE_MANAGEMENT })
@ExportProperty(CaseDataDto.UUID)
@ExportGroup(ExportGroupType.CORE)
@Override
public String getUuid() {
return uuid;
return super.getUuid();
}

@Order(3)
Expand Down Expand Up @@ -2406,10 +2403,6 @@ public void setHospitalizationId(long hospitalizationId) {
this.hospitalizationId = hospitalizationId;
}

public void setUuid(String uuid) {
this.uuid = uuid;
}

public void setEpidNumber(String epidNumber) {
this.epidNumber = epidNumber;
}
Expand Down
Loading

0 comments on commit 2180884

Please sign in to comment.