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

Commit f85592d

Browse files
SORMAS-Foundation#3407 - Added patient exposition role to exposures for DE only
1 parent f00035f commit f85592d

11 files changed

Lines changed: 83 additions & 1 deletion

File tree

sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import de.symeda.sormas.api.user.UserReferenceDto;
2828
import de.symeda.sormas.api.utils.DataHelper;
2929
import de.symeda.sormas.api.utils.Diseases;
30+
import de.symeda.sormas.api.utils.HideForCountriesExcept;
3031
import de.symeda.sormas.api.utils.PersonalData;
3132
import de.symeda.sormas.api.utils.Required;
3233
import de.symeda.sormas.api.utils.SensitiveData;
@@ -88,6 +89,7 @@ public class ExposureDto extends PseudonymizableDto {
8889
public static final String DECEASED_PERSON_ILL = "deceasedPersonIll";
8990
public static final String DECEASED_PERSON_NAME = "deceasedPersonName";
9091
public static final String DECEASED_PERSON_RELATION = "deceasedPersonRelation";
92+
public static final String PATIENT_EXPOSITION_ROLE = "patientExpositionRole";
9193

9294
@SensitiveData
9395
private UserReferenceDto reportingUser;
@@ -100,6 +102,8 @@ public class ExposureDto extends PseudonymizableDto {
100102
@SensitiveData
101103
private String exposureTypeDetails;
102104
private LocationDto location;
105+
@HideForCountriesExcept
106+
private PatientExpositionRole patientExpositionRole;
103107

104108
// Type of Place
105109
private TypeOfPlace typeOfPlace;
@@ -302,6 +306,14 @@ public void setLocation(LocationDto location) {
302306
this.location = location;
303307
}
304308

309+
public PatientExpositionRole getPatientExpositionRole() {
310+
return patientExpositionRole;
311+
}
312+
313+
public void setPatientExpositionRole(PatientExpositionRole patientExpositionRole) {
314+
this.patientExpositionRole = patientExpositionRole;
315+
}
316+
305317
public YesNoUnknown getIndoors() {
306318
return indoors;
307319
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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.exposure;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum PatientExpositionRole {
21+
22+
NOT_COLLECTED,
23+
UNKNOWN,
24+
WORKING_AT,
25+
ACCOMMODATED_IN,
26+
CARED_FOR,
27+
OTHER;
28+
29+
public String toString() {
30+
return I18nProperties.getEnumCaption(this);
31+
}
32+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ public interface Captions {
907907
String Exposure_meansOfTransportDetails = "Exposure.meansOfTransportDetails";
908908
String Exposure_otherProtectiveMeasures = "Exposure.otherProtectiveMeasures";
909909
String Exposure_outdoors = "Exposure.outdoors";
910+
String Exposure_patientExpositionRole = "Exposure.patientExpositionRole";
910911
String Exposure_percutaneous = "Exposure.percutaneous";
911912
String Exposure_physicalContactDuringPreparation = "Exposure.physicalContactDuringPreparation";
912913
String Exposure_physicalContactWithBody = "Exposure.physicalContactWithBody";

sormas-api/src/main/resources/captions.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ Exposure.prophylaxis=Post-exposure prophylaxis
10281028
Exposure.prophylaxisDate=Date of prophylaxis
10291029
Exposure.riskArea=Risk area as defined by public health institution
10301030
Exposure.exposureDate=Exposure date
1031+
Exposure.patientExpositionRole=In the role of
10311032

10321033
# Facility
10331034
facilityActiveFacilities=Active facilities

sormas-api/src/main/resources/captions_de-DE.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,7 @@ Exposure.prophylaxis=Postexpositionelle Prophylaxe
10271027
Exposure.prophylaxisDate=Datum der Prophylaxe
10281028
Exposure.riskArea=Risikogebiet, wie von der öffentlichen Gesundheitsinstitution definiert
10291029
Exposure.exposureDate=Datum der Exposition
1030+
Exposure.patientExpositionRole=Rolle als
10301031

10311032
# Facility
10321033
facilityActiveFacilities=Aktive Einrichtungen

sormas-api/src/main/resources/enum.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,13 @@ PathogenTestType.LATEX_AGGLUTINATION = Latex Agglutination
717717
PathogenTestType.CQ_VALUE_DETECTION = CQ Value Detection
718718
PathogenTestType.SEQUENCING = Sequencing
719719

720+
PatientExpositionRole.NOT_COLLECTED = Not collected
721+
PatientExpositionRole.UNKNOWN = Unknown
722+
PatientExpositionRole.WORKING_AT = Working at
723+
PatientExpositionRole.ACCOMMODATED_IN = Accommodated in
724+
PatientExpositionRole.CARED_FOR = Cared for
725+
PatientExpositionRole.OTHER = Other
726+
720727
#SymptomJournalStatus
721728
SymptomJournalStatus.UNREGISTERED = Unregistered
722729
SymptomJournalStatus.REGISTERED = Registered

sormas-api/src/main/resources/enum_de-DE.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,13 @@ PathogenTestType.LATEX_AGGLUTINATION = Latex-Agglutination
717717
PathogenTestType.CQ_VALUE_DETECTION = CQ Wert Nachweis
718718
PathogenTestType.SEQUENCING = Sequenzierung
719719

720+
PatientExpositionRole.NOT_COLLECTED = Nicht erhoben
721+
PatientExpositionRole.UNKNOWN = Nicht ermittelbar
722+
PatientExpositionRole.WORKING_AT = Tätig bei
723+
PatientExpositionRole.ACCOMMODATED_IN = Untergebracht in
724+
PatientExpositionRole.CARED_FOR = Betreut in
725+
PatientExpositionRole.OTHER = Andere/sonstige
726+
720727
#SymptomJournalStatus
721728
SymptomJournalStatus.UNREGISTERED = Nicht registriert
722729
SymptomJournalStatus.REGISTERED = Registriert

sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public Exposure fromExposureDto(ExposureDto source) {
158158
target.setProphylaxis(source.getProphylaxis());
159159
target.setProphylaxisDate(source.getProphylaxisDate());
160160
target.setRiskArea(source.getRiskArea());
161+
target.setPatientExpositionRole(source.getPatientExpositionRole());
161162

162163
return exposure;
163164
}
@@ -252,6 +253,7 @@ public static ExposureDto toExposureDto(Exposure source) {
252253
target.setProphylaxis(source.getProphylaxis());
253254
target.setProphylaxisDate(source.getProphylaxisDate());
254255
target.setRiskArea(source.getRiskArea());
256+
target.setPatientExpositionRole(source.getPatientExpositionRole());
255257

256258
return target;
257259
}

sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import de.symeda.sormas.api.exposure.ExposureType;
4040
import de.symeda.sormas.api.exposure.GatheringType;
4141
import de.symeda.sormas.api.exposure.HabitationType;
42+
import de.symeda.sormas.api.exposure.PatientExpositionRole;
4243
import de.symeda.sormas.api.exposure.TypeOfAnimal;
4344
import de.symeda.sormas.api.utils.YesNoUnknown;
4445
import de.symeda.sormas.backend.common.AbstractDomainObject;
@@ -68,6 +69,7 @@ public class Exposure extends AbstractDomainObject {
6869
private ExposureType exposureType;
6970
private String exposureTypeDetails;
7071
private Location location;
72+
private PatientExpositionRole patientExpositionRole;
7173

7274
// Type of Place
7375
private TypeOfPlace typeOfPlace;
@@ -198,6 +200,15 @@ public void setLocation(Location location) {
198200
this.location = location;
199201
}
200202

203+
@Enumerated(EnumType.STRING)
204+
public PatientExpositionRole getPatientExpositionRole() {
205+
return patientExpositionRole;
206+
}
207+
208+
public void setPatientExpositionRole(PatientExpositionRole patientExpositionRole) {
209+
this.patientExpositionRole = patientExpositionRole;
210+
}
211+
201212
@Enumerated(EnumType.STRING)
202213
public YesNoUnknown getIndoors() {
203214
return indoors;

sormas-backend/src/main/resources/sql/sormas_schema.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6101,4 +6101,10 @@ ALTER TABLE person_history
61016101

61026102
INSERT INTO schema_version (version_number, comment) VALUES (293, 'SurvNet Adaptations - Create new field “Salutation” for persons #3411');
61036103

6104+
-- 2020-12-11 - Add patient exposition role to exposures #3407
6105+
ALTER TABLE exposures ADD COLUMN patientexpositionrole varchar(255);
6106+
ALTER TABLE exposures_history ADD COLUMN patientexpositionrole varchar(255);
6107+
6108+
INSERT INTO schema_version (version_number, comment) VALUES (294, 'Add patient exposition role to exposures #3407');
6109+
61046110
-- *** Insert new sql commands BEFORE this line ***

0 commit comments

Comments
 (0)