Skip to content

Commit 822ce84

Browse files
committed
#13538 - Updated exposures types of activity
- Added child care facility type to exposure types - Added new enum for child care facility type `TypeOfChildcareFacility`
1 parent 37157dd commit 822ce84

File tree

11 files changed

+125
-2
lines changed

11 files changed

+125
-2
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public class ExposureDto extends PseudonymizableDto {
9898
public static final String HABITATION_DETAILS = "habitationDetails";
9999
public static final String TYPE_OF_ANIMAL = "typeOfAnimal";
100100
public static final String TYPE_OF_ANIMAL_DETAILS = "typeOfAnimalDetails";
101+
public static final String TYPE_OF_CHILDCARE_FACILITY = "typeOfChildcareFacility";
102+
public static final String CHILDCARE_FACILITY_DETAILS = "childcareFacilityDetails";
101103
public static final String PHYSICAL_CONTACT_DURING_PREPARATION = "physicalContactDuringPreparation";
102104
public static final String PHYSICAL_CONTACT_WITH_BODY = "physicalContactWithBody";
103105
public static final String DECEASED_PERSON_ILL = "deceasedPersonIll";
@@ -262,6 +264,14 @@ public class ExposureDto extends PseudonymizableDto {
262264
@SensitiveData
263265
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
264266
private String typeOfAnimalDetails;
267+
@Diseases({
268+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS })
269+
private TypeOfChildcareFacility typeOfChildcareFacility;
270+
@SensitiveData
271+
@Diseases({
272+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS })
273+
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
274+
private String childcareFacilityDetails;
265275

266276
// Fields specific to ExposureType.BURIAL
267277
private YesNoUnknown physicalContactDuringPreparation;
@@ -581,6 +591,22 @@ public void setTypeOfAnimalDetails(String typeOfAnimalDetails) {
581591
this.typeOfAnimalDetails = typeOfAnimalDetails;
582592
}
583593

594+
public TypeOfChildcareFacility getTypeOfChildcareFacility() {
595+
return typeOfChildcareFacility;
596+
}
597+
598+
public void setTypeOfChildcareFacility(TypeOfChildcareFacility typeOfChildcareFacility) {
599+
this.typeOfChildcareFacility = typeOfChildcareFacility;
600+
}
601+
602+
public String getChildcareFacilityDetails() {
603+
return childcareFacilityDetails;
604+
}
605+
606+
public void setChildcareFacilityDetails(String childcareFacilityDetails) {
607+
this.childcareFacilityDetails = childcareFacilityDetails;
608+
}
609+
584610
public YesNoUnknown getPhysicalContactDuringPreparation() {
585611
return physicalContactDuringPreparation;
586612
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public enum ExposureType {
2828
GATHERING,
2929
HABITATION,
3030
PERSONAL_SERVICES,
31+
@Diseases(value = {
32+
Disease.RESPIRATORY_SYNCYTIAL_VIRUS })
33+
CHILDCARE_FACILITY,
3134
@Diseases(value = {
3235
Disease.CORONAVIRUS }, hide = true)
3336
BURIAL,
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-2026 SORMAS Foundation gGmbH
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 TypeOfChildcareFacility {
21+
22+
NURSERY_CRECHE,
23+
NURSERY_SCHOOL,
24+
CHILDMINDER_CENTRE,
25+
CHILDCARE_CENTRE,
26+
SCHOOL,
27+
OTHER;
28+
29+
@Override
30+
public String toString() {
31+
return I18nProperties.getEnumCaption(this);
32+
}
33+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,7 @@ public interface Captions {
17881788
String Exposure_animalMarket = "Exposure.animalMarket";
17891789
String Exposure_animalVaccinated = "Exposure.animalVaccinated";
17901790
String Exposure_bodyOfWater = "Exposure.bodyOfWater";
1791+
String Exposure_childcareFacilityDetails = "Exposure.childcareFacilityDetails";
17911792
String Exposure_connectionNumber = "Exposure.connectionNumber";
17921793
String Exposure_contactToBodyFluids = "Exposure.contactToBodyFluids";
17931794
String Exposure_contactToCase = "Exposure.contactToCase";
@@ -1829,6 +1830,7 @@ public interface Captions {
18291830
String Exposure_startDate = "Exposure.startDate";
18301831
String Exposure_typeOfAnimal = "Exposure.typeOfAnimal";
18311832
String Exposure_typeOfAnimalDetails = "Exposure.typeOfAnimalDetails";
1833+
String Exposure_typeOfChildcareFacility = "Exposure.typeOfChildcareFacility";
18321834
String Exposure_typeOfPlace = "Exposure.typeOfPlace";
18331835
String Exposure_typeOfPlaceDetails = "Exposure.typeOfPlaceDetails";
18341836
String Exposure_waterSource = "Exposure.waterSource";

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,8 @@ Exposure.habitationType=Type of habitation
15361536
Exposure.habitationDetails=Type of habitation details
15371537
Exposure.typeOfAnimal=Type of animal
15381538
Exposure.typeOfAnimalDetails=Type of animal details
1539+
Exposure.typeOfChildcareFacility=Type of childcare facility
1540+
Exposure.childcareFacilityDetails=Type of childcare facility details
15391541
Exposure.physicalContactDuringPreparation=Has had direct physical contact during burial preparation ritual
15401542
Exposure.physicalContactWithBody=Has had direct physical contact with the (deceased) case at a funeral
15411543
Exposure.deceasedPersonIll=Was the deceased person ill?

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ ExposureType.VISIT=Visit
742742
ExposureType.GATHERING=Gathering
743743
ExposureType.HABITATION=Habitation
744744
ExposureType.PERSONAL_SERVICES=Personal Services
745+
ExposureType.CHILDCARE_FACILITY=Childcare Facility
745746
ExposureType.BURIAL=Burial
746747
ExposureType.ANIMAL_CONTACT=Animal Contact
747748
ExposureType.OTHER=Other
@@ -1451,6 +1452,13 @@ TypeOfAnimal.FLEA=Flea
14511452
TypeOfAnimal.TICK=Tick
14521453
TypeOfAnimal.OTHER=Other
14531454

1455+
TypeOfChildcareFacility.NURSERY_CRECHE=Nursery/Creche
1456+
TypeOfChildcareFacility.NURSERY_SCHOOL=Nursery School
1457+
TypeOfChildcareFacility.CHILDMINDER_CENTRE=Childminder Centre
1458+
TypeOfChildcareFacility.CHILDCARE_CENTRE=Childcare Centre
1459+
TypeOfChildcareFacility.SCHOOL=School
1460+
TypeOfChildcareFacility.OTHER=Other
1461+
14541462
# TypeOfDrug
14551463
TypeOfDrug.ANTIMICROBIAL = Antimicrobial
14561464
TypeOfDrug.ANTIVIRAL = Antiviral

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ public Exposure fillOrBuildExposureEntity(ExposureDto source, Exposure target, b
119119
target.setAnimalCondition(source.getAnimalCondition());
120120
target.setTypeOfAnimal(source.getTypeOfAnimal());
121121
target.setTypeOfAnimalDetails(source.getTypeOfAnimalDetails());
122+
target.setTypeOfChildcareFacility(source.getTypeOfChildcareFacility());
123+
target.setChildcareFacilityDetails(source.getChildcareFacilityDetails());
122124
target.setAnimalContactType(source.getAnimalContactType());
123125
target.setAnimalContactTypeDetails(source.getAnimalContactTypeDetails());
124126
target.setAnimalMarket(source.getAnimalMarket());
@@ -258,6 +260,8 @@ public static ExposureDto toExposureDto(Exposure source) {
258260
target.setAnimalCondition(source.getAnimalCondition());
259261
target.setTypeOfAnimal(source.getTypeOfAnimal());
260262
target.setTypeOfAnimalDetails(source.getTypeOfAnimalDetails());
263+
target.setTypeOfChildcareFacility(source.getTypeOfChildcareFacility());
264+
target.setChildcareFacilityDetails(source.getChildcareFacilityDetails());
261265
target.setAnimalContactType(source.getAnimalContactType());
262266
target.setAnimalContactTypeDetails(source.getAnimalContactTypeDetails());
263267
target.setAnimalMarket(source.getAnimalMarket());

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import de.symeda.sormas.api.exposure.GatheringType;
4242
import de.symeda.sormas.api.exposure.HabitationType;
4343
import de.symeda.sormas.api.exposure.TypeOfAnimal;
44+
import de.symeda.sormas.api.exposure.TypeOfChildcareFacility;
4445
import de.symeda.sormas.api.exposure.WorkEnvironment;
4546
import de.symeda.sormas.api.utils.YesNoUnknown;
4647
import de.symeda.sormas.backend.common.AbstractDomainObject;
@@ -116,6 +117,8 @@ public class Exposure extends AbstractDomainObject {
116117
private String habitationDetails;
117118
private TypeOfAnimal typeOfAnimal;
118119
private String typeOfAnimalDetails;
120+
private TypeOfChildcareFacility typeOfChildcareFacility;
121+
private String childcareFacilityDetails;
119122

120123
// Fields specific to ExposureType.BURIAL
121124
private YesNoUnknown physicalContactDuringPreparation;
@@ -477,6 +480,24 @@ public void setTypeOfAnimalDetails(String typeOfAnimalDetails) {
477480
this.typeOfAnimalDetails = typeOfAnimalDetails;
478481
}
479482

483+
@Enumerated(EnumType.STRING)
484+
public TypeOfChildcareFacility getTypeOfChildcareFacility() {
485+
return typeOfChildcareFacility;
486+
}
487+
488+
public void setTypeOfChildcareFacility(TypeOfChildcareFacility typeOfChildcareFacility) {
489+
this.typeOfChildcareFacility = typeOfChildcareFacility;
490+
}
491+
492+
@Column(columnDefinition = "text")
493+
public String getChildcareFacilityDetails() {
494+
return childcareFacilityDetails;
495+
}
496+
497+
public void setChildcareFacilityDetails(String childcareFacilityDetails) {
498+
this.childcareFacilityDetails = childcareFacilityDetails;
499+
}
500+
480501
@Enumerated(EnumType.STRING)
481502
public YesNoUnknown getPhysicalContactDuringPreparation() {
482503
return physicalContactDuringPreparation;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14505,4 +14505,14 @@ ALTER TABLE symptoms_history ADD COLUMN IF NOT EXISTS timeOffWorkDays varchar(25
1450514505

1450614506
INSERT INTO schema_version (version_number, comment) VALUES (583, 'Update symptoms for RSV #13544');
1450714507

14508+
-- 2025-08-05 RSV EpiData updates #13538
14509+
14510+
ALTER TABLE exposures ADD COLUMN IF NOT EXISTS typeOfChildcareFacility varchar(255);
14511+
ALTER TABLE exposures ADD COLUMN IF NOT EXISTS childcareFacilityDetails varchar(255);
14512+
14513+
ALTER TABLE exposures_history ADD COLUMN IF NOT EXISTS typeOfChildcareFacility varchar(255);
14514+
ALTER TABLE exposures_history ADD COLUMN IF NOT EXISTS childcareFacilityDetails varchar(255);
14515+
14516+
INSERT INTO schema_version (version_number, comment) VALUES (584, 'RSV EpiData updates #13538');
14517+
1450814518
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import de.symeda.sormas.api.exposure.GatheringType;
5252
import de.symeda.sormas.api.exposure.HabitationType;
5353
import de.symeda.sormas.api.exposure.TypeOfAnimal;
54+
import de.symeda.sormas.api.exposure.TypeOfChildcareFacility;
5455
import de.symeda.sormas.api.i18n.Captions;
5556
import de.symeda.sormas.api.i18n.I18nProperties;
5657
import de.symeda.sormas.api.i18n.Strings;
@@ -86,14 +87,16 @@ public class ExposureForm extends AbstractEditForm<ExposureDto> {
8687
ExposureDto.EXPOSURE_TYPE_DETAILS,
8788
ExposureDto.GATHERING_TYPE,
8889
ExposureDto.HABITATION_TYPE,
89-
ExposureDto.TYPE_OF_ANIMAL
90+
ExposureDto.TYPE_OF_ANIMAL,
91+
ExposureDto.TYPE_OF_CHILDCARE_FACILITY
9092
))
9193
) +
9294
fluidRow(
9395
fluidColumn(12, 0, locs(
9496
ExposureDto.GATHERING_DETAILS,
9597
ExposureDto.HABITATION_DETAILS,
96-
ExposureDto.TYPE_OF_ANIMAL_DETAILS
98+
ExposureDto.TYPE_OF_ANIMAL_DETAILS,
99+
ExposureDto.CHILDCARE_FACILITY_DETAILS
97100
))
98101
) +
99102
loc(LOC_EXPOSURE_DETAILS_HEADING) +
@@ -224,9 +227,11 @@ private void addBasicFields() {
224227
ExposureDto.GATHERING_TYPE,
225228
ExposureDto.HABITATION_TYPE,
226229
ExposureDto.TYPE_OF_ANIMAL,
230+
ExposureDto.TYPE_OF_CHILDCARE_FACILITY,
227231
ExposureDto.GATHERING_DETAILS,
228232
ExposureDto.HABITATION_DETAILS,
229233
ExposureDto.TYPE_OF_ANIMAL_DETAILS,
234+
ExposureDto.CHILDCARE_FACILITY_DETAILS,
230235
ExposureDto.PHYSICAL_CONTACT_DURING_PREPARATION,
231236
ExposureDto.PHYSICAL_CONTACT_WITH_BODY,
232237
ExposureDto.DECEASED_PERSON_NAME,
@@ -276,9 +281,11 @@ private void setUpVisibilityDependencies() {
276281
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.GATHERING_TYPE, ExposureDto.EXPOSURE_TYPE, ExposureType.GATHERING, true);
277282
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.HABITATION_TYPE, ExposureDto.EXPOSURE_TYPE, ExposureType.HABITATION, true);
278283
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.TYPE_OF_ANIMAL, ExposureDto.EXPOSURE_TYPE, ExposureType.ANIMAL_CONTACT, true);
284+
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.TYPE_OF_CHILDCARE_FACILITY, ExposureDto.EXPOSURE_TYPE, ExposureType.CHILDCARE_FACILITY, true);
279285
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.GATHERING_DETAILS, ExposureDto.GATHERING_TYPE, GatheringType.OTHER, true);
280286
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.HABITATION_DETAILS, ExposureDto.HABITATION_TYPE, HabitationType.OTHER, true);
281287
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.TYPE_OF_ANIMAL_DETAILS, ExposureDto.TYPE_OF_ANIMAL, TypeOfAnimal.OTHER, true);
288+
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.CHILDCARE_FACILITY_DETAILS, ExposureDto.TYPE_OF_CHILDCARE_FACILITY, TypeOfChildcareFacility.OTHER, true);
282289
FieldHelper.setVisibleWhen(getFieldGroup(), ExposureDto.LARGE_ATTENDANCE_NUMBER, ExposureDto.EXPOSURE_TYPE, ExposureType.GATHERING, true);
283290
FieldHelper.setVisibleWhen(
284291
getFieldGroup(),

0 commit comments

Comments
 (0)