Skip to content

Commit 6f5e9b3

Browse files
committed
Removes eating out venues from exposure form for SAL disease
1 parent 145c20f commit 6f5e9b3

11 files changed

Lines changed: 87 additions & 202 deletions

File tree

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

Lines changed: 0 additions & 39 deletions
This file was deleted.

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ public class ExposureDto extends PseudonymizableDto {
140140
public static final String PROPHYLAXIS_ADHERENCE_DETAILS = "prophylaxisAdherenceDetails";
141141
public static final String TRAVEL_PURPOSE = "travelPurpose";
142142
public static final String TRAVEL_PURPOSE_DETAILS = "travelPurposeDetails";
143-
public static final String EATING_OUT_VENUES = "eatingOutVenues";
144-
public static final String EATING_OUT_VENUE_OTHER = "eatingOutVenueOther";
145143
public static final String SHOPPING_FOR_FOOD_DETAILS = "shoppingForFoodDetails";
146144

147145
@SensitiveData
@@ -459,17 +457,6 @@ public class ExposureDto extends PseudonymizableDto {
459457
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
460458
private String travelPurposeDetails;
461459

462-
@Diseases({
463-
Disease.SALMONELLOSIS })
464-
@HideForCountriesExcept(countries = {
465-
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
466-
private Set<EatingOutVenue> eatingOutVenues;
467-
@Diseases({
468-
Disease.SALMONELLOSIS })
469-
@HideForCountriesExcept(countries = {
470-
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
471-
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
472-
private String eatingOutVenueOther;
473460
@Diseases({
474461
Disease.SALMONELLOSIS })
475462
@HideForCountriesExcept(countries = {
@@ -488,7 +475,6 @@ public static ExposureDto build(ExposureType exposureType) {
488475
exposure.setSubSettings(new HashSet<>());
489476
exposure.setContactFactors(new HashSet<>());
490477
exposure.setProtectiveMeasures(new HashSet<>());
491-
exposure.setEatingOutVenues(new HashSet<>());
492478

493479
return exposure;
494480
}
@@ -1173,22 +1159,6 @@ public void setProphylaxisAdherenceDetails(String prophylaxisAdherenceDetails) {
11731159
this.prophylaxisAdherenceDetails = prophylaxisAdherenceDetails;
11741160
}
11751161

1176-
public Set<EatingOutVenue> getEatingOutVenues() {
1177-
return eatingOutVenues;
1178-
}
1179-
1180-
public void setEatingOutVenues(Set<EatingOutVenue> eatingOutVenues) {
1181-
this.eatingOutVenues = eatingOutVenues;
1182-
}
1183-
1184-
public String getEatingOutVenueOther() {
1185-
return eatingOutVenueOther;
1186-
}
1187-
1188-
public void setEatingOutVenueOther(String eatingOutVenueOther) {
1189-
this.eatingOutVenueOther = eatingOutVenueOther;
1190-
}
1191-
11921162
public String getShoppingForFoodDetails() {
11931163
return shoppingForFoodDetails;
11941164
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,8 +1902,6 @@ public interface Captions {
19021902
String Exposure_deceasedPersonName = "Exposure.deceasedPersonName";
19031903
String Exposure_deceasedPersonRelation = "Exposure.deceasedPersonRelation";
19041904
String Exposure_domesticSwimming = "Exposure.domesticSwimming";
1905-
String Exposure_eatingOutVenueOther = "Exposure.eatingOutVenueOther";
1906-
String Exposure_eatingOutVenues = "Exposure.eatingOutVenues";
19071905
String Exposure_eatingRawAnimalProducts = "Exposure.eatingRawAnimalProducts";
19081906
String Exposure_endDate = "Exposure.endDate";
19091907
String Exposure_exposureCategory = "Exposure.exposureCategory";

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,8 +1619,6 @@ Exposure.prophylaxisAdherence=Prophylaxis adherence
16191619
Exposure.prophylaxisAdherenceDetails=Prophylaxis adherence details
16201620
Exposure.travelPurpose=Reason for travel
16211621
Exposure.travelPurposeDetails=Reason for travel details
1622-
Exposure.eatingOutVenues=Eating out venues
1623-
Exposure.eatingOutVenueOther=Other venue (please specify)
16241622
Exposure.shoppingForFoodDetails=Shopping for food (location/details)
16251623
titleExposuresSection=Exposure details
16261624
titleExposureActivitySection=Activity details

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,26 +3032,6 @@ ExposureSubSetting.TRAVELED_ABROAD=Traveled abroad
30323032
ExposureSubSetting.UNKNOWN=Unknown
30333033
ExposureSubSetting.OTHER=Other
30343034

3035-
# EatingOutVenue
3036-
EatingOutVenue.CANTEENS=Canteens (work, school, hospital, nursing home, retirement home)
3037-
EatingOutVenue.FOOD_SERVED_ON_BOARD=Food served on board (airplane, train, ferry, cruise ship)
3038-
EatingOutVenue.GAS_STATIONS=Gas stations
3039-
EatingOutVenue.STREET_VENDORS=Street vendors/mobile food vendors (food trucks, markets)
3040-
EatingOutVenue.FOOD_COURTS=Food courts (shopping malls, entertainment venues)
3041-
EatingOutVenue.CAFES_OR_TEA_ROOMS=Cafés or tea rooms
3042-
EatingOutVenue.SANDWICH_SHOPS_BAKERIES_DELICATESSENS=Sandwich shops, bakeries, or delicatessens
3043-
EatingOutVenue.CAFETERIAS_OR_BARS=Cafeterias or bars
3044-
EatingOutVenue.KEBAB_FALAFEL_SNACK_SHOPS=Kebab/falafel snack shops
3045-
EatingOutVenue.BURGER_RESTAURANTS=Burger restaurants
3046-
EatingOutVenue.FAST_FOOD_SNACK_BARS=Fast food/snack bars
3047-
EatingOutVenue.PIZZERIAS=Pizzerias
3048-
EatingOutVenue.ASIAN_RESTAURANTS=Asian restaurants
3049-
EatingOutVenue.HOTELS=Hotels
3050-
EatingOutVenue.TAKEAWAY_FOOD=Takeaway food (including home delivery)
3051-
EatingOutVenue.BUFFET_STYLE_RESTAURANTS=Buffet-style restaurants (all-you-can-eat, self-service)
3052-
EatingOutVenue.FOOD_AT_EVENTS=Food at events (weddings, conferences, festivals)
3053-
EatingOutVenue.OTHER=Other (please specify)
3054-
30553035
# ExposureContactFactor
30563036
ExposureContactFactor.DURATION_OF_EXPOSURE=Duration of Exposure
30573037
ExposureContactFactor.PROXIMITY_TO_SOURCE=Proximity to Source

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ public Exposure fillOrBuildExposureEntity(ExposureDto source, Exposure target, b
244244
target.setProphylaxisAdherenceDetails(source.getProphylaxisAdherenceDetails());
245245
target.setTravelPurpose(source.getTravelPurpose());
246246
target.setTravelPurposeDetails(source.getTravelPurposeDetails());
247-
target.setEatingOutVenues(source.getEatingOutVenues() != null ? source.getEatingOutVenues() : new HashSet<>());
248-
target.setEatingOutVenueOther(source.getEatingOutVenueOther());
249247
target.setShoppingForFoodDetails(source.getShoppingForFoodDetails());
250248
return target;
251249
}
@@ -437,8 +435,6 @@ public static ExposureDto toExposureDto(Exposure source) {
437435
target.setProphylaxisAdherenceDetails(source.getProphylaxisAdherenceDetails());
438436
target.setTravelPurpose(source.getTravelPurpose());
439437
target.setTravelPurposeDetails(source.getTravelPurposeDetails());
440-
target.setEatingOutVenues(source.getEatingOutVenues() != null ? new HashSet<>(source.getEatingOutVenues()) : new HashSet<>());
441-
target.setEatingOutVenueOther(source.getEatingOutVenueOther());
442438
target.setShoppingForFoodDetails(source.getShoppingForFoodDetails());
443439
return target;
444440
}

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

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import de.symeda.sormas.api.exposure.AnimalCategory;
4343
import de.symeda.sormas.api.exposure.AnimalContactType;
4444
import de.symeda.sormas.api.exposure.AnimalLocation;
45-
import de.symeda.sormas.api.exposure.EatingOutVenue;
4645
import de.symeda.sormas.api.exposure.ExposureCategory;
4746
import de.symeda.sormas.api.exposure.ExposureContactFactor;
4847
import de.symeda.sormas.api.exposure.ExposureProtectiveMeasure;
@@ -92,8 +91,6 @@ public class Exposure extends AbstractDomainObject {
9291
public static final String SUB_SETTINGS = "subSettings";
9392
public static final String CONTACT_FACTORS = "contactFactors";
9493
public static final String PROTECTIVE_MEASURES = "protectiveMeasures";
95-
public static final String EATING_OUT_VENUES = "eatingOutVenues";
96-
public static final String EATING_OUT_VENUE_OTHER = "eatingOutVenueOther";
9794
public static final String SHOPPING_FOR_FOOD_DETAILS = "shoppingForFoodDetails";
9895

9996
private EpiData epiData;
@@ -201,8 +198,6 @@ public class Exposure extends AbstractDomainObject {
201198
private Set<ExposureContactFactor> contactFactors = new HashSet<>();
202199
private Set<ExposureProtectiveMeasure> protectiveMeasures = new HashSet<>();
203200

204-
private Set<EatingOutVenue> eatingOutVenues = new HashSet<>();
205-
private String eatingOutVenueOther;
206201
private String shoppingForFoodDetails;
207202

208203
@ManyToOne
@@ -956,28 +951,6 @@ public void setProtectiveMeasures(Set<ExposureProtectiveMeasure> protectiveMeasu
956951
this.protectiveMeasures = protectiveMeasures;
957952
}
958953

959-
@ElementCollection(fetch = FetchType.EAGER)
960-
@Enumerated(EnumType.STRING)
961-
@CollectionTable(name = "exposures_eatingoutvenues",
962-
joinColumns = @JoinColumn(name = "exposure_id", referencedColumnName = Exposure.ID, nullable = false))
963-
@Column(name = "eatingoutvenue", nullable = false)
964-
public Set<EatingOutVenue> getEatingOutVenues() {
965-
return eatingOutVenues;
966-
}
967-
968-
public void setEatingOutVenues(Set<EatingOutVenue> eatingOutVenues) {
969-
this.eatingOutVenues = eatingOutVenues;
970-
}
971-
972-
@Column(length = CHARACTER_LIMIT_DEFAULT)
973-
public String getEatingOutVenueOther() {
974-
return eatingOutVenueOther;
975-
}
976-
977-
public void setEatingOutVenueOther(String eatingOutVenueOther) {
978-
this.eatingOutVenueOther = eatingOutVenueOther;
979-
}
980-
981954
@Column(length = CHARACTER_LIMIT_DEFAULT)
982955
public String getShoppingForFoodDetails() {
983956
return shoppingForFoodDetails;

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16006,4 +16006,22 @@ DROP TRIGGER IF EXISTS delete_history_trigger ON exposures_eatingoutvenues;
1600616006

1600716007
INSERT INTO schema_version (version_number, comment) VALUES (630, '#13917 - Drop broken delete_history_trigger on exposures_eatingoutvenues');
1600816008

16009+
-- 2026-05-19 Remove eating-out venues from Salmonellosis exposure (reverts the v627 join table + eatingoutvenueother columns). #13918
16010+
-- shoppingforfooddetails stays — it lives on the SHOPPING_FOR_FOOD sub-setting and is not part of this removal.
16011+
16012+
-- Drop versioning triggers on the join table before dropping the table itself.
16013+
-- Guarded with IF EXISTS so the migration is idempotent regardless of whether v630 ran on this DB.
16014+
DROP TRIGGER IF EXISTS versioning_trigger ON exposures_eatingoutvenues;
16015+
DROP TRIGGER IF EXISTS delete_history_trigger ON exposures_eatingoutvenues;
16016+
16017+
-- Drop join tables (history first to avoid any dangling references).
16018+
DROP TABLE IF EXISTS exposures_eatingoutvenues_history;
16019+
DROP TABLE IF EXISTS exposures_eatingoutvenues;
16020+
16021+
-- Drop the "other" free-text column from exposures and its history mirror.
16022+
ALTER TABLE exposures DROP COLUMN IF EXISTS eatingoutvenueother;
16023+
ALTER TABLE exposures_history DROP COLUMN IF EXISTS eatingoutvenueother;
16024+
16025+
INSERT INTO schema_version (version_number, comment) VALUES (631, '#13918 - Remove eating out venues from Salmonellosis exposure');
16026+
1600916027
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

0 commit comments

Comments
 (0)