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

Commit a647610

Browse files
Merge branch 'master' into development [manual]
Conforms to the GITFLOW process: * [GITFLOW]merging 'master' into 'development' * [GITFLOW]Updating develop poms back to pre merge state Necessary because there were merge conflicts during the hotfix finish
2 parents 0e1e46f + b23bb6c commit a647610

37 files changed

Lines changed: 456 additions & 94 deletions

sormas-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.symeda.sormas</groupId>
44
<artifactId>sormas-base</artifactId>
5-
<version>1.54.1</version>
5+
<version>1.55.0-SNAPSHOT</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ List<EventParticipantIndexDto> getIndexList(
7575
List<EventParticipantExportDto> getExportList(EventParticipantCriteria eventParticipantCriteria, int first, int max, Language userLanguage);
7676

7777
List<SimilarEventParticipantDto> getSimilarEventParticipants(EventParticipantSimilarityCriteria eventParticipantSimilarityCriteria);
78+
79+
List<EventParticipantDto> getByEventUuids(List<String> eventUuids);
7880
}

sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantJurisdictionDto.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919

2020
public class EventParticipantJurisdictionDto implements Serializable {
2121

22+
private String eventParticipantUuid;
2223
private String reportingUserUuid;
2324
private String regionUuid;
2425
private String districtUuid;
26+
private String eventUuid;
2527

2628
public EventParticipantJurisdictionDto() {
2729
}
@@ -30,6 +32,27 @@ public EventParticipantJurisdictionDto(String reportingUserUuid) {
3032
this.reportingUserUuid = reportingUserUuid;
3133
}
3234

35+
public EventParticipantJurisdictionDto(
36+
String eventParticipantUuid,
37+
String reportingUserUuid,
38+
String regionUuid,
39+
String districtUuid,
40+
String eventUuid) {
41+
this.eventParticipantUuid = eventParticipantUuid;
42+
this.reportingUserUuid = reportingUserUuid;
43+
this.regionUuid = regionUuid;
44+
this.districtUuid = districtUuid;
45+
this.eventUuid = eventUuid;
46+
}
47+
48+
public String getEventParticipantUuid() {
49+
return eventParticipantUuid;
50+
}
51+
52+
public void setEventParticipantUuid(String eventParticipantUuid) {
53+
this.eventParticipantUuid = eventParticipantUuid;
54+
}
55+
3356
public String getReportingUserUuid() {
3457
return reportingUserUuid;
3558
}
@@ -53,4 +76,12 @@ public String getDistrictUuid() {
5376
public void setDistrictUuid(String districtUuid) {
5477
this.districtUuid = districtUuid;
5578
}
79+
80+
public String getEventUuid() {
81+
return eventUuid;
82+
}
83+
84+
public void setEventUuid(String eventUuid) {
85+
this.eventUuid = eventUuid;
86+
}
5687
}

sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import de.symeda.sormas.api.contact.ContactJurisdictionDto;
2020
import de.symeda.sormas.api.contact.ContactReferenceDto;
2121
import de.symeda.sormas.api.contact.ContactStatus;
22-
import de.symeda.sormas.api.event.EventJurisdictionDto;
22+
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
2323
import de.symeda.sormas.api.event.EventParticipantReferenceDto;
2424
import de.symeda.sormas.api.facility.FacilityHelper;
2525
import de.symeda.sormas.api.location.LocationReferenceDto;
@@ -283,17 +283,21 @@ public SampleExportDto(long id, String uuid, String labSampleId, Date sampleRepo
283283
this.contactDistrict = contactDistrict;
284284
}
285285

286-
EventJurisdictionDto associatedEventJurisdiction = null;
286+
EventParticipantJurisdictionDto associatedEventParticipantJurisdiction = null;
287287
if (eventParticipantUuid != null) {
288-
associatedEventJurisdiction =
289-
new EventJurisdictionDto(eventReportingUserUuid, eventOfficerUuid, eventRegionUuid, eventDistrictUuid, eventCommunityUuid);
288+
associatedEventParticipantJurisdiction = new EventParticipantJurisdictionDto(
289+
associatedEventParticipant.getUuid(),
290+
eventReportingUserUuid,
291+
eventRegionUuid,
292+
eventDistrictUuid,
293+
eventCommunityUuid);
290294
}
291295

292296
jurisdiction = new SampleJurisdictionDto(
293297
reportingUserUuid,
294298
associatedCaseJurisdiction,
295299
associatedContactJurisdiction,
296-
associatedEventJurisdiction,
300+
associatedEventParticipantJurisdiction,
297301
labUuid);
298302
}
299303

sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api.sample;
1919

20+
import java.io.Serializable;
21+
import java.util.Date;
22+
2023
import de.symeda.sormas.api.Disease;
2124
import de.symeda.sormas.api.caze.CaseJurisdictionDto;
2225
import de.symeda.sormas.api.caze.CaseReferenceDto;
2326
import de.symeda.sormas.api.contact.ContactJurisdictionDto;
2427
import de.symeda.sormas.api.contact.ContactReferenceDto;
25-
import de.symeda.sormas.api.event.EventJurisdictionDto;
28+
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
2629
import de.symeda.sormas.api.event.EventParticipantReferenceDto;
2730
import de.symeda.sormas.api.facility.FacilityHelper;
2831
import de.symeda.sormas.api.facility.FacilityReferenceDto;
@@ -33,9 +36,6 @@
3336
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer;
3437
import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.EmptyValuePseudonymizer;
3538

36-
import java.io.Serializable;
37-
import java.util.Date;
38-
3939
public class SampleIndexDto extends PseudonymizableIndexDto implements Serializable {
4040

4141
private static final long serialVersionUID = -6298614717044087479L;
@@ -111,7 +111,7 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s
111111
String contactReportingUserUuid, String contactRegionUuid, String contactDistrictUuid, String contactCommunityUuid,
112112
String contactCaseReportingUserUuid, String contactCaseRegionUuid, String contactCaseDistrictUuid,
113113
String contactCaseCommunityUuid, String contactCaseHealthFacilityUuid, String contactCasePointOfEntryUuid,
114-
String eventReportingUserUuid, String eventOfficerUuid, String eventRegionUuid, String eventDistrictUuid, String eventCommunityUuid) {
114+
String eventReportingUserUuid, String eventOfficerUuid, String eventParticipantRegionUuid, String eventParticipantDistrictUuid, String eventUuid) {
115115
//@formatter:on
116116

117117
this.uuid = uuid;
@@ -132,7 +132,8 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s
132132
this.labSampleID = labSampleId;
133133
this.disease = disease;
134134
this.diseaseDetails = diseaseDetails;
135-
this.district = createDistrictReference(districtName, caseDistrictUuid, contactDistrictUuid, contactCaseDistrictUuid, eventDistrictUuid);
135+
this.district =
136+
createDistrictReference(districtName, caseDistrictUuid, contactDistrictUuid, contactCaseDistrictUuid, eventParticipantDistrictUuid);
136137
this.shipped = shipped;
137138
this.received = received;
138139
this.referred = referredSampleUuid != null;
@@ -178,14 +179,22 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s
178179
contactCaseJurisdiction);
179180
}
180181

181-
EventJurisdictionDto eventJurisdiction = null;
182+
EventParticipantJurisdictionDto eventParticipantJurisdiction = null;
182183
if (associatedEventParticipantUuid != null) {
183-
eventJurisdiction =
184-
new EventJurisdictionDto(eventReportingUserUuid, eventOfficerUuid, eventRegionUuid, eventDistrictUuid, eventCommunityUuid);
184+
eventParticipantJurisdiction = new EventParticipantJurisdictionDto(
185+
associatedEventParticipantUuid,
186+
eventReportingUserUuid,
187+
eventParticipantRegionUuid,
188+
eventParticipantDistrictUuid,
189+
eventUuid);
185190
}
186191

187-
jurisdiction =
188-
new SampleJurisdictionDto(reportingUserUuid, associatedCaseJurisdiction, associatedContactJurisdiction, eventJurisdiction, labUuid);
192+
jurisdiction = new SampleJurisdictionDto(
193+
reportingUserUuid,
194+
associatedCaseJurisdiction,
195+
associatedContactJurisdiction,
196+
eventParticipantJurisdiction,
197+
labUuid);
189198
}
190199

191200
private DistrictReferenceDto createDistrictReference(

sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleJurisdictionDto.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
import de.symeda.sormas.api.caze.CaseJurisdictionDto;
66
import de.symeda.sormas.api.contact.ContactJurisdictionDto;
7-
import de.symeda.sormas.api.event.EventJurisdictionDto;
7+
import de.symeda.sormas.api.event.EventParticipantJurisdictionDto;
88

99
public class SampleJurisdictionDto implements Serializable {
1010

1111
private String reportingUserUuid;
1212
private CaseJurisdictionDto caseJurisdiction;
1313
private ContactJurisdictionDto contactJurisdiction;
14-
private EventJurisdictionDto eventJurisdiction;
14+
private EventParticipantJurisdictionDto eventParticipantJurisdiction;
1515
private String labUuid;
1616

1717
public SampleJurisdictionDto() {
@@ -22,11 +22,12 @@ public SampleJurisdictionDto(
2222
String reportingUserUuid,
2323
CaseJurisdictionDto caseJurisdiction,
2424
ContactJurisdictionDto contactJurisdiction,
25-
EventJurisdictionDto eventJurisdiction,
25+
EventParticipantJurisdictionDto eventParticipantJurisdiction,
2626
String labUuid) {
2727
this.reportingUserUuid = reportingUserUuid;
2828
this.caseJurisdiction = caseJurisdiction;
2929
this.contactJurisdiction = contactJurisdiction;
30+
this.eventParticipantJurisdiction = eventParticipantJurisdiction;
3031
this.labUuid = labUuid;
3132
}
3233

@@ -54,12 +55,12 @@ public void setContactJurisdiction(ContactJurisdictionDto contactJurisdiction) {
5455
this.contactJurisdiction = contactJurisdiction;
5556
}
5657

57-
public EventJurisdictionDto getEventJurisdiction() {
58-
return eventJurisdiction;
58+
public EventParticipantJurisdictionDto getEventParticipantJurisdiction() {
59+
return eventParticipantJurisdiction;
5960
}
6061

61-
public void setEventJurisdiction(EventJurisdictionDto eventJurisdiction) {
62-
this.eventJurisdiction = eventJurisdiction;
62+
public void setEventParticipantJurisdiction(EventParticipantJurisdictionDto eventParticipantJurisdiction) {
63+
this.eventParticipantJurisdiction = eventParticipantJurisdiction;
6364
}
6465

6566
public String getLabUuid() {

sormas-api/src/main/java/de/symeda/sormas/api/survnet/SurvnetGatewayFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ public interface SurvnetGatewayFacade {
3434
* @return http response code of the gateway
3535
*/
3636
int sendCases(List<String> caseUuids);
37+
38+
int sendEvents(List<String> eventUuids);
3739
}

sormas-api/src/main/java/de/symeda/sormas/api/utils/jurisdiction/SampleJurisdictionHelper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public static boolean isInJurisdictionOrOwned(
3535
.isInJurisdictionOrOwned(jurisdictionLevel, userJurisdiction, sampleJurisdiction.getContactJurisdiction());
3636
}
3737

38+
if (sampleJurisdiction.getEventParticipantJurisdiction() != null) {
39+
return EventParticipantJurisdictionHelper
40+
.isInJurisdictionOrOwned(jurisdictionLevel, userJurisdiction, sampleJurisdiction.getEventParticipantJurisdiction());
41+
}
42+
3843
return false;
3944
}
4045
}

sormas-app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>sormas-base</artifactId>
55
<groupId>de.symeda.sormas</groupId>
6-
<version>1.54.1</version>
6+
<version>1.55.0-SNAPSHOT</version>
77
<relativePath>../sormas-base</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

sormas-backend/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>sormas-base</artifactId>
55
<groupId>de.symeda.sormas</groupId>
6-
<version>1.54.1</version>
6+
<version>1.55.0-SNAPSHOT</version>
77
<relativePath>../sormas-base</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
@@ -85,12 +85,20 @@
8585
<artifactId>fr.opensagres.xdocreport.template.velocity</artifactId>
8686
</dependency>
8787

88+
<dependency>
89+
<groupId>org.docx4j</groupId>
90+
<artifactId>docx4j-docx-anon</artifactId>
91+
</dependency>
92+
<dependency>
93+
<groupId>org.docx4j</groupId>
94+
<artifactId>docx4j-JAXB-ReferenceImpl</artifactId>
95+
</dependency>
96+
8897
<dependency>
8998
<groupId>org.freemarker</groupId>
9099
<artifactId>freemarker</artifactId>
91100
</dependency>
92101

93-
94102
<!-- Testing -->
95103

96104
<dependency>

0 commit comments

Comments
 (0)