Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/Disease.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public enum Disease
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false, true, 1, 10),
GIARDIASIS(true, true, true, false, true, 14, false, false, false, true, 7, 21),
CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false, true, 2, 12),
SALMONELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 3),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0),
UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package de.symeda.sormas.api.epidata;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.validation.Valid;
Expand Down Expand Up @@ -73,6 +74,10 @@ public class EpiDataDto extends PseudonymizableDto {
public static final String HEALTHCARE_PROFESSIONAL = "healthcareProfessional";
public static final String PLACE_OF_INFECTION = "placeOfInfection";
public static final String RESIDENCE_AT_ONSET = "residenceAtOnset";
public static final String EXPOSURE_INVESTIGATION_FROM_DATE = "exposureInvestigationFromDate";
public static final String EXPOSURE_INVESTIGATION_TO_DATE = "exposureInvestigationToDate";
public static final String ACTIVITY_AS_CASE_FROM_DATE = "activityAsCaseFromDate";
public static final String ACTIVITY_AS_CASE_TO_DATE = "activityAsCaseToDate";

private YesNoUnknown exposureDetailsKnown;
private YesNoUnknown activityAsCaseDetailsKnown;
Expand All @@ -84,7 +89,8 @@ public class EpiDataDto extends PseudonymizableDto {
private CaseImportedStatus caseImportedStatus;

@Diseases({
Disease.GIARDIASIS })
Disease.GIARDIASIS,
Disease.SALMONELLOSIS })
private YesNoUnknown importedCase;

@HideForCountriesExcept(countries = {
Expand Down Expand Up @@ -138,7 +144,8 @@ public class EpiDataDto extends PseudonymizableDto {
private String infectionSourceText;

@Diseases({
Disease.GIARDIASIS })
Disease.GIARDIASIS,
Disease.SALMONELLOSIS })
private CountryReferenceDto country;

@Valid
Expand Down Expand Up @@ -172,6 +179,27 @@ public class EpiDataDto extends PseudonymizableDto {
@Size(max = 255, message = Validations.textTooLong)
private String residenceAtOnset;

@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private Date exposureInvestigationFromDate;
@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private Date exposureInvestigationToDate;
@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private Date activityAsCaseFromDate;
@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private Date activityAsCaseToDate;

public YesNoUnknown getExposureDetailsKnown() {
return exposureDetailsKnown;
}
Expand Down Expand Up @@ -365,6 +393,56 @@ public void setResidenceAtOnset(String residenceAtOnset) {
this.residenceAtOnset = residenceAtOnset;
}

public Date getExposureInvestigationFromDate() {
return exposureInvestigationFromDate;
}

public void setExposureInvestigationFromDate(Date exposureInvestigationFromDate) {
validateDateRange(
exposureInvestigationFromDate,
this.exposureInvestigationToDate,
"exposureInvestigationFromDate",
"exposureInvestigationToDate");
this.exposureInvestigationFromDate = exposureInvestigationFromDate;
}

public Date getExposureInvestigationToDate() {
return exposureInvestigationToDate;
}

public void setExposureInvestigationToDate(Date exposureInvestigationToDate) {
validateDateRange(
this.exposureInvestigationFromDate,
exposureInvestigationToDate,
"exposureInvestigationFromDate",
"exposureInvestigationToDate");
this.exposureInvestigationToDate = exposureInvestigationToDate;
}

public Date getActivityAsCaseFromDate() {
return activityAsCaseFromDate;
}

public void setActivityAsCaseFromDate(Date activityAsCaseFromDate) {
validateDateRange(activityAsCaseFromDate, this.activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate");
this.activityAsCaseFromDate = activityAsCaseFromDate;
}

public Date getActivityAsCaseToDate() {
return activityAsCaseToDate;
}

public void setActivityAsCaseToDate(Date activityAsCaseToDate) {
validateDateRange(this.activityAsCaseFromDate, activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate");
this.activityAsCaseToDate = activityAsCaseToDate;
}

private static void validateDateRange(Date from, Date to, String fromName, String toName) {
if (from != null && to != null && from.after(to)) {
throw new IllegalArgumentException(fromName + " must be before or equal to " + toName);
}
}

@Override
public EpiDataDto clone() throws CloneNotSupportedException {
EpiDataDto clone = (EpiDataDto) super.clone();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2026 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/

package de.symeda.sormas.api.exposure;

import de.symeda.sormas.api.i18n.I18nProperties;

public enum EatingOutVenue {

CANTEENS,
FOOD_SERVED_ON_BOARD,
GAS_STATIONS,
STREET_VENDORS,
FOOD_COURTS,
CAFES_OR_TEA_ROOMS,
SANDWICH_SHOPS_BAKERIES_DELICATESSENS,
CAFETERIAS_OR_BARS,
KEBAB_FALAFEL_SNACK_SHOPS,
BURGER_RESTAURANTS,
FAST_FOOD_SNACK_BARS,
PIZZERIAS,
ASIAN_RESTAURANTS,
HOTELS,
TAKEAWAY_FOOD,
BUFFET_STYLE_RESTAURANTS,
FOOD_AT_EVENTS,
OTHER;

@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import javax.validation.Valid;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.contact.ContactReferenceDto;
import de.symeda.sormas.api.epidata.AnimalCondition;
Expand Down Expand Up @@ -139,6 +140,9 @@ public class ExposureDto extends PseudonymizableDto {
public static final String PROPHYLAXIS_ADHERENCE_DETAILS = "prophylaxisAdherenceDetails";
public static final String TRAVEL_PURPOSE = "travelPurpose";
public static final String TRAVEL_PURPOSE_DETAILS = "travelPurposeDetails";
public static final String EATING_OUT_VENUES = "eatingOutVenues";
public static final String EATING_OUT_VENUE_OTHER = "eatingOutVenueOther";
public static final String SHOPPING_FOR_FOOD_DETAILS = "shoppingForFoodDetails";

@SensitiveData
private UserReferenceDto reportingUser;
Expand Down Expand Up @@ -455,6 +459,24 @@ public class ExposureDto extends PseudonymizableDto {
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String travelPurposeDetails;

@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private Set<EatingOutVenue> eatingOutVenues;
@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String eatingOutVenueOther;
@Diseases({
Disease.SALMONELLOSIS })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String shoppingForFoodDetails;

public static ExposureDto build(ExposureType exposureType) {

ExposureDto exposure = new ExposureDto();
Expand All @@ -466,6 +488,7 @@ public static ExposureDto build(ExposureType exposureType) {
exposure.setSubSettings(new HashSet<>());
exposure.setContactFactors(new HashSet<>());
exposure.setProtectiveMeasures(new HashSet<>());
exposure.setEatingOutVenues(new HashSet<>());

return exposure;
}
Expand Down Expand Up @@ -1150,6 +1173,30 @@ public void setProphylaxisAdherenceDetails(String prophylaxisAdherenceDetails) {
this.prophylaxisAdherenceDetails = prophylaxisAdherenceDetails;
}

public Set<EatingOutVenue> getEatingOutVenues() {
return eatingOutVenues;
}

public void setEatingOutVenues(Set<EatingOutVenue> eatingOutVenues) {
this.eatingOutVenues = eatingOutVenues;
}

public String getEatingOutVenueOther() {
return eatingOutVenueOther;
}

public void setEatingOutVenueOther(String eatingOutVenueOther) {
this.eatingOutVenueOther = eatingOutVenueOther;
}

public String getShoppingForFoodDetails() {
return shoppingForFoodDetails;
}

public void setShoppingForFoodDetails(String shoppingForFoodDetails) {
this.shoppingForFoodDetails = shoppingForFoodDetails;
}

@Override
public ExposureDto clone() throws CloneNotSupportedException {
ExposureDto clone = (ExposureDto) super.clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public enum ExposureSubSetting {

EATING_AT_HOME(ExposureCategory.FOOD_BORNE, null),
EATING_OUTSIDE(ExposureCategory.FOOD_BORNE, null),
SHOPPING_FOR_FOOD(ExposureCategory.FOOD_BORNE, null),

UNKNOWN(null, null),
OTHER(null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ public class HospitalizationDto extends EntityDto {
@Diseases({
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
Disease.CRYPTOSPORIDIOSIS,
Disease.SALMONELLOSIS })
private YesNoUnknown stillHospitalized;
@Diseases({
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
Expand Down
10 changes: 10 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,8 @@ public interface Captions {
String EpiData = "EpiData";
String EpiData_activitiesAsCase = "EpiData.activitiesAsCase";
String EpiData_activityAsCaseDetailsKnown = "EpiData.activityAsCaseDetailsKnown";
String EpiData_activityAsCaseFromDate = "EpiData.activityAsCaseFromDate";
String EpiData_activityAsCaseToDate = "EpiData.activityAsCaseToDate";
String EpiData_airportWorker = "EpiData.airportWorker";
String EpiData_areaInfectedAnimals = "EpiData.areaInfectedAnimals";
String EpiData_caseImportedStatus = "EpiData.caseImportedStatus";
Expand All @@ -1620,6 +1622,8 @@ public interface Captions {
String EpiData_contactWithSourceCaseKnown = "EpiData.contactWithSourceCaseKnown";
String EpiData_country = "EpiData.country";
String EpiData_exposureDetailsKnown = "EpiData.exposureDetailsKnown";
String EpiData_exposureInvestigationFromDate = "EpiData.exposureInvestigationFromDate";
String EpiData_exposureInvestigationToDate = "EpiData.exposureInvestigationToDate";
String EpiData_exposures = "EpiData.exposures";
String EpiData_healthcareProfessional = "EpiData.healthcareProfessional";
String EpiData_highTransmissionRiskArea = "EpiData.highTransmissionRiskArea";
Expand Down Expand Up @@ -1896,6 +1900,8 @@ public interface Captions {
String Exposure_deceasedPersonName = "Exposure.deceasedPersonName";
String Exposure_deceasedPersonRelation = "Exposure.deceasedPersonRelation";
String Exposure_domesticSwimming = "Exposure.domesticSwimming";
String Exposure_eatingOutVenueOther = "Exposure.eatingOutVenueOther";
String Exposure_eatingOutVenues = "Exposure.eatingOutVenues";
String Exposure_eatingRawAnimalProducts = "Exposure.eatingRawAnimalProducts";
String Exposure_endDate = "Exposure.endDate";
String Exposure_exposureCategory = "Exposure.exposureCategory";
Expand Down Expand Up @@ -1941,6 +1947,7 @@ public interface Captions {
String Exposure_riskArea = "Exposure.riskArea";
String Exposure_seatNumber = "Exposure.seatNumber";
String Exposure_sexualExposureText = "Exposure.sexualExposureText";
String Exposure_shoppingForFoodDetails = "Exposure.shoppingForFoodDetails";
String Exposure_shortDistance = "Exposure.shortDistance";
String Exposure_startDate = "Exposure.startDate";
String Exposure_subSettings = "Exposure.subSettings";
Expand Down Expand Up @@ -3010,6 +3017,7 @@ public interface Captions {
String Symptoms_congenitalHeartDiseaseType = "Symptoms.congenitalHeartDiseaseType";
String Symptoms_conjunctivalInjection = "Symptoms.conjunctivalInjection";
String Symptoms_conjunctivitis = "Symptoms.conjunctivitis";
String Symptoms_constipation = "Symptoms.constipation";
String Symptoms_convulsion = "Symptoms.convulsion";
String Symptoms_cough = "Symptoms.cough";
String Symptoms_coughingBlood = "Symptoms.coughingBlood";
Expand All @@ -3033,11 +3041,13 @@ public interface Captions {
String Symptoms_dizzinessStandingUp = "Symptoms.dizzinessStandingUp";
String Symptoms_durationOfSymptoms = "Symptoms.durationOfSymptoms";
String Symptoms_dysphagia = "Symptoms.dysphagia";
String Symptoms_dysuria = "Symptoms.dysuria";
String Symptoms_eggyBurps = "Symptoms.eggyBurps";
String Symptoms_encephalitis = "Symptoms.encephalitis";
String Symptoms_erraticBehaviour = "Symptoms.erraticBehaviour";
String Symptoms_excessSalivation = "Symptoms.excessSalivation";
String Symptoms_excitation = "Symptoms.excitation";
String Symptoms_eyeIrritation = "Symptoms.eyeIrritation";
String Symptoms_eyePainLightSensitive = "Symptoms.eyePainLightSensitive";
String Symptoms_eyesBleeding = "Symptoms.eyesBleeding";
String Symptoms_fastHeartRate = "Symptoms.fastHeartRate";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,14 @@ public class PersonDto extends PseudonymizableDto implements IsPerson {
@SensitiveData
@Diseases(value = {
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
Disease.CRYPTOSPORIDIOSIS,
Disease.SALMONELLOSIS })
private WorkPlace workPlace;
@SensitiveData
@Diseases(value = {
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
Disease.CRYPTOSPORIDIOSIS,
Disease.SALMONELLOSIS })
@DependantOn(WORK_PLACE)
private String workPlaceText;

Expand Down Expand Up @@ -731,7 +733,7 @@ public void setAdditionalPhone(String phone) {
}

/**
*
*
* @return the PRIMARY email address. Email addresses set with the {@link #setEmailAddress(String)} method automatically become primary.
* An email address entered in the personEditForm is not, and thus does not become primary email address unless the user
* specifically sets it.
Expand All @@ -742,7 +744,7 @@ public String getEmailAddress() {
}

/**
*
*
* @param onlyPrimary
* if true, the return value is same as in {@link #getEmailAddress()}. Otherwise, this method tries to return the only email
* address for this person, no matter if primary or not. Results in an SeveralNonPrimaryContactDetailsException when there
Expand Down Expand Up @@ -780,7 +782,7 @@ public List<String> getAllEmailAddresses() {
}

/**
*
*
* @param email
* is automatically set as primary email address, removing the primary status from another email address if necessary.
*/
Expand Down
Loading
Loading