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

Commit 48513f3

Browse files
author
barnabartha
committed
Merge branch 'development' into bug-4008-MergeCasesFilterFix
# Conflicts: # sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java
2 parents 3c90edf + 4e07b82 commit 48513f3

344 files changed

Lines changed: 6871 additions & 1365 deletions

File tree

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/ConfigFacade.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,5 @@ public interface ConfigFacade {
117117

118118
boolean isSmsServiceSetUp();
119119

120+
String getDemisJndiName();
120121
}

sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package de.symeda.sormas.api;
1616

17+
import javax.naming.ConfigurationException;
1718
import javax.naming.InitialContext;
1819
import javax.naming.NamingException;
1920

@@ -48,6 +49,8 @@
4849
import de.symeda.sormas.api.infrastructure.InfrastructureFacade;
4950
import de.symeda.sormas.api.infrastructure.PointOfEntryFacade;
5051
import de.symeda.sormas.api.infrastructure.PopulationDataFacade;
52+
import de.symeda.sormas.api.labmessage.ExternalLabResultsFacade;
53+
import de.symeda.sormas.api.labmessage.LabMessageFacade;
5154
import de.symeda.sormas.api.outbreak.OutbreakFacade;
5255
import de.symeda.sormas.api.person.PersonFacade;
5356
import de.symeda.sormas.api.region.AreaFacade;
@@ -327,6 +330,23 @@ public static SystemEventFacade getSystemEventFacade() {
327330
return get().lookupEjbRemote(SystemEventFacade.class);
328331
}
329332

333+
public static LabMessageFacade getLabMessageFacade() {
334+
return get().lookupEjbRemote(LabMessageFacade.class);
335+
}
336+
337+
public static ExternalLabResultsFacade getExternalLabResultsFacade() {
338+
try {
339+
String jndiName = FacadeProvider.getConfigFacade().getDemisJndiName();
340+
if (jndiName == null) {
341+
throw new ConfigurationException("No LabResultAdapter JNDI name is configured in the sormas.properties");
342+
} else {
343+
return (ExternalLabResultsFacade) get().ic.lookup(jndiName);
344+
}
345+
} catch (NamingException e) {
346+
throw new RuntimeException(e.getMessage(), e);
347+
}
348+
}
349+
330350
@SuppressWarnings("unchecked")
331351
public <P> P lookupEjbRemote(Class<P> clazz) {
332352
try {

sormas-api/src/main/java/de/symeda/sormas/api/action/ActionDto.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ public class ActionDto extends EntityDto {
4141
public static final String EVENT = "event";
4242
public static final String ACTION_CONTEXT = "actionContext";
4343
public static final String ACTION_STATUS = "actionStatus";
44+
public static final String ACTION_MEASURE = "actionMeasure";
4445

4546
@Required
4647
private ActionContext actionContext;
4748
private EventReferenceDto event;
4849

50+
private ActionMeasure actionMeasure;
4951
private ActionPriority priority;
5052
@Required
5153
private Date date;
@@ -59,12 +61,17 @@ public class ActionDto extends EntityDto {
5961
private UserReferenceDto lastModifiedBy;
6062

6163
public static ActionDto build(ActionContext context, ReferenceDto entityRef) {
64+
return build(context, null, entityRef);
65+
}
66+
67+
public static ActionDto build(ActionContext context, ActionMeasure actionMeasure, ReferenceDto entityRef) {
6268

6369
ActionDto action = new ActionDto();
6470
action.setUuid(DataHelper.createUuid());
6571
action.setDate(ActionHelper.getDefaultDate());
6672
action.setActionStatus(ActionStatus.PENDING);
6773
action.setPriority(ActionPriority.NORMAL);
74+
action.setActionMeasure(actionMeasure);
6875
action.setActionContext(context);
6976
switch (context) {
7077
case EVENT:
@@ -162,6 +169,14 @@ public void setPriority(ActionPriority priority) {
162169
this.priority = priority;
163170
}
164171

172+
public ActionMeasure getActionMeasure() {
173+
return actionMeasure;
174+
}
175+
176+
public void setActionMeasure(ActionMeasure actionMeasure) {
177+
this.actionMeasure = actionMeasure;
178+
}
179+
165180
public ReferenceDto getContextReference() {
166181

167182
switch (actionContext) {
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.action;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum ActionMeasure {
21+
22+
PROHIBITION_OF_ENTRY_AND_WORK_CASES,
23+
SAMPLE_COLLECTION,
24+
FORWARDING_TO_NATIONAL_REFERENCE_CENTER,
25+
CONTACT_FOLLOW_UP,
26+
VERIFICATION_OF_VACCINATION_IMMUNIZATION,
27+
POST_EXPOSURE_PROPHYLAXIS_VACCINATION,
28+
CLOSURE_OF_FACILITY,
29+
PROHIBITION_OF_ENTRY_AND_WORK_CONTACTS,
30+
POPULATION_INFORMATION,
31+
OTHER;
32+
33+
public String toString() {
34+
return I18nProperties.getEnumCaption(this);
35+
}
36+
37+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public String getExternalID() {
462462
@ExportTarget(caseExportTypes = {
463463
CaseExportType.CASE_SURVEILLANCE,
464464
CaseExportType.CASE_MANAGEMENT })
465-
@ExportProperty(CaseDataDto.EXTERNAL_ID)
465+
@ExportProperty(CaseDataDto.EXTERNAL_TOKEN)
466466
@ExportGroup(ExportGroupType.CORE)
467467
public String getExternalToken() {
468468
return externalToken;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,6 @@ void saveBulkEditWithFacilities(
204204
boolean outcomeChange,
205205
boolean surveillanceOfficerChange,
206206
Boolean doTransfer);
207+
208+
List<CasePersonDto> getDuplicates(CasePersonDto casePerson);
207209
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2021 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.caze;
17+
18+
import java.io.Serializable;
19+
20+
import de.symeda.sormas.api.person.PersonDto;
21+
22+
public class CasePersonDto implements Serializable {
23+
24+
private static final long serialVersionUID = 4238365446327936524L;
25+
26+
private CaseDataDto caze;
27+
28+
private PersonDto person;
29+
30+
public CasePersonDto() {
31+
}
32+
33+
public CasePersonDto(CaseDataDto caze, PersonDto person) {
34+
this.caze = caze;
35+
this.person = person;
36+
}
37+
38+
public CaseDataDto getCaze() {
39+
return caze;
40+
}
41+
42+
public void setCaze(CaseDataDto caze) {
43+
this.caze = caze;
44+
}
45+
46+
public PersonDto getPerson() {
47+
return person;
48+
}
49+
50+
public void setPerson(PersonDto person) {
51+
this.person = person;
52+
}
53+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,8 @@ public String getReportingDistrict() {
855855
}
856856

857857
@Order(84)
858+
@ExportProperty(ContactDto.EXTERNAL_TOKEN)
859+
@ExportGroup(ExportGroupType.CORE)
858860
public String getExternalToken() {
859861
return externalToken;
860862
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.event;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum DiseaseTransmissionMode {
21+
22+
HUMAN_TO_HUMAN,
23+
ANIMAL,
24+
ENVIRONMENT,
25+
FOOD,
26+
VECTOR_BORNE,
27+
UNKNOWN;
28+
29+
public String toString() {
30+
return I18nProperties.getEnumCaption(this);
31+
}
32+
33+
}

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.Serializable;
2121
import java.util.Date;
2222

23+
import de.symeda.sormas.api.action.ActionMeasure;
2324
import de.symeda.sormas.api.action.ActionPriority;
2425
import de.symeda.sormas.api.action.ActionStatus;
2526
import de.symeda.sormas.api.user.UserReferenceDto;
@@ -37,6 +38,7 @@ public class EventActionExportDto implements Serializable {
3738
private String eventDate;
3839
private EventStatus eventStatus;
3940
private EventInvestigationStatus eventInvestigationStatus;
41+
private ActionMeasure actionMeasure;
4042
private String actionTitle;
4143
private Date actionCreationDate;
4244
private Date actionChangeDate;
@@ -52,6 +54,7 @@ public EventActionExportDto(
5254
Date eventEndDate,
5355
EventStatus eventStatus,
5456
EventInvestigationStatus eventInvestigationStatus,
57+
ActionMeasure actionMeasure,
5558
String actionTitle,
5659
Date actionCreationDate,
5760
Date actionChangeDate,
@@ -70,6 +73,7 @@ public EventActionExportDto(
7073
this.eventDate = EventHelper.buildEventDateString(eventStartDate, eventEndDate);
7174
this.eventStatus = eventStatus;
7275
this.eventInvestigationStatus = eventInvestigationStatus;
76+
this.actionMeasure = actionMeasure;
7377
this.actionTitle = actionTitle;
7478
this.actionCreationDate = actionCreationDate;
7579
this.actionChangeDate = actionChangeDate;
@@ -111,31 +115,36 @@ public EventInvestigationStatus getEventInvestigationStatus() {
111115
}
112116

113117
@Order(6)
118+
public ActionMeasure getActionMeasure() {
119+
return actionMeasure;
120+
}
121+
122+
@Order(7)
114123
public String getActionTitle() {
115124
return actionTitle;
116125
}
117126

118-
@Order(7)
127+
@Order(8)
119128
public Date getActionCreationDate() {
120129
return actionCreationDate;
121130
}
122131

123-
@Order(8)
132+
@Order(9)
124133
public Date getActionChangeDate() {
125134
return actionChangeDate;
126135
}
127136

128-
@Order(9)
137+
@Order(10)
129138
public ActionStatus getActionStatus() {
130139
return actionStatus;
131140
}
132141

133-
@Order(10)
142+
@Order(11)
134143
public ActionPriority getActionPriority() {
135144
return actionPriority;
136145
}
137146

138-
@Order(11)
147+
@Order(12)
139148
public UserReferenceDto getActionLastModifiedBy() {
140149
return actionLastModifiedBy;
141150
}

0 commit comments

Comments
 (0)