Skip to content

Commit fa9b28a

Browse files
Merge pull request #13331 from SORMAS-Foundation/13319-enhance-case-data-form-for-tb-specific-data
13319 enhance case data form for tb specific data
2 parents 7ad6933 + ba81153 commit fa9b28a

File tree

21 files changed

+513
-34
lines changed

21 files changed

+513
-34
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public enum Disease
5757
DIARRHEA_BLOOD(true, false, false, true, false, 0, true, false, false),
5858
SNAKE_BITE(true, false, false, true, false, 0, true, false, false),
5959
RUBELLA(true, false, false, true, false, 0, true, false, false),
60-
TUBERCULOSIS(true, false, false, true, false, 0, true, false, false),
60+
TUBERCULOSIS(true, true, true, true, false, 0, true, false, false),
6161
LEPROSY(true, false, false, true, false, 0, true, false, false),
6262
LYMPHATIC_FILARIASIS(true, false, false, true, false, 0, true, false, false),
6363
BURULI_ULCER(true, false, false, true, false, 0, true, false, false),

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

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_FRANCE;
1919
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY;
20+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_LUXEMBOURG;
2021
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND;
2122
import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_BIG;
2223

@@ -228,6 +229,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
228229
public static final String EXTERNAL_DATA = "externalData";
229230
public static final String DELETION_REASON = "deletionReason";
230231
public static final String OTHER_DELETION_REASON = "otherDeletionReason";
232+
public static final String POST_MORTEM = "postMortem";
233+
public static final String DEPARTMENT = "department";
231234

232235
public static final String NOTIFIER = "notifier";
233236

@@ -272,18 +275,21 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
272275
@HideForCountries(countries = {
273276
COUNTRY_CODE_FRANCE,
274277
COUNTRY_CODE_GERMANY,
275-
COUNTRY_CODE_SWITZERLAND })
278+
COUNTRY_CODE_SWITZERLAND,
279+
COUNTRY_CODE_LUXEMBOURG })
276280
private Date regionLevelDate;
277281
@HideForCountries(countries = {
278282
COUNTRY_CODE_FRANCE,
279283
COUNTRY_CODE_GERMANY,
280-
COUNTRY_CODE_SWITZERLAND })
284+
COUNTRY_CODE_SWITZERLAND,
285+
COUNTRY_CODE_LUXEMBOURG })
281286
private Date nationalLevelDate;
282287
@Outbreaks
283288
@HideForCountries(countries = {
284289
COUNTRY_CODE_FRANCE,
285290
COUNTRY_CODE_GERMANY,
286-
COUNTRY_CODE_SWITZERLAND })
291+
COUNTRY_CODE_SWITZERLAND,
292+
COUNTRY_CODE_LUXEMBOURG })
287293
private Date districtLevelDate;
288294
@Outbreaks
289295
@Diseases(value = Disease.RESPIRATORY_SYNCYTIAL_VIRUS, hide = true)
@@ -355,7 +361,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
355361
@EmbeddedSensitiveData
356362
@SensitiveData
357363
private HealthConditionsDto healthConditions;
358-
364+
@HideForCountries(countries = {
365+
COUNTRY_CODE_LUXEMBOURG })
359366
private YesNoUnknown pregnant;
360367
@Diseases({
361368
Disease.AFP,
@@ -371,6 +378,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
371378
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
372379
Disease.OTHER })
373380
@Outbreaks
381+
@HideForCountries(countries = {
382+
COUNTRY_CODE_LUXEMBOURG })
374383
private VaccinationStatus vaccinationStatus;
375384
@Diseases({
376385
Disease.MONKEYPOX })
@@ -383,18 +392,26 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
383392
private Date smallpoxLastVaccinationDate;
384393
@Outbreaks
385394
@SensitiveData
395+
@HideForCountries(countries = {
396+
COUNTRY_CODE_LUXEMBOURG })
386397
private UserReferenceDto surveillanceOfficer;
387398
@SensitiveData
388399
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
389400
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
401+
@HideForCountries(countries = {
402+
COUNTRY_CODE_LUXEMBOURG })
390403
private String clinicianName;
391404
@SensitiveData
392405
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
393406
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
407+
@HideForCountries(countries = {
408+
COUNTRY_CODE_LUXEMBOURG })
394409
private String clinicianPhone;
395410
@SensitiveData
396411
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
397412
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
413+
@HideForCountries(countries = {
414+
COUNTRY_CODE_LUXEMBOURG })
398415
private String clinicianEmail;
399416
@Diseases({
400417
Disease.CONGENITAL_RUBELLA })
@@ -450,6 +467,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
450467
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_ADDITIONAL_DETAILS)
451468
@SensitiveData
452469
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
470+
@HideForCountries(countries = {
471+
COUNTRY_CODE_LUXEMBOURG })
453472
private String additionalDetails;
454473
@HideForCountriesExcept(countries = {
455474
COUNTRY_CODE_GERMANY,
@@ -518,6 +537,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
518537
COUNTRY_CODE_GERMANY,
519538
COUNTRY_CODE_SWITZERLAND })
520539
private Date quarantineOfficialOrderSentDate;
540+
@HideForCountries(countries = {
541+
COUNTRY_CODE_LUXEMBOURG })
521542
@SensitiveData
522543
private YesNoUnknown postpartum;
523544
@SensitiveData
@@ -623,6 +644,12 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
623644
@SensitiveData
624645
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
625646
private String otherDeletionReason;
647+
@HideForCountriesExcept(countries = COUNTRY_CODE_LUXEMBOURG)
648+
@Diseases(value = {
649+
Disease.TUBERCULOSIS })
650+
private boolean postMortem;
651+
@HideForCountriesExcept(countries = COUNTRY_CODE_LUXEMBOURG)
652+
private String department;
626653

627654
private NotifierReferenceDto notifier;
628655

@@ -1790,6 +1817,22 @@ public void setNotifier(NotifierReferenceDto notifier) {
17901817
this.notifier = notifier;
17911818
}
17921819

1820+
public boolean isPostMortem() {
1821+
return postMortem;
1822+
}
1823+
1824+
public void setPostMortem(boolean postMortem) {
1825+
this.postMortem = postMortem;
1826+
}
1827+
1828+
public String getDepartment() {
1829+
return department;
1830+
}
1831+
1832+
public void setDepartment(String department) {
1833+
this.department = department;
1834+
}
1835+
17931836
@JsonIgnore
17941837
public String i18nPrefix() {
17951838
return I18N_PREFIX;
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-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.clinicalcourse;
17+
18+
import de.symeda.sormas.api.i18n.I18nProperties;
19+
20+
public enum ComplianceWithTreatment {
21+
22+
NO_COMPLIANCE,
23+
TREATMENT_COMPLETED,
24+
TREATMENT_FAILED,
25+
TREATMENT_NOT_COMPLETED,
26+
UNKNOWN,
27+
NOT_APPLICABLE;
28+
29+
@Override
30+
public String toString() {
31+
return I18nProperties.getEnumCaption(this);
32+
}
33+
}

sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import javax.validation.constraints.Size;
44

55
import de.symeda.sormas.api.CountryHelper;
6+
import de.symeda.sormas.api.Disease;
67
import de.symeda.sormas.api.feature.FeatureType;
78
import de.symeda.sormas.api.i18n.Validations;
89
import de.symeda.sormas.api.utils.DataHelper;
910
import de.symeda.sormas.api.utils.DependingOnFeatureType;
11+
import de.symeda.sormas.api.utils.Diseases;
1012
import de.symeda.sormas.api.utils.FieldConstraints;
1113
import de.symeda.sormas.api.utils.HideForCountries;
1214
import de.symeda.sormas.api.utils.HideForCountriesExcept;
@@ -48,6 +50,9 @@ public class HealthConditionsDto extends PseudonymizableDto {
4850
public static final String ASTHMA = "asthma";
4951
public static final String SICKLE_CELL_DISEASE = "sickleCellDisease";
5052
public static final String IMMUNODEFICIENCY_INCLUDING_HIV = "immunodeficiencyIncludingHiv";
53+
public static final String TUBERCULOSIS_INFECTION_YEAR = "tuberculosisInfectionYear";
54+
public static final String PREVIOUS_TUBERCULOSIS_TREATMENT = "previousTuberculosisTreatment";
55+
public static final String COMPLIANCE_WITH_TREATMENT = "complianceWithTreatment";
5156

5257
@HideForCountries(countries = {
5358
CountryHelper.COUNTRY_CODE_GERMANY,
@@ -119,6 +124,21 @@ public class HealthConditionsDto extends PseudonymizableDto {
119124
@SensitiveData
120125
@Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
121126
private String otherConditions;
127+
@HideForCountriesExcept(countries = {
128+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
129+
@Diseases(value = {
130+
Disease.TUBERCULOSIS })
131+
private YesNoUnknown previousTuberculosisTreatment;
132+
@HideForCountriesExcept(countries = {
133+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
134+
@Diseases(value = {
135+
Disease.TUBERCULOSIS })
136+
private Integer tuberculosisInfectionYear;
137+
@HideForCountriesExcept(countries = {
138+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
139+
@Diseases(value = {
140+
Disease.TUBERCULOSIS })
141+
private ComplianceWithTreatment complianceWithTreatment;
122142

123143
public static HealthConditionsDto build() {
124144
HealthConditionsDto healthConditions = new HealthConditionsDto();
@@ -180,7 +200,7 @@ public void setImmunodeficiencyIncludingHiv(YesNoUnknown immunodeficiencyIncludi
180200
this.immunodeficiencyIncludingHiv = immunodeficiencyIncludingHiv;
181201
}
182202

183-
@Order(10)
203+
@Order(32)
184204
public YesNoUnknown getHiv() {
185205
return hiv;
186206
}
@@ -332,4 +352,29 @@ public String getOtherConditions() {
332352
public void setOtherConditions(String otherConditions) {
333353
this.otherConditions = otherConditions;
334354
}
355+
356+
@Order(10)
357+
public YesNoUnknown getPreviousTuberculosisTreatment() {
358+
return previousTuberculosisTreatment;
359+
}
360+
361+
public void setPreviousTuberculosisTreatment(YesNoUnknown previousTuberculosisTreatment) {
362+
this.previousTuberculosisTreatment = previousTuberculosisTreatment;
363+
}
364+
365+
public Integer getTuberculosisInfectionYear() {
366+
return tuberculosisInfectionYear;
367+
}
368+
369+
public void setTuberculosisInfectionYear(Integer tuberculosisInfectionYear) {
370+
this.tuberculosisInfectionYear = tuberculosisInfectionYear;
371+
}
372+
373+
public ComplianceWithTreatment getComplianceWithTreatment() {
374+
return complianceWithTreatment;
375+
}
376+
377+
public void setComplianceWithTreatment(ComplianceWithTreatment complianceWithTreatment) {
378+
this.complianceWithTreatment = complianceWithTreatment;
379+
}
335380
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ public interface Captions {
678678
String CaseData_creationDate = "CaseData.creationDate";
679679
String CaseData_deletionReason = "CaseData.deletionReason";
680680
String CaseData_dengueFeverType = "CaseData.dengueFeverType";
681+
String CaseData_department = "CaseData.department";
681682
String CaseData_differentPlaceOfStayJurisdiction = "CaseData.differentPlaceOfStayJurisdiction";
682683
String CaseData_differentPointOfEntryJurisdiction = "CaseData.differentPointOfEntryJurisdiction";
683684
String CaseData_diseaseDetails = "CaseData.diseaseDetails";
@@ -743,6 +744,7 @@ public interface Captions {
743744
String CaseData_pointOfEntryName = "CaseData.pointOfEntryName";
744745
String CaseData_pointOfEntryRegion = "CaseData.pointOfEntryRegion";
745746
String CaseData_portHealthInfo = "CaseData.portHealthInfo";
747+
String CaseData_postMortem = "CaseData.postMortem";
746748
String CaseData_postpartum = "CaseData.postpartum";
747749
String CaseData_pregnant = "CaseData.pregnant";
748750
String CaseData_previousInfectionDate = "CaseData.previousInfectionDate";
@@ -1935,6 +1937,7 @@ public interface Captions {
19351937
String HealthConditions_chronicLiverDisease = "HealthConditions.chronicLiverDisease";
19361938
String HealthConditions_chronicNeurologicCondition = "HealthConditions.chronicNeurologicCondition";
19371939
String HealthConditions_chronicPulmonaryDisease = "HealthConditions.chronicPulmonaryDisease";
1940+
String HealthConditions_complianceWithTreatment = "HealthConditions.complianceWithTreatment";
19381941
String HealthConditions_congenitalSyphilis = "HealthConditions.congenitalSyphilis";
19391942
String HealthConditions_currentSmoker = "HealthConditions.currentSmoker";
19401943
String HealthConditions_diabetes = "HealthConditions.diabetes";
@@ -1948,8 +1951,10 @@ public interface Captions {
19481951
String HealthConditions_malignancyChemotherapy = "HealthConditions.malignancyChemotherapy";
19491952
String HealthConditions_obesity = "HealthConditions.obesity";
19501953
String HealthConditions_otherConditions = "HealthConditions.otherConditions";
1954+
String HealthConditions_previousTuberculosisTreatment = "HealthConditions.previousTuberculosisTreatment";
19511955
String HealthConditions_sickleCellDisease = "HealthConditions.sickleCellDisease";
19521956
String HealthConditions_tuberculosis = "HealthConditions.tuberculosis";
1957+
String HealthConditions_tuberculosisInfectionYear = "HealthConditions.tuberculosisInfectionYear";
19531958
String humanSampleViewType = "humanSampleViewType";
19541959
String Immunization = "Immunization";
19551960
String Immunization_additionalDetails = "Immunization.additionalDetails";
@@ -2254,6 +2259,7 @@ public interface Captions {
22542259
String Person_educationType = "Person.educationType";
22552260
String Person_emailAddress = "Person.emailAddress";
22562261
String Person_emancipated = "Person.emancipated";
2262+
String Person_entryDate = "Person.entryDate";
22572263
String Person_externalId = "Person.externalId";
22582264
String Person_externalToken = "Person.externalToken";
22592265
String Person_fathersName = "Person.fathersName";
@@ -2264,6 +2270,7 @@ public interface Captions {
22642270
String Person_incapacitated = "Person.incapacitated";
22652271
String Person_internalToken = "Person.internalToken";
22662272
String Person_lastDisease = "Person.lastDisease";
2273+
String Person_livingStatus = "Person.livingStatus";
22672274
String Person_matchingCase = "Person.matchingCase";
22682275
String Person_mothersMaidenName = "Person.mothersMaidenName";
22692276
String Person_mothersName = "Person.mothersName";
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-2026 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+
package de.symeda.sormas.api.person;
16+
17+
import de.symeda.sormas.api.i18n.I18nProperties;
18+
19+
public enum LivingStatus {
20+
21+
MIGRANT,
22+
FOREIGNER,
23+
HOMELESS,
24+
REGISTERED_AT_A_RESIDENCE;
25+
26+
@Override
27+
public String toString() {
28+
return I18nProperties.getEnumCaption(this);
29+
}
30+
}

0 commit comments

Comments
 (0)