Skip to content

Commit

Permalink
Merge pull request #2778 from hzi-braunschweig/2628_sormas-to-sormas-…
Browse files Browse the repository at this point in the history
…ownership

#2628, #2629 sormas to sormas
  • Loading branch information
BarnaBartha authored Sep 4, 2020
2 parents e2a8750 + 2af9076 commit 3d408c2
Show file tree
Hide file tree
Showing 195 changed files with 1,568 additions and 1,144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.EntityDto;
import de.symeda.sormas.api.ImportIgnore;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.caze.maternalhistory.MaternalHistoryDto;
import de.symeda.sormas.api.caze.porthealthinfo.PortHealthInfoDto;
import de.symeda.sormas.api.clinicalcourse.ClinicalCourseDto;
Expand All @@ -44,7 +43,7 @@
import de.symeda.sormas.api.region.CommunityReferenceDto;
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.region.RegionReferenceDto;
import de.symeda.sormas.api.sormastosormas.SormasToSormasSourceDto;
import de.symeda.sormas.api.sormastosormas.SormasToSormasOriginInfoDto;
import de.symeda.sormas.api.symptoms.SymptomsDto;
import de.symeda.sormas.api.therapy.TherapyDto;
import de.symeda.sormas.api.user.UserReferenceDto;
Expand All @@ -57,6 +56,7 @@
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LatitudePseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LongitudePseudonymizer;
Expand Down Expand Up @@ -224,7 +224,8 @@ public class CaseDataDto extends PseudonymizableDto {
@PersonalData
@SensitiveData
private CommunityReferenceDto community;
@PersonalData
@PersonalData(mandatoryField = true)
@SensitiveData(mandatoryField = true)
private FacilityType facilityType;
@Outbreaks
@Required
Expand Down Expand Up @@ -377,7 +378,8 @@ public class CaseDataDto extends PseudonymizableDto {
private String followUpComment;
private Date followUpUntil;
private boolean overwriteFollowUpUntil;
private SormasToSormasSourceDto sormasToSormasSource;
private SormasToSormasOriginInfoDto sormasToSormasOriginInfo;
private boolean ownershipHandedOver;

public static CaseDataDto build(PersonReferenceDto person, Disease disease) {
return build(person, disease, null);
Expand Down Expand Up @@ -1140,11 +1142,19 @@ public void setFacilityType(FacilityType facilityType) {
this.facilityType = facilityType;
}

public SormasToSormasSourceDto getSormasToSormasSource() {
return sormasToSormasSource;
public SormasToSormasOriginInfoDto getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}

public void setSormasToSormasOriginInfo(SormasToSormasOriginInfoDto sormasToSormasOriginInfo) {
this.sormasToSormasOriginInfo = sormasToSormasOriginInfo;
}

public boolean isOwnershipHandedOver() {
return ownershipHandedOver;
}

public void setSormasToSormasSource(SormasToSormasSourceDto sormasToSormasSource) {
this.sormasToSormasSource = sormasToSormasSource;
public void setOwnershipHandedOver(boolean ownershipHandedOver) {
this.ownershipHandedOver = ownershipHandedOver;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.followup.FollowUpDto;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;

public class CaseFollowUpDto extends FollowUpDto implements WithJurisdiction<CaseJurisdictionDto> {
public class CaseFollowUpDto extends FollowUpDto {

private static final long serialVersionUID = -7782443664670559221L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
import de.symeda.sormas.api.person.Sex;
import de.symeda.sormas.api.utils.PersonalData;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto;

public class CaseIndexDto implements WithJurisdiction<CaseJurisdictionDto>, Serializable, Cloneable {
public class CaseIndexDto extends PseudonymizableIndexDto implements Serializable, Cloneable {

private static final long serialVersionUID = -7764607075875188799L;

Expand Down Expand Up @@ -110,15 +110,46 @@ public CaseIndexDto(long id, String uuid, String epidNumber, String externalID,
Integer age, ApproximateAgeType ageType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Sex sex, Date quarantineTo,
Float completeness, FollowUpStatus followUpStatus, Date followUpUntil) {
//@formatter:on
this(id, uuid, epidNumber, externalID,personFirstName, personLastName, disease,
diseaseDetails, caseClassification, investigationStatus,
presentCondition, reportDate, reportingUserUuid, creationDate, regionUuid,
districtUuid, districtName, communityUuid, healthFacilityUuid, healthFacilityName, healthFacilityDetails,
pointOfEntryUuid, pointOfEntryName, pointOfEntryDetails, surveillanceOfficerUuid, outcome,
age, ageType, birthdateDD, birthdateMM, birthdateYYYY, sex, quarantineTo,
completeness, followUpStatus, followUpUntil, null
);
this(
id,
uuid,
epidNumber,
externalID,
personFirstName,
personLastName,
disease,
diseaseDetails,
caseClassification,
investigationStatus,
presentCondition,
reportDate,
reportingUserUuid,
creationDate,
regionUuid,
districtUuid,
districtName,
communityUuid,
healthFacilityUuid,
healthFacilityName,
healthFacilityDetails,
pointOfEntryUuid,
pointOfEntryName,
pointOfEntryDetails,
surveillanceOfficerUuid,
outcome,
age,
ageType,
birthdateDD,
birthdateMM,
birthdateYYYY,
sex,
quarantineTo,
completeness,
followUpStatus,
followUpUntil,
null);
}

//@formatter:off
public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, String personFirstName, String personLastName, Disease disease,
String diseaseDetails, CaseClassification caseClassification, InvestigationStatus investigationStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import java.util.Date;

import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.region.CommunityReferenceDto;
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.region.RegionReferenceDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class MaternalHistoryDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.symptoms.SymptomsDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class ClinicalVisitDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package de.symeda.sormas.api.clinicalcourse;

import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.HideForCountries;
import de.symeda.sormas.api.utils.HideForCountriesExcept;
import de.symeda.sormas.api.utils.Order;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class HealthConditionsDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.caze.CaseReferenceDto;
import de.symeda.sormas.api.clinicalcourse.HealthConditionsDto;
Expand All @@ -29,14 +28,15 @@
import de.symeda.sormas.api.region.CommunityReferenceDto;
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.region.RegionReferenceDto;
import de.symeda.sormas.api.sormastosormas.SormasToSormasSourceDto;
import de.symeda.sormas.api.sormastosormas.SormasToSormasOriginInfoDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.EmbeddedPersonalData;
import de.symeda.sormas.api.utils.HideForCountriesExcept;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LatitudePseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LongitudePseudonymizer;
Expand Down Expand Up @@ -201,7 +201,8 @@ public class ContactDto extends PseudonymizableDto {
private String additionalDetails;
private EpiDataDto epiData;
private HealthConditionsDto healthConditions;
private SormasToSormasSourceDto sormasToSormasSource;
private SormasToSormasOriginInfoDto sormasToSormasOriginInfo;
private boolean ownershipHandedOver;

public static ContactDto build() {
return build(null, null, null);
Expand Down Expand Up @@ -691,11 +692,19 @@ public void setHealthConditions(HealthConditionsDto healthConditions) {
this.healthConditions = healthConditions;
}

public SormasToSormasSourceDto getSormasToSormasSource() {
return sormasToSormasSource;
public SormasToSormasOriginInfoDto getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}

public void setSormasToSormasSource(SormasToSormasSourceDto sormasToSormasSource) {
this.sormasToSormasSource = sormasToSormasSource;
public void setSormasToSormasOriginInfo(SormasToSormasOriginInfoDto sormasToSormasOriginInfo) {
this.sormasToSormasOriginInfo = sormasToSormasOriginInfo;
}

public boolean isOwnershipHandedOver() {
return ownershipHandedOver;
}

public void setOwnershipHandedOver(boolean ownershipHandedOver) {
this.ownershipHandedOver = ownershipHandedOver;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import de.symeda.sormas.api.followup.FollowUpDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;

public class ContactFollowUpDto extends FollowUpDto implements WithJurisdiction<ContactJurisdictionDto> {
public class ContactFollowUpDto extends FollowUpDto {

private static final long serialVersionUID = -1257025719012862417L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import de.symeda.sormas.api.caze.CaseJurisdictionDto;
import de.symeda.sormas.api.caze.CaseReferenceDto;
import de.symeda.sormas.api.utils.PersonalData;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto;

public class ContactIndexDto implements WithJurisdiction<ContactJurisdictionDto>, Serializable {
public class ContactIndexDto extends PseudonymizableIndexDto implements Serializable {

private static final long serialVersionUID = 7511900591141885152L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.location.LocationDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.Diseases;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EpiDataBurialDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.ImportIgnore;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.caze.Vaccination;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.Diseases;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EpiDataDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.location.LocationDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.Diseases;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EpiDataGatheringDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.Diseases;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EpiDataTravelDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.location.LocationDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EventDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import de.symeda.sormas.api.location.LocationReferenceDto;
import de.symeda.sormas.api.utils.EmbeddedSensitiveData;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto;
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer;
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.EmptyValuePseudonymizer;

public class EventIndexDto implements WithJurisdiction<EventJurisdictionDto>, Serializable {
public class EventIndexDto extends PseudonymizableIndexDto implements Serializable {

private static final long serialVersionUID = 8322646404033924938L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
*******************************************************************************/
package de.symeda.sormas.api.event;

import de.symeda.sormas.api.PseudonymizableDto;
import de.symeda.sormas.api.caze.CaseReferenceDto;
import de.symeda.sormas.api.person.PersonDto;
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.EmbeddedPersonalData;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

public class EventParticipantDto extends PseudonymizableDto {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import de.symeda.sormas.api.person.Sex;
import de.symeda.sormas.api.utils.PersonalData;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.jurisdiction.WithJurisdiction;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto;

public class EventParticipantIndexDto implements WithJurisdiction<EventJurisdictionDto>, Serializable {
public class EventParticipantIndexDto extends PseudonymizableIndexDto implements Serializable {

private static final long serialVersionUID = 1136399297437006739L;

Expand Down Expand Up @@ -132,7 +132,6 @@ public void setInvolvementDescription(String involvementDescription) {
this.involvementDescription = involvementDescription;
}

@Override
public EventJurisdictionDto getJurisdiction() {
return eventJurisdiction;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.person.PersonReferenceDto;
import de.symeda.sormas.api.utils.EmbeddedPersonalData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto;
import de.symeda.sormas.api.visit.VisitResult;

public abstract class FollowUpDto implements Serializable {
public abstract class FollowUpDto extends PseudonymizableIndexDto implements Serializable {

private static final long serialVersionUID = 8562530147842271464L;

Expand Down
Loading

0 comments on commit 3d408c2

Please sign in to comment.