@@ -70,6 +70,14 @@ public class EpiDataDto extends PseudonymizableDto {
7070 public static final String IMPORTED_CASE = "importedCase" ;
7171 public static final String COUNTRY = "country" ;
7272 public static final String OTHER_DETAILS = "otherDetails" ;
73+ public static final String AIRPORT_WORKER = "airportWorker" ;
74+ public static final String HEALTHCARE_PROFESSIONAL = "healthcareProfessional" ;
75+ public static final String PLACE_OF_INFECTION = "placeOfInfection" ;
76+ public static final String RESIDENCE_AT_ONSET = "residenceAtOnset" ;
77+ public static final String EXPOSURE_INVESTIGATION_FROM_DATE = "exposureInvestigationFromDate" ;
78+ public static final String EXPOSURE_INVESTIGATION_TO_DATE = "exposureInvestigationToDate" ;
79+ public static final String ACTIVITY_AS_CASE_FROM_DATE = "activityAsCaseFromDate" ;
80+ public static final String ACTIVITY_AS_CASE_TO_DATE = "activityAsCaseToDate" ;
7381
7482 private YesNoUnknown exposureDetailsKnown ;
7583 private YesNoUnknown activityAsCaseDetailsKnown ;
@@ -81,7 +89,8 @@ public class EpiDataDto extends PseudonymizableDto {
8189 private CaseImportedStatus caseImportedStatus ;
8290
8391 @ Diseases ({
84- Disease .GIARDIASIS })
92+ Disease .GIARDIASIS ,
93+ Disease .SALMONELLOSIS })
8594 private YesNoUnknown importedCase ;
8695
8796 @ HideForCountriesExcept (countries = {
@@ -114,12 +123,14 @@ public class EpiDataDto extends PseudonymizableDto {
114123
115124 @ Diseases ({
116125 Disease .GIARDIASIS ,
117- Disease .CRYPTOSPORIDIOSIS })
126+ Disease .CRYPTOSPORIDIOSIS ,
127+ Disease .MALARIA })
118128 private ModeOfTransmission modeOfTransmission ;
119129
120130 @ Diseases ({
121131 Disease .GIARDIASIS ,
122- Disease .CRYPTOSPORIDIOSIS })
132+ Disease .CRYPTOSPORIDIOSIS ,
133+ Disease .MALARIA })
123134 @ Size (max = FieldConstraints .CHARACTER_LIMIT_DEFAULT , message = Validations .textTooLong )
124135 private String modeOfTransmissionType ;
125136
@@ -133,7 +144,8 @@ public class EpiDataDto extends PseudonymizableDto {
133144 private String infectionSourceText ;
134145
135146 @ Diseases ({
136- Disease .GIARDIASIS })
147+ Disease .GIARDIASIS ,
148+ Disease .SALMONELLOSIS })
137149 private CountryReferenceDto country ;
138150
139151 @ Valid
@@ -143,6 +155,50 @@ public class EpiDataDto extends PseudonymizableDto {
143155 private List <ActivityAsCaseDto > activitiesAsCase = new ArrayList <>();
144156
145157 private String otherDetails ;
158+ // airport worker should be applicable for all countries and diseases.
159+ @ Diseases
160+ @ HideForCountriesExcept
161+ private YesNoUnknown airportWorker ;
162+ @ Diseases ({
163+ Disease .MALARIA })
164+ @ HideForCountriesExcept (countries = {
165+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
166+ private YesNoUnknown healthcareProfessional ;
167+
168+ @ Diseases ({
169+ Disease .DENGUE })
170+ @ HideForCountriesExcept (countries = {
171+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
172+ @ Size (max = 255 , message = Validations .textTooLong )
173+ private String placeOfInfection ;
174+
175+ @ Diseases ({
176+ Disease .DENGUE })
177+ @ HideForCountriesExcept (countries = {
178+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
179+ @ Size (max = 255 , message = Validations .textTooLong )
180+ private String residenceAtOnset ;
181+
182+ @ Diseases ({
183+ Disease .SALMONELLOSIS })
184+ @ HideForCountriesExcept (countries = {
185+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
186+ private Date exposureInvestigationFromDate ;
187+ @ Diseases ({
188+ Disease .SALMONELLOSIS })
189+ @ HideForCountriesExcept (countries = {
190+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
191+ private Date exposureInvestigationToDate ;
192+ @ Diseases ({
193+ Disease .SALMONELLOSIS })
194+ @ HideForCountriesExcept (countries = {
195+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
196+ private Date activityAsCaseFromDate ;
197+ @ Diseases ({
198+ Disease .SALMONELLOSIS })
199+ @ HideForCountriesExcept (countries = {
200+ CountryHelper .COUNTRY_CODE_LUXEMBOURG })
201+ private Date activityAsCaseToDate ;
146202
147203 public YesNoUnknown getExposureDetailsKnown () {
148204 return exposureDetailsKnown ;
@@ -305,6 +361,88 @@ public void setOtherDetails(String otherDetails) {
305361 this .otherDetails = otherDetails ;
306362 }
307363
364+ public YesNoUnknown getAirportWorker () {
365+ return airportWorker ;
366+ }
367+
368+ public void setAirportWorker (YesNoUnknown airportWorker ) {
369+ this .airportWorker = airportWorker ;
370+ }
371+
372+ public YesNoUnknown getHealthcareProfessional () {
373+ return healthcareProfessional ;
374+ }
375+
376+ public void setHealthcareProfessional (YesNoUnknown healthcareProfessional ) {
377+ this .healthcareProfessional = healthcareProfessional ;
378+ }
379+
380+ public String getPlaceOfInfection () {
381+ return placeOfInfection ;
382+ }
383+
384+ public void setPlaceOfInfection (String placeOfInfection ) {
385+ this .placeOfInfection = placeOfInfection ;
386+ }
387+
388+ public String getResidenceAtOnset () {
389+ return residenceAtOnset ;
390+ }
391+
392+ public void setResidenceAtOnset (String residenceAtOnset ) {
393+ this .residenceAtOnset = residenceAtOnset ;
394+ }
395+
396+ public Date getExposureInvestigationFromDate () {
397+ return exposureInvestigationFromDate ;
398+ }
399+
400+ public void setExposureInvestigationFromDate (Date exposureInvestigationFromDate ) {
401+ validateDateRange (
402+ exposureInvestigationFromDate ,
403+ this .exposureInvestigationToDate ,
404+ "exposureInvestigationFromDate" ,
405+ "exposureInvestigationToDate" );
406+ this .exposureInvestigationFromDate = exposureInvestigationFromDate ;
407+ }
408+
409+ public Date getExposureInvestigationToDate () {
410+ return exposureInvestigationToDate ;
411+ }
412+
413+ public void setExposureInvestigationToDate (Date exposureInvestigationToDate ) {
414+ validateDateRange (
415+ this .exposureInvestigationFromDate ,
416+ exposureInvestigationToDate ,
417+ "exposureInvestigationFromDate" ,
418+ "exposureInvestigationToDate" );
419+ this .exposureInvestigationToDate = exposureInvestigationToDate ;
420+ }
421+
422+ public Date getActivityAsCaseFromDate () {
423+ return activityAsCaseFromDate ;
424+ }
425+
426+ public void setActivityAsCaseFromDate (Date activityAsCaseFromDate ) {
427+ validateDateRange (activityAsCaseFromDate , this .activityAsCaseToDate , "activityAsCaseFromDate" , "activityAsCaseToDate" );
428+ this .activityAsCaseFromDate = activityAsCaseFromDate ;
429+ }
430+
431+ public Date getActivityAsCaseToDate () {
432+ return activityAsCaseToDate ;
433+ }
434+
435+ public void setActivityAsCaseToDate (Date activityAsCaseToDate ) {
436+ validateDateRange (this .activityAsCaseFromDate , activityAsCaseToDate , "activityAsCaseFromDate" , "activityAsCaseToDate" );
437+ this .activityAsCaseToDate = activityAsCaseToDate ;
438+ }
439+
440+ private static void validateDateRange (Date from , Date to , String fromName , String toName ) {
441+ if (from != null && to != null && from .after (to )) {
442+ throw new IllegalArgumentException (fromName + " must be before or equal to " + toName );
443+ }
444+ }
445+
308446 @ Override
309447 public EpiDataDto clone () throws CloneNotSupportedException {
310448 EpiDataDto clone = (EpiDataDto ) super .clone ();
0 commit comments