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

Commit 987f783

Browse files
Merge pull request SORMAS-Foundation#3023 from hzi-braunschweig/2959_cases_MED_for_Switzerland
SORMAS-Foundation#2959 added case fields for Switzerland
2 parents 4b6391f + ca0ddfc commit 987f783

26 files changed

Lines changed: 900 additions & 80 deletions

File tree

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

Lines changed: 124 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api.caze;
1919

20+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY;
21+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND;
22+
23+
import java.util.Date;
24+
2025
import de.symeda.sormas.api.Disease;
2126
import de.symeda.sormas.api.ImportIgnore;
2227
import de.symeda.sormas.api.PseudonymizableDto;
@@ -43,15 +48,14 @@
4348
import de.symeda.sormas.api.utils.DataHelper;
4449
import de.symeda.sormas.api.utils.Diseases;
4550
import de.symeda.sormas.api.utils.EmbeddedPersonalData;
51+
import de.symeda.sormas.api.utils.HideForCountries;
4652
import de.symeda.sormas.api.utils.HideForCountriesExcept;
4753
import de.symeda.sormas.api.utils.Outbreaks;
4854
import de.symeda.sormas.api.utils.PersonalData;
4955
import de.symeda.sormas.api.utils.Required;
5056
import de.symeda.sormas.api.utils.SensitiveData;
5157
import de.symeda.sormas.api.utils.YesNoUnknown;
5258

53-
import java.util.Date;
54-
5559
public class CaseDataDto extends PseudonymizableDto {
5660

5761
private static final long serialVersionUID = 5007131477733638086L;
@@ -146,6 +150,16 @@ public class CaseDataDto extends PseudonymizableDto {
146150
public static final String VISITS = "visits";
147151
public static final String FACILITY_TYPE = "facilityType";
148152

153+
public static final String CASE_ID_ISM = "caseIdIsm";
154+
public static final String COVID_TEST_REASON = "covidTestReason";
155+
public static final String COVID_TEST_REASON_DETAILS = "covidTestReasonDetails";
156+
public static final String CONTACT_TRACING_FIRST_CONTACT_TYPE = "contactTracingFirstContactType";
157+
public static final String CONTACT_TRACING_FIRST_CONTACT_DATE = "contactTracingFirstContactDate";
158+
public static final String QUARANTINE_REASON_BEFORE_ISOLATION = "quarantineReasonBeforeIsolation";
159+
public static final String QUARANTINE_REASON_BEFORE_ISOLATION_DETAILS = "quarantineReasonBeforeIsolationDetails";
160+
public static final String END_OF_ISOLATION_REASON = "endOfIsolationReason";
161+
public static final String END_OF_ISOLATION_REASON_DETAILS = "endOfIsolationReasonDetails";
162+
149163
// Fields are declared in the order they should appear in the import template
150164

151165
@Outbreaks
@@ -169,6 +183,7 @@ public class CaseDataDto extends PseudonymizableDto {
169183
@EmbeddedPersonalData
170184
private PersonReferenceDto person;
171185
@Outbreaks
186+
@HideForCountries()
172187
private String epidNumber;
173188
@Outbreaks
174189
@Required
@@ -337,6 +352,7 @@ public class CaseDataDto extends PseudonymizableDto {
337352
private String pointOfEntryDetails;
338353
@SensitiveData
339354
private String additionalDetails;
355+
@HideForCountriesExcept
340356
private String externalID;
341357
private boolean sharedToCountry;
342358
private QuarantineType quarantine;
@@ -347,20 +363,20 @@ public class CaseDataDto extends PseudonymizableDto {
347363
@SensitiveData
348364
private String quarantineHelpNeeded;
349365
@HideForCountriesExcept(countries = {
350-
"de",
351-
"ch" })
366+
COUNTRY_CODE_GERMANY,
367+
COUNTRY_CODE_SWITZERLAND })
352368
private boolean quarantineOrderedVerbally;
353369
@HideForCountriesExcept(countries = {
354-
"de",
355-
"ch" })
370+
COUNTRY_CODE_GERMANY,
371+
COUNTRY_CODE_SWITZERLAND })
356372
private boolean quarantineOrderedOfficialDocument;
357373
@HideForCountriesExcept(countries = {
358-
"de",
359-
"ch" })
374+
COUNTRY_CODE_GERMANY,
375+
COUNTRY_CODE_SWITZERLAND })
360376
private Date quarantineOrderedVerballyDate;
361377
@HideForCountriesExcept(countries = {
362-
"de",
363-
"ch" })
378+
COUNTRY_CODE_GERMANY,
379+
COUNTRY_CODE_SWITZERLAND })
364380
private Date quarantineOrderedOfficialDocumentDate;
365381
@HideForCountriesExcept
366382
private YesNoUnknown quarantineHomePossible;
@@ -375,12 +391,12 @@ public class CaseDataDto extends PseudonymizableDto {
375391
private boolean quarantineExtended;
376392
private boolean quarantineReduced;
377393
@HideForCountriesExcept(countries = {
378-
"de",
379-
"ch" })
394+
COUNTRY_CODE_GERMANY,
395+
COUNTRY_CODE_SWITZERLAND })
380396
private boolean quarantineOfficialOrderSent;
381397
@HideForCountriesExcept(countries = {
382-
"de",
383-
"ch" })
398+
COUNTRY_CODE_GERMANY,
399+
COUNTRY_CODE_SWITZERLAND })
384400
private Date quarantineOfficialOrderSentDate;
385401
private ReportingType reportingType;
386402
private YesNoUnknown postpartum;
@@ -390,6 +406,28 @@ public class CaseDataDto extends PseudonymizableDto {
390406
private Date followUpUntil;
391407
private boolean overwriteFollowUpUntil;
392408

409+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
410+
private Integer caseIdIsm;
411+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
412+
private CovidTestReason covidTestReason;
413+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
414+
@SensitiveData
415+
private String covidTestReasonDetails;
416+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
417+
private ContactTracingContactType contactTracingFirstContactType;
418+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
419+
private Date contactTracingFirstContactDate;
420+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
421+
private QuarantineReason quarantineReasonBeforeIsolation;
422+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
423+
@SensitiveData
424+
private String quarantineReasonBeforeIsolationDetails;
425+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
426+
private EndOfIsolationReason endOfIsolationReason;
427+
@HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND)
428+
@SensitiveData
429+
private String endOfIsolationReasonDetails;
430+
393431
public static CaseDataDto build(PersonReferenceDto person, Disease disease) {
394432
return build(person, disease, null);
395433
}
@@ -1153,4 +1191,76 @@ public FacilityType getFacilityType() {
11531191
public void setFacilityType(FacilityType facilityType) {
11541192
this.facilityType = facilityType;
11551193
}
1194+
1195+
public Integer getCaseIdIsm() {
1196+
return caseIdIsm;
1197+
}
1198+
1199+
public void setCaseIdIsm(Integer caseIdIsm) {
1200+
this.caseIdIsm = caseIdIsm;
1201+
}
1202+
1203+
public CovidTestReason getCovidTestReason() {
1204+
return covidTestReason;
1205+
}
1206+
1207+
public void setCovidTestReason(CovidTestReason covidTestReason) {
1208+
this.covidTestReason = covidTestReason;
1209+
}
1210+
1211+
public String getCovidTestReasonDetails() {
1212+
return covidTestReasonDetails;
1213+
}
1214+
1215+
public void setCovidTestReasonDetails(String covidTestReasonDetails) {
1216+
this.covidTestReasonDetails = covidTestReasonDetails;
1217+
}
1218+
1219+
public ContactTracingContactType getContactTracingFirstContactType() {
1220+
return contactTracingFirstContactType;
1221+
}
1222+
1223+
public void setContactTracingFirstContactType(ContactTracingContactType contactTracingFirstContactType) {
1224+
this.contactTracingFirstContactType = contactTracingFirstContactType;
1225+
}
1226+
1227+
public Date getContactTracingFirstContactDate() {
1228+
return contactTracingFirstContactDate;
1229+
}
1230+
1231+
public void setContactTracingFirstContactDate(Date contactTracingFirstContactDate) {
1232+
this.contactTracingFirstContactDate = contactTracingFirstContactDate;
1233+
}
1234+
1235+
public QuarantineReason getQuarantineReasonBeforeIsolation() {
1236+
return quarantineReasonBeforeIsolation;
1237+
}
1238+
1239+
public void setQuarantineReasonBeforeIsolation(QuarantineReason quarantineReasonBeforeIsolation) {
1240+
this.quarantineReasonBeforeIsolation = quarantineReasonBeforeIsolation;
1241+
}
1242+
1243+
public String getQuarantineReasonBeforeIsolationDetails() {
1244+
return quarantineReasonBeforeIsolationDetails;
1245+
}
1246+
1247+
public void setQuarantineReasonBeforeIsolationDetails(String quarantineReasonBeforeIsolationDetails) {
1248+
this.quarantineReasonBeforeIsolationDetails = quarantineReasonBeforeIsolationDetails;
1249+
}
1250+
1251+
public EndOfIsolationReason getEndOfIsolationReason() {
1252+
return endOfIsolationReason;
1253+
}
1254+
1255+
public void setEndOfIsolationReason(EndOfIsolationReason endOfIsolationReason) {
1256+
this.endOfIsolationReason = endOfIsolationReason;
1257+
}
1258+
1259+
public String getEndOfIsolationReasonDetails() {
1260+
return endOfIsolationReasonDetails;
1261+
}
1262+
1263+
public void setEndOfIsolationReasonDetails(String endOfIsolationReasonDetails) {
1264+
this.endOfIsolationReasonDetails = endOfIsolationReasonDetails;
1265+
}
11561266
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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.caze;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum ContactTracingContactType {
21+
22+
TELEPHONE,
23+
SMS,
24+
EMAIL;
25+
26+
public String toString() {
27+
return I18nProperties.getEnumCaption(this);
28+
}
29+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.caze;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum CovidTestReason {
21+
22+
PRESENCE_OF_SYMPTOMS,
23+
OUTBREAK_INVESTIGATION_SCREENING,
24+
COHORT_SCREENING,
25+
REQUIREMENT_OF_EMPLOYER,
26+
DURING_QUARANTINE,
27+
AFTER_CONTACT_TRACING,
28+
SWISS_COVID_APP_NOTIFICATION,
29+
OTHER_REASON;
30+
31+
public String toString() {
32+
return I18nProperties.getEnumCaption(this);
33+
}
34+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.caze;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum EndOfIsolationReason {
21+
22+
RECOVERED,
23+
DIED,
24+
LOST_TO_FOLLOW_UP,
25+
OTHER;
26+
27+
public String toString() {
28+
return I18nProperties.getEnumCaption(this);
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.caze;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum QuarantineReason {
21+
22+
IDENTIFIED_BY_CONTACT_TRACING,
23+
ENTRY_FROM_RISK_AREA,
24+
SWISS_COVID_APP_NOTIFICATION,
25+
OTHER_REASON;
26+
27+
public String toString() {
28+
return I18nProperties.getEnumCaption(this);
29+
}
30+
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ public interface Captions {
162162
String CaseData = "CaseData";
163163
String CaseData_additionalDetails = "CaseData.additionalDetails";
164164
String CaseData_caseClassification = "CaseData.caseClassification";
165+
String CaseData_caseIdIsm = "CaseData.caseIdIsm";
165166
String CaseData_caseOfficer = "CaseData.caseOfficer";
166167
String CaseData_caseOrigin = "CaseData.caseOrigin";
167168
String CaseData_classificationComment = "CaseData.classificationComment";
@@ -176,11 +177,17 @@ public interface Captions {
176177
String CaseData_community = "CaseData.community";
177178
String CaseData_completeness = "CaseData.completeness";
178179
String CaseData_contactOfficer = "CaseData.contactOfficer";
180+
String CaseData_contactTracingFirstContactDate = "CaseData.contactTracingFirstContactDate";
181+
String CaseData_contactTracingFirstContactType = "CaseData.contactTracingFirstContactType";
182+
String CaseData_covidTestReason = "CaseData.covidTestReason";
183+
String CaseData_covidTestReasonDetails = "CaseData.covidTestReasonDetails";
179184
String CaseData_dengueFeverType = "CaseData.dengueFeverType";
180185
String CaseData_diseaseDetails = "CaseData.diseaseDetails";
181186
String CaseData_district = "CaseData.district";
182187
String CaseData_districtLevelDate = "CaseData.districtLevelDate";
183188
String CaseData_doses = "CaseData.doses";
189+
String CaseData_endOfIsolationReason = "CaseData.endOfIsolationReason";
190+
String CaseData_endOfIsolationReasonDetails = "CaseData.endOfIsolationReasonDetails";
184191
String CaseData_epiData = "CaseData.epiData";
185192
String CaseData_epidemiologicalConfirmation = "CaseData.epidemiologicalConfirmation";
186193
String CaseData_epidNumber = "CaseData.epidNumber";
@@ -234,6 +241,8 @@ public interface Captions {
234241
String CaseData_quarantineOrderedOfficialDocumentDate = "CaseData.quarantineOrderedOfficialDocumentDate";
235242
String CaseData_quarantineOrderedVerbally = "CaseData.quarantineOrderedVerbally";
236243
String CaseData_quarantineOrderedVerballyDate = "CaseData.quarantineOrderedVerballyDate";
244+
String CaseData_quarantineReasonBeforeIsolation = "CaseData.quarantineReasonBeforeIsolation";
245+
String CaseData_quarantineReasonBeforeIsolationDetails = "CaseData.quarantineReasonBeforeIsolationDetails";
237246
String CaseData_quarantineReduced = "CaseData.quarantineReduced";
238247
String CaseData_quarantineTo = "CaseData.quarantineTo";
239248
String CaseData_quarantineTypeDetails = "CaseData.quarantineTypeDetails";

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
@@ -211,6 +211,7 @@ public interface Strings {
211211
String headingContactsInQuarantine = "headingContactsInQuarantine";
212212
String headingContactsPerCase = "headingContactsPerCase";
213213
String headingContactsPlacedInQuarantine = "headingContactsPlacedInQuarantine";
214+
String headingContactTracingFirstContact = "headingContactTracingFirstContact";
214215
String headingCreateAdditionalTest = "headingCreateAdditionalTest";
215216
String headingCreateCampaignDataForm = "headingCreateCampaignDataForm";
216217
String headingCreateEntry = "headingCreateEntry";

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,15 @@ CaseData.eventCount=Number of events
355355
CaseData.latestEventId=Latest event ID
356356
CaseData.latestEventStatus=Latest event status
357357
CaseData.latestEventTitle=Latest event title
358+
CaseData.caseIdIsm=Case-ID ISM
359+
CaseData.covidTestReason=Reason for COVID-19-Test
360+
CaseData.covidTestReasonDetails=Other reason
361+
CaseData.contactTracingFirstContactType=Type of contact
362+
CaseData.contactTracingFirstContactDate=Date of Contact
363+
CaseData.quarantineReasonBeforeIsolation=Reason why the case was in quarantine before this isolation
364+
CaseData.quarantineReasonBeforeIsolationDetails=Other reason
365+
CaseData.endOfIsolationReason=Reason for end of isolation
366+
CaseData.endOfIsolationReasonDetails=Other reason
358367

359368
# CaseExport
360369
CaseExport.address=Address

0 commit comments

Comments
 (0)