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

Commit 0d5053c

Browse files
Merge pull request SORMAS-Foundation#3672 from hzi-braunschweig/feature-3418-SurvNet-Adaptions-Create-new-field-staff-or-armed-forces_2
Feature 3418 surv net adaptions create new field staff or armed forces 2
2 parents eca4173 + 1d9c11a commit 0d5053c

23 files changed

Lines changed: 176 additions & 32 deletions

File tree

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import de.symeda.sormas.api.location.LocationDto;
4343
import de.symeda.sormas.api.person.ApproximateAgeType;
4444
import de.symeda.sormas.api.person.ApproximateAgeType.ApproximateAgeHelper;
45+
import de.symeda.sormas.api.person.ArmedForcesRelationType;
4546
import de.symeda.sormas.api.person.BurialConductor;
4647
import de.symeda.sormas.api.person.EducationType;
4748
import de.symeda.sormas.api.person.OccupationType;
@@ -185,6 +186,7 @@ public class CaseExportDto implements Serializable {
185186
@SensitiveData
186187
private String emailAddress;
187188
private String occupationType;
189+
private ArmedForcesRelationType armedForcesRelationType;
188190
private String educationType;
189191
private String travelHistory;
190192
private boolean traveled;
@@ -260,7 +262,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
260262
String addressRegion, String addressDistrict, String addressCommunity, String city, String street, String houseNumber, String additionalInformation, String postalCode,
261263
String facility, String facilityUuid, String facilityDetails,
262264
String phone, String phoneOwner, String emailAddress, EducationType educationType, String educationDetails,
263-
OccupationType occupationType, String occupationDetails, YesNoUnknown contactWithSourceCaseKnown,
265+
OccupationType occupationType, String occupationDetails, ArmedForcesRelationType ArmedForcesRelationType, YesNoUnknown contactWithSourceCaseKnown,
264266
//Date onsetDate,
265267
Vaccination vaccination, String vaccinationDoses, Date vaccinationDate,
266268
VaccinationInfoSource vaccinationInfoSource, YesNoUnknown postpartum, Trimester trimester,
@@ -277,6 +279,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
277279
this.healthConditionsId = healthConditionsId;
278280
this.uuid = uuid;
279281
this.epidNumber = epidNumber;
282+
this.armedForcesRelationType = ArmedForcesRelationType;
280283
this.diseaseFormatted = DiseaseHelper.toString(disease, diseaseDetails);
281284
this.disease = disease;
282285
this.firstName = firstName;
@@ -327,6 +330,7 @@ public CaseExportDto(long id, long personId, long personAddressId, long epiDataI
327330
this.emailAddress = emailAddress;
328331
this.educationType = PersonHelper.buildEducationString(educationType, educationDetails);
329332
this.occupationType = PersonHelper.buildOccupationString(occupationType, occupationDetails);
333+
this.armedForcesRelationType = armedForcesRelationType;
330334
this.contactWithSourceCaseKnown = contactWithSourceCaseKnown;
331335
// this.onsetDate = onsetDate;
332336
this.vaccination = vaccination;
@@ -971,8 +975,8 @@ public String getPhone() {
971975

972976
@Order(75)
973977
@ExportTarget(caseExportTypes = {
974-
CaseExportType.CASE_SURVEILLANCE,
975-
CaseExportType.CASE_MANAGEMENT })
978+
CaseExportType.CASE_SURVEILLANCE,
979+
CaseExportType.CASE_MANAGEMENT })
976980
@ExportProperty(PersonDto.EMAIL_ADDRESS)
977981
@ExportGroup(ExportGroupType.SENSITIVE)
978982
public String getEmailAddress() {
@@ -1004,6 +1008,16 @@ public String getOccupationType() {
10041008
}
10051009

10061010
@Order(78)
1011+
@ExportTarget(caseExportTypes = {
1012+
CaseExportType.CASE_SURVEILLANCE,
1013+
CaseExportType.CASE_MANAGEMENT })
1014+
@ExportProperty(PersonDto.ARMED_FORCES_RELATION_TYPE)
1015+
@ExportGroup(ExportGroupType.PERSON)
1016+
public ArmedForcesRelationType getArmedForcesRelationType() {
1017+
return armedForcesRelationType;
1018+
}
1019+
1020+
@Order(79)
10071021
@ExportTarget(caseExportTypes = {
10081022
CaseExportType.CASE_SURVEILLANCE })
10091023
@ExportProperty(TRAVELED)
@@ -1016,7 +1030,7 @@ public void setTraveled(boolean traveled) {
10161030
this.traveled = traveled;
10171031
}
10181032

1019-
@Order(79)
1033+
@Order(80)
10201034
@ExportTarget(caseExportTypes = {
10211035
CaseExportType.CASE_SURVEILLANCE })
10221036
@ExportProperty(TRAVEL_HISTORY)
@@ -1025,7 +1039,7 @@ public String getTravelHistory() {
10251039
return travelHistory;
10261040
}
10271041

1028-
@Order(80)
1042+
@Order(81)
10291043
@ExportTarget(caseExportTypes = {
10301044
CaseExportType.CASE_SURVEILLANCE })
10311045
@ExportProperty(BURIAL_ATTENDED)
@@ -1038,7 +1052,7 @@ public void setBurialAttended(boolean burialAttended) {
10381052
this.burialAttended = burialAttended;
10391053
}
10401054

1041-
@Order(81)
1055+
@Order(82)
10421056
@ExportTarget(caseExportTypes = {
10431057
CaseExportType.CASE_SURVEILLANCE })
10441058
@ExportProperty(EpiDataDto.CONTACT_WITH_SOURCE_CASE_KNOWN)
@@ -1490,6 +1504,10 @@ public void setOccupationType(String occupationType) {
14901504
this.occupationType = occupationType;
14911505
}
14921506

1507+
public void setArmedForcesRelationType(ArmedForcesRelationType armedForcesRelationType) {
1508+
this.armedForcesRelationType = armedForcesRelationType;
1509+
}
1510+
14931511
public void setTravelHistory(String travelHistory) {
14941512
this.travelHistory = travelHistory;
14951513
}

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

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import de.symeda.sormas.api.facility.FacilityHelper;
2929
import de.symeda.sormas.api.person.ApproximateAgeType;
3030
import de.symeda.sormas.api.person.ApproximateAgeType.ApproximateAgeHelper;
31+
import de.symeda.sormas.api.person.ArmedForcesRelationType;
3132
import de.symeda.sormas.api.person.OccupationType;
3233
import de.symeda.sormas.api.person.PersonHelper;
3334
import de.symeda.sormas.api.person.PresentCondition;
@@ -104,6 +105,7 @@ public class ContactExportDto implements Serializable {
104105
@SensitiveData
105106
private String emailAddress;
106107
private String occupationType;
108+
private ArmedForcesRelationType armedForcesRelationType;
107109
private int numberOfVisits;
108110
private YesNoUnknown lastCooperativeVisitSymptomatic;
109111
private Date lastCooperativeVisitDate;
@@ -154,7 +156,7 @@ public ContactExportDto(long id, long personId, String uuid, String sourceCaseUu
154156
PresentCondition presentCondition, Date deathDate,
155157
String addressRegion, String addressDistrict, String addressCommunity, String city, String street, String houseNumber, String additionalInformation, String postalCode,
156158
String facility, String facilityUuid, String facilityDetails,
157-
String phone, String phoneOwner, String emailAddress, OccupationType occupationType, String occupationDetails,
159+
String phone, String phoneOwner, String emailAddress, OccupationType occupationType, String occupationDetails, ArmedForcesRelationType armedForcesRelationType,
158160
String region, String district, String community,
159161
long epiDataId, YesNoUnknown contactWithSourceCaseKnown, YesNoUnknown returningTraveler, long eventCount, String externalID,
160162
String reportingUserUuid, String regionUuid, String districtUuid, String communityUuid,
@@ -212,6 +214,7 @@ public ContactExportDto(long id, long personId, String uuid, String sourceCaseUu
212214
this.phone = PersonHelper.buildPhoneString(phone, phoneOwner);
213215
this.emailAddress = emailAddress;
214216
this.occupationType = PersonHelper.buildOccupationString(occupationType, occupationDetails);
217+
this.armedForcesRelationType = armedForcesRelationType;
215218
this.region = region;
216219
this.district = district;
217220
this.community = community;
@@ -527,26 +530,31 @@ public String getOccupationType() {
527530
}
528531

529532
@Order(61)
533+
public ArmedForcesRelationType getArmedForcesRelationType() {
534+
return armedForcesRelationType;
535+
}
536+
537+
@Order(62)
530538
public int getNumberOfVisits() {
531539
return numberOfVisits;
532540
}
533541

534-
@Order(62)
542+
@Order(63)
535543
public YesNoUnknown getLastCooperativeVisitSymptomatic() {
536544
return lastCooperativeVisitSymptomatic;
537545
}
538546

539-
@Order(63)
547+
@Order(64)
540548
public Date getLastCooperativeVisitDate() {
541549
return lastCooperativeVisitDate;
542550
}
543551

544-
@Order(64)
552+
@Order(65)
545553
public String getLastCooperativeVisitSymptoms() {
546554
return lastCooperativeVisitSymptoms;
547555
}
548556

549-
@Order(65)
557+
@Order(66)
550558
public boolean isTraveled() {
551559
return traveled;
552560
}
@@ -555,7 +563,7 @@ public void setTraveled(boolean traveled) {
555563
this.traveled = traveled;
556564
}
557565

558-
@Order(66)
566+
@Order(67)
559567
public String getTravelHistory() {
560568
return travelHistory;
561569
}
@@ -564,7 +572,7 @@ public void setTravelHistory(String travelHistory) {
564572
this.travelHistory = travelHistory;
565573
}
566574

567-
@Order(67)
575+
@Order(68)
568576
public boolean isBurialAttended() {
569577
return burialAttended;
570578
}
@@ -573,7 +581,7 @@ public void setBurialAttended(boolean burialAttended) {
573581
this.burialAttended = burialAttended;
574582
}
575583

576-
@Order(68)
584+
@Order(69)
577585
public YesNoUnknown getContactWithSourceCaseKnown() {
578586
return contactWithSourceCaseKnown;
579587
}
@@ -722,6 +730,10 @@ public void setOccupationType(String occupationType) {
722730
this.occupationType = occupationType;
723731
}
724732

733+
public void setArmedForcesRelationType(ArmedForcesRelationType armedForcesRelationType) {
734+
this.armedForcesRelationType = armedForcesRelationType;
735+
}
736+
725737
public void setLastCooperativeVisitSymptomatic(YesNoUnknown lastCooperativeVisitSymptomatic) {
726738
this.lastCooperativeVisitSymptomatic = lastCooperativeVisitSymptomatic;
727739
}

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
@@ -1102,6 +1102,7 @@ public interface Captions {
11021102
String Person_approximateAge = "Person.approximateAge";
11031103
String Person_approximateAgeReferenceDate = "Person.approximateAgeReferenceDate";
11041104
String Person_approximateAgeType = "Person.approximateAgeType";
1105+
String Person_armedForcesRelationType = "Person.armedForcesRelationType";
11051106
String Person_birthdate = "Person.birthdate";
11061107
String Person_birthdateDD = "Person.birthdateDD";
11071108
String Person_birthdateMM = "Person.birthdateMM";
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package de.symeda.sormas.api.person;
2+
3+
import de.symeda.sormas.api.i18n.I18nProperties;
4+
5+
public enum ArmedForcesRelationType {
6+
7+
UNKNOWN,
8+
NO_RELATION,
9+
// working for armed forces, but not as soldier
10+
CIVIL,
11+
SOLDIER_OR_RELATIVE;
12+
13+
public String toString() {
14+
return I18nProperties.getEnumCaption(this);
15+
}
16+
17+
}

sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public class PersonDto extends PseudonymizableDto {
8383
public static final String EDUCATION_DETAILS = "educationDetails";
8484
public static final String OCCUPATION_TYPE = "occupationType";
8585
public static final String OCCUPATION_DETAILS = "occupationDetails";
86+
public static final String ARMED_FORCES_RELATION_TYPE = "armedForcesRelationType";
8687

8788
public static final String FATHERS_NAME = "fathersName";
8889
public static final String MOTHERS_NAME = "mothersName";
@@ -255,6 +256,9 @@ public class PersonDto extends PseudonymizableDto {
255256
@SensitiveData
256257
private String occupationDetails;
257258
@SensitiveData
259+
@HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_GERMANY)
260+
private ArmedForcesRelationType armedForcesRelationType;
261+
@SensitiveData
258262
private String generalPractitionerDetails;
259263
@SensitiveData
260264
private String passportNumber;
@@ -498,6 +502,14 @@ public void setOccupationDetails(String occupationDetails) {
498502
this.occupationDetails = occupationDetails;
499503
}
500504

505+
public ArmedForcesRelationType getArmedForcesRelationType() {
506+
return armedForcesRelationType;
507+
}
508+
509+
public void setArmedForcesRelationType(ArmedForcesRelationType armedForcesRelationType) {
510+
this.armedForcesRelationType = armedForcesRelationType;
511+
}
512+
501513
public String getMothersName() {
502514
return mothersName;
503515
}

sormas-api/src/main/java/de/symeda/sormas/api/utils/InfoProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static synchronized InfoProvider get() {
4949
* @return
5050
*/
5151
public String getMinimumRequiredVersion() {
52-
return "1.52.0";
52+
return "1.53.0";
5353
}
5454

5555
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ Person.occupationFacilityType=Facility type
12541254
Person.occupationRegion=Facility region
12551255
Person.occupationType=Type of occupation
12561256
Person.other.occupationDetails=Please specify occupation
1257+
Person.armedForcesRelationType=Staff of armed forces
12571258
Person.phone=Phone number
12581259
Person.phoneOwner=Owner of phone
12591260
Person.placeOfBirthRegion=Region of birth

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ Person.occupationFacilityType=Art der Einrichtung
12501250
Person.occupationRegion=Bundesland der Einrichtung
12511251
Person.occupationType=Beschäftigungsart
12521252
Person.other.occupationDetails=Bitte geben Sie Ihren Beruf an
1253+
Person.armedForcesRelationType=Zugehörigkeit zur Bundeswehr
12531254
Person.phone=Telefonnummer
12541255
Person.phoneOwner=Besitzer des Telefons
12551256
Person.placeOfBirthRegion=Geburt Bundesland

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ AreaType.URBAN = Urban
9393
AreaType.RURAL = Rural
9494
AreaType.UNKNOWN = Unknown
9595

96+
ArmedForcesRelationType.UNKNOWN = Unknown
97+
ArmedForcesRelationType.NO_RELATION = No relation to armed forces
98+
ArmedForcesRelationType.CIVIL = Civil person working for/accomodated in facility of armed forces
99+
ArmedForcesRelationType.SOLDIER_OR_RELATIVE = Soldier, Relative
100+
96101
ArrivalOrDeparture.ARRIVAL = Arrival
97102
ArrivalOrDeparture.DEPARTURE = Departure
98103
ArrivalOrDeparture.UNKNOWN = Unknown

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ AreaType.URBAN = Städtisch
9393
AreaType.RURAL = Ländlich
9494
AreaType.UNKNOWN = Unbekannt
9595

96+
ArmedForcesRelationType.UNKNOWN = Nicht ermittelbar
97+
ArmedForcesRelationType.NO_RELATION = Kein Bezug zur BW
98+
ArmedForcesRelationType.CIVIL = Zivilperson tätig/untergebracht in Einrichtung der BW
99+
ArmedForcesRelationType.SOLDIER_OR_RELATIVE = Soldat/BW-Angehöriger
100+
96101
ArrivalOrDeparture.ARRIVAL = Ankunft
97102
ArrivalOrDeparture.DEPARTURE = Abreise
98103
ArrivalOrDeparture.UNKNOWN = Unbekannt

0 commit comments

Comments
 (0)