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

Commit 2432cd5

Browse files
Merge branch 'development' of https://github.com/hzi-braunschweig/SORMAS-Project into development
2 parents 42902ce + 0138590 commit 2432cd5

43 files changed

Lines changed: 373 additions & 102 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ public class CaseDataDto extends PseudonymizableDto {
172172
public static final String PROHIBITION_TO_WORK_FROM = "prohibitionToWorkFrom";
173173
public static final String PROHIBITION_TO_WORK_UNTIL = "prohibitionToWorkUntil";
174174

175+
public static final String REPORTING_DISTRICT = "reportingDistrict";
176+
175177
// Fields are declared in the order they should appear in the import template
176178

177179
@Outbreaks
@@ -421,6 +423,7 @@ public class CaseDataDto extends PseudonymizableDto {
421423
COUNTRY_CODE_GERMANY,
422424
COUNTRY_CODE_SWITZERLAND })
423425
private Date quarantineOfficialOrderSentDate;
426+
@HideForCountriesExcept
424427
private ReportingType reportingType;
425428
private YesNoUnknown postpartum;
426429
private Trimester trimester;
@@ -462,6 +465,9 @@ public class CaseDataDto extends PseudonymizableDto {
462465
@HideForCountriesExcept
463466
private Date prohibitionToWorkUntil;
464467

468+
@HideForCountriesExcept
469+
private DistrictReferenceDto reportingDistrict;
470+
465471
public static CaseDataDto build(PersonReferenceDto person, Disease disease) {
466472
return build(person, disease, null);
467473
}
@@ -1360,6 +1366,14 @@ public void setProhibitionToWorkUntil(Date prohibitionToWorkUntil) {
13601366
this.prohibitionToWorkUntil = prohibitionToWorkUntil;
13611367
}
13621368

1369+
public DistrictReferenceDto getReportingDistrict() {
1370+
return reportingDistrict;
1371+
}
1372+
1373+
public void setReportingDistrict(DistrictReferenceDto reportingDistrict) {
1374+
this.reportingDistrict = reportingDistrict;
1375+
}
1376+
13631377
public boolean isOwnershipHandedOver() {
13641378
return ownershipHandedOver;
13651379
}

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ public class CaseExportDto implements Serializable {
256256
private String birthCountry;
257257
private String citizenship;
258258

259+
private String reportingDistrict;
260+
259261
//@formatter:off
260262
public CaseExportDto(long id, long personId, long personAddressId, long epiDataId, long symptomsId,
261263
long hospitalizationId, long districtId, long healthConditionsId, String uuid, String epidNumber,
@@ -283,7 +285,8 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
283285
Vaccination vaccination, String vaccinationDoses, Date vaccinationDate,
284286
VaccinationInfoSource vaccinationInfoSource, YesNoUnknown postpartum, Trimester trimester,
285287
long eventCount, String externalID,
286-
String birthName, String birthCountryIsoCode, String birthCountryName, String citizenshipIsoCode, String citizenshipCountryName) {
288+
String birthName, String birthCountryIsoCode, String birthCountryName, String citizenshipIsoCode, String citizenshipCountryName,
289+
String reportingDistrict) {
287290
//@formatter:on
288291

289292
this.id = id;
@@ -366,6 +369,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
366369
this.birthName = birthName;
367370
this.birthCountry = I18nProperties.getCountryName(birthCountryIsoCode, birthCountryName);
368371
this.citizenship = I18nProperties.getCountryName(citizenshipIsoCode, citizenshipCountryName);
372+
this.reportingDistrict = reportingDistrict;
369373

370374
jurisdiction = new CaseJurisdictionDto(reportingUserUuid, regionUuid, districtUuid, communityUuid, healthFacilityUuid, pointOfEntryUuid);
371375
}
@@ -1448,6 +1452,17 @@ public String getCitizenship() {
14481452
return citizenship;
14491453
}
14501454

1455+
@Order(153)
1456+
@ExportTarget(caseExportTypes = {
1457+
CaseExportType.CASE_SURVEILLANCE,
1458+
CaseExportType.CASE_MANAGEMENT })
1459+
@ExportProperty(CaseDataDto.REPORTING_DISTRICT)
1460+
@ExportGroup(ExportGroupType.ADDITIONAL)
1461+
@HideForCountriesExcept
1462+
public String getReportingDistrict() {
1463+
return reportingDistrict;
1464+
}
1465+
14511466
public void setCountry(String country) {
14521467
this.country = country;
14531468
}

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ public class ContactDto extends PseudonymizableDto {
120120
public static final String PROHIBITION_TO_WORK_FROM = "prohibitionToWorkFrom";
121121
public static final String PROHIBITION_TO_WORK_UNTIL = "prohibitionToWorkUntil";
122122

123+
public static final String REPORTING_DISTRICT = "reportingDistrict";
124+
123125
private CaseReferenceDto caze;
124126
private String caseIdExternalSystem;
125127
@SensitiveData
@@ -263,6 +265,9 @@ public class ContactDto extends PseudonymizableDto {
263265
@HideForCountriesExcept
264266
private Date prohibitionToWorkUntil;
265267

268+
@HideForCountriesExcept
269+
private DistrictReferenceDto reportingDistrict;
270+
266271
public static ContactDto build() {
267272
final ContactDto contact = new ContactDto();
268273
contact.setUuid(DataHelper.createUuid());
@@ -857,6 +862,14 @@ public void setProhibitionToWorkUntil(Date prohibitionToWorkUntil) {
857862
this.prohibitionToWorkUntil = prohibitionToWorkUntil;
858863
}
859864

865+
public DistrictReferenceDto getReportingDistrict() {
866+
return reportingDistrict;
867+
}
868+
869+
public void setReportingDistrict(DistrictReferenceDto reportingDistrict) {
870+
this.reportingDistrict = reportingDistrict;
871+
}
872+
860873
public YesNoUnknown getReturningTraveler() {
861874
return returningTraveler;
862875
}

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactExportDto.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public class ContactExportDto implements Serializable {
154154
private String birthCountry;
155155
private String citizenship;
156156

157+
private String reportingDistrict;
158+
157159
//@formatter:off
158160
public ContactExportDto(long id, long personId, String uuid, String sourceCaseUuid, CaseClassification caseClassification, Disease disease, String diseaseDetails,
159161
ContactClassification contactClassification, Date lastContactDate, String firstName, String lastName,
@@ -172,6 +174,7 @@ public ContactExportDto(long id, long personId, String uuid, String sourceCaseUu
172174
String region, String district, String community,
173175
long epiDataId, YesNoUnknown contactWithSourceCaseKnown, YesNoUnknown returningTraveler, String externalID,
174176
String birthName, String birthCountryIsoCode, String birthCountryName, String citizenshipIsoCode, String citizenshipCountryName,
177+
String reportingDistrict,
175178
String reportingUserUuid, String regionUuid, String districtUuid, String communityUuid,
176179
String caseReportingUserUuid, String caseRegionUuid, String caseDistrictUuid, String caseCommunityUuid, String caseHealthFacilityUuid, String casePointOfEntryUuid
177180
) {
@@ -239,6 +242,7 @@ public ContactExportDto(long id, long personId, String uuid, String sourceCaseUu
239242
this.birthName = birthName;
240243
this.birthCountry = I18nProperties.getCountryName(birthCountryIsoCode, birthCountryName);
241244
this.citizenship = I18nProperties.getCountryName(citizenshipIsoCode, citizenshipCountryName);
245+
this.reportingDistrict = reportingDistrict;
242246

243247
CaseJurisdictionDto caseJurisdiction = caseReportingUserUuid != null
244248
? null
@@ -662,6 +666,12 @@ public String getCitizenship() {
662666
return citizenship;
663667
}
664668

669+
@Order(83)
670+
@HideForCountriesExcept
671+
public String getReportingDistrict() {
672+
return reportingDistrict;
673+
}
674+
665675
public void setEventCount(Long eventCount) {
666676
this.eventCount = eventCount;
667677
}

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ public interface Captions {
281281
String CaseData_region = "CaseData.region";
282282
String CaseData_regionLevelDate = "CaseData.regionLevelDate";
283283
String CaseData_reportDate = "CaseData.reportDate";
284+
String CaseData_reportingDistrict = "CaseData.reportingDistrict";
284285
String CaseData_reportingType = "CaseData.reportingType";
285286
String CaseData_reportingUser = "CaseData.reportingUser";
286287
String CaseData_reportLat = "CaseData.reportLat";
@@ -507,6 +508,7 @@ public interface Captions {
507508
String Contact_relationDescription = "Contact.relationDescription";
508509
String Contact_relationToCase = "Contact.relationToCase";
509510
String Contact_reportDateTime = "Contact.reportDateTime";
511+
String Contact_reportingDistrict = "Contact.reportingDistrict";
510512
String Contact_reportingUser = "Contact.reportingUser";
511513
String Contact_reportLat = "Contact.reportLat";
512514
String Contact_reportLatLonAccuracy = "Contact.reportLatLonAccuracy";

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ public interface Strings {
191191
String errorSetFeverRequired = "errorSetFeverRequired";
192192
String errorSormasToSormasCertNotGenerated = "errorSormasToSormasCertNotGenerated";
193193
String errorSormasToSormasConnection = "errorSormasToSormasConnection";
194+
String errorSormasToSormasCountry = "errorSormasToSormasCountry";
194195
String errorSormasToSormasDecrypt = "errorSormasToSormasDecrypt";
195196
String errorSormasToSormasEncrypt = "errorSormasToSormasEncrypt";
196197
String errorSormasToSormasInfrastructure = "errorSormasToSormasInfrastructure";

sormas-api/src/main/java/de/symeda/sormas/api/region/CountryDto.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package de.symeda.sormas.api.region;
22

3+
import java.util.Date;
4+
35
import javax.validation.constraints.Size;
46

57
import de.symeda.sormas.api.EntityDto;
68
import de.symeda.sormas.api.utils.DataHelper;
79

8-
import java.util.Date;
9-
1010
public class CountryDto extends EntityDto {
1111

1212
private static final long serialVersionUID = 8309822957203823162L;
@@ -25,14 +25,15 @@ public class CountryDto extends EntityDto {
2525
private String unoCode;
2626
private boolean archived;
2727

28-
public CountryDto(Date creationDate,
29-
Date changeDate,
30-
String uuid,
31-
boolean archived,
32-
String defaultName,
33-
String externalId,
34-
String isoCode,
35-
String unoCode) {
28+
public CountryDto(
29+
Date creationDate,
30+
Date changeDate,
31+
String uuid,
32+
boolean archived,
33+
String defaultName,
34+
String externalId,
35+
String isoCode,
36+
String unoCode) {
3637

3738
super(creationDate, changeDate, uuid);
3839
this.archived = archived;

sormas-api/src/main/java/de/symeda/sormas/api/region/CountryFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public interface CountryFacade {
1414

1515
List<CountryReferenceDto> getByDefaultName(String name, boolean includeArchivedEntities);
1616

17+
CountryDto getByIsoCode(String isoCode, boolean includeArchivedEntities);
18+
1719
List<CountryIndexDto> getIndexList(CountryCriteria criteria, Integer first, Integer max, List<SortProperty> sortProperties);
1820

1921
long count(CountryCriteria criteria);

sormas-api/src/main/java/de/symeda/sormas/api/region/CountryReferenceDto.java

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,29 @@ public class CountryReferenceDto extends ReferenceDto implements StatisticsGroup
77

88
private static final long serialVersionUID = -7477992903590074568L;
99

10+
private String isoCode;
11+
1012
public CountryReferenceDto() {
1113
}
1214

13-
public CountryReferenceDto(String uuid) {
14-
setUuid(uuid);
15-
}
15+
public CountryReferenceDto(String uuid, String isoCode) {
16+
super(uuid);
17+
this.isoCode = isoCode;
18+
}
19+
20+
public CountryReferenceDto(String uuid, String caption, String isoCode) {
21+
setUuid(uuid);
22+
setCaption(caption);
23+
this.isoCode = isoCode;
24+
}
1625

17-
public CountryReferenceDto(String uuid, String caption) {
18-
setUuid(uuid);
19-
setCaption(caption);
20-
}
26+
public String getIsoCode() {
27+
return isoCode;
28+
}
29+
30+
public void setIsoCode(String isoCode) {
31+
this.isoCode = isoCode;
32+
}
2133

2234
@Override
2335
public int keyCompareTo(StatisticsGroupingKey o) {

sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import static de.symeda.sormas.api.user.UserRole.POE_INFORMANT;
3838
import static de.symeda.sormas.api.user.UserRole.POE_NATIONAL_USER;
3939
import static de.symeda.sormas.api.user.UserRole.POE_SUPERVISOR;
40+
import static de.symeda.sormas.api.user.UserRole.SORMAS_TO_SORMAS_CLIENT;
4041
import static de.symeda.sormas.api.user.UserRole.STATE_OBSERVER;
4142
import static de.symeda.sormas.api.user.UserRole.SURVEILLANCE_OFFICER;
4243
import static de.symeda.sormas.api.user.UserRole.SURVEILLANCE_SUPERVISOR;
@@ -1110,8 +1111,9 @@ public enum UserRight {
11101111
CONTACT_OFFICER,
11111112
HOSPITAL_INFORMANT,
11121113
COMMUNITY_INFORMANT,
1113-
POE_INFORMANT),
1114-
SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION(),
1114+
POE_INFORMANT,
1115+
SORMAS_TO_SORMAS_CLIENT),
1116+
SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION(SORMAS_TO_SORMAS_CLIENT),
11151117
SEE_SENSITIVE_DATA_IN_JURISDICTION(
11161118
SURVEILLANCE_SUPERVISOR,
11171119
ADMIN_SUPERVISOR,
@@ -1127,8 +1129,9 @@ public enum UserRight {
11271129
HOSPITAL_INFORMANT,
11281130
COMMUNITY_INFORMANT,
11291131
POE_INFORMANT,
1130-
LAB_USER),
1131-
SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION(),
1132+
LAB_USER,
1133+
SORMAS_TO_SORMAS_CLIENT),
1134+
SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION(SORMAS_TO_SORMAS_CLIENT),
11321135
CAMPAIGN_VIEW(
11331136
ADMIN,
11341137
NATIONAL_USER,

0 commit comments

Comments
 (0)