Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 0c42951

Browse files
SORMAS-Foundation#3753 Add the signal evolution date in the event file and in the event directory (SORMAS-Foundation#4001)
* Add signalEvolutionDate field in the Event model SORMAS-Foundation#3753 * Management of the signalEvolutionDate field into Event forms SORMAS-Foundation#3753 * Management of signalEvolutionDate column, filter and exports into the Events and Actions directories SORMAS-Foundation#3753
1 parent 4c298fc commit 0c42951

27 files changed

Lines changed: 467 additions & 41 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/event/EventActionExportDto.java

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class EventActionExportDto implements Serializable {
3636
private String eventTitle;
3737
private String eventDesc;
3838
private String eventDate;
39+
private Date eventEvolutionDate;
40+
private String eventEvolutionComment;
3941
private EventStatus eventStatus;
4042
private EventInvestigationStatus eventInvestigationStatus;
4143
private ActionMeasure actionMeasure;
@@ -52,6 +54,8 @@ public EventActionExportDto(
5254
String eventDesc,
5355
Date eventStartDate,
5456
Date eventEndDate,
57+
Date eventEvolutionDate,
58+
String eventEvolutionComment,
5559
EventStatus eventStatus,
5660
EventInvestigationStatus eventInvestigationStatus,
5761
ActionMeasure actionMeasure,
@@ -71,6 +75,8 @@ public EventActionExportDto(
7175
this.eventTitle = eventTitle;
7276
this.eventDesc = eventDesc;
7377
this.eventDate = EventHelper.buildEventDateString(eventStartDate, eventEndDate);
78+
this.eventEvolutionDate = eventEvolutionDate;
79+
this.eventEvolutionComment = eventEvolutionComment;
7480
this.eventStatus = eventStatus;
7581
this.eventInvestigationStatus = eventInvestigationStatus;
7682
this.actionMeasure = actionMeasure;
@@ -105,46 +111,56 @@ public String getEventDate() {
105111
}
106112

107113
@Order(4)
114+
public Date getEventEvolutionDate() {
115+
return eventEvolutionDate;
116+
}
117+
118+
@Order(5)
119+
public String getEventEvolutionComment() {
120+
return eventEvolutionComment;
121+
}
122+
123+
@Order(6)
108124
public EventStatus getEventStatus() {
109125
return eventStatus;
110126
}
111127

112-
@Order(5)
128+
@Order(7)
113129
public EventInvestigationStatus getEventInvestigationStatus() {
114130
return eventInvestigationStatus;
115131
}
116132

117-
@Order(6)
133+
@Order(8)
118134
public ActionMeasure getActionMeasure() {
119135
return actionMeasure;
120136
}
121137

122-
@Order(7)
138+
@Order(9)
123139
public String getActionTitle() {
124140
return actionTitle;
125141
}
126142

127-
@Order(8)
143+
@Order(10)
128144
public Date getActionCreationDate() {
129145
return actionCreationDate;
130146
}
131147

132-
@Order(9)
148+
@Order(11)
133149
public Date getActionChangeDate() {
134150
return actionChangeDate;
135151
}
136152

137-
@Order(10)
153+
@Order(12)
138154
public ActionStatus getActionStatus() {
139155
return actionStatus;
140156
}
141157

142-
@Order(11)
158+
@Order(13)
143159
public ActionPriority getActionPriority() {
144160
return actionPriority;
145161
}
146162

147-
@Order(12)
163+
@Order(14)
148164
public UserReferenceDto getActionLastModifiedBy() {
149165
return actionLastModifiedBy;
150166
}

sormas-api/src/main/java/de/symeda/sormas/api/event/EventActionIndexDto.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class EventActionIndexDto implements Serializable {
3737
public static final String EVENT_END_DATE = "eventEndDate";
3838
public static final String EVENT_STATUS = "eventStatus";
3939
public static final String EVENT_INVESTIGATION_STATUS = "eventInvestigationStatus";
40+
public static final String EVENT_EVOLUTION_DATE = "eventEvolutionDate";
4041
public static final String ACTION_TITLE = "actionTitle";
4142
public static final String ACTION_CREATION_DATE = "actionCreationDate";
4243
public static final String ACTION_CHANGE_DATE = "actionChangeDate";
@@ -51,6 +52,7 @@ public class EventActionIndexDto implements Serializable {
5152
private Date eventEndDate;
5253
private EventStatus eventStatus;
5354
private EventInvestigationStatus eventInvestigationStatus;
55+
private Date eventEvolutionDate;
5456
private String actionTitle;
5557
private Date actionCreationDate;
5658
private Date actionChangeDate;
@@ -67,6 +69,7 @@ public EventActionIndexDto(
6769
EventStatus eventStatus,
6870
EventInvestigationStatus eventInvestigationStatus,
6971
ActionMeasure actionMeasure,
72+
Date eventEvolutionDate,
7073
String actionTitle,
7174
Date actionCreationDate,
7275
Date actionChangeDate,
@@ -86,6 +89,8 @@ public EventActionIndexDto(
8689
this.eventStatus = eventStatus;
8790
this.eventInvestigationStatus = eventInvestigationStatus;
8891
this.actionTitle = EventHelper.buildEventActionTitleString(actionMeasure, actionTitle);
92+
this.eventEvolutionDate = eventEvolutionDate;
93+
this.actionTitle = actionTitle;
8994
this.actionCreationDate = actionCreationDate;
9095
this.actionChangeDate = actionChangeDate;
9196
this.actionStatus = actionStatus;
@@ -142,6 +147,14 @@ public void setEventInvestigationStatus(EventInvestigationStatus eventInvestigat
142147
this.eventInvestigationStatus = eventInvestigationStatus;
143148
}
144149

150+
public Date getEventEvolutionDate() {
151+
return eventEvolutionDate;
152+
}
153+
154+
public void setEventEvolutionDate(Date eventEvolutionDate) {
155+
this.eventEvolutionDate = eventEvolutionDate;
156+
}
157+
145158
public String getActionTitle() {
146159
return actionTitle;
147160
}

sormas-api/src/main/java/de/symeda/sormas/api/event/EventCriteria.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public class EventCriteria extends BaseCriteria implements Serializable {
6363
private Date eventDateFrom;
6464
private Date eventDateTo;
6565
private DateFilterOption dateFilterOption = DateFilterOption.DATE;
66+
private Date eventEvolutionDateFrom;
67+
private Date eventEvolutionDateTo;
68+
private DateFilterOption evolutionDateFilterOption = DateFilterOption.DATE;
6669
private UserReferenceDto surveillanceOfficer;
6770
private String freeText;
6871
private EventSourceType srcType;
@@ -268,6 +271,40 @@ public DateFilterOption getDateFilterOption() {
268271
return dateFilterOption;
269272
}
270273

274+
public EventCriteria eventEvolutionDateBetween(Date eventEvolutionDateFrom, Date eventEvolutionDateTo, DateFilterOption evolutionDateFilterOption) {
275+
this.eventEvolutionDateFrom = eventEvolutionDateFrom;
276+
this.eventEvolutionDateTo = eventEvolutionDateTo;
277+
this.evolutionDateFilterOption = evolutionDateFilterOption;
278+
return this;
279+
}
280+
281+
public EventCriteria eventEvolutionDateFrom(Date eventEvolutionDateFrom) {
282+
this.eventEvolutionDateFrom = eventEvolutionDateFrom;
283+
return this;
284+
}
285+
286+
public Date getEventEvolutionDateFrom() {
287+
return eventEvolutionDateFrom;
288+
}
289+
290+
public EventCriteria eventEvolutionDateTo(Date eventEvolutionDateTo) {
291+
this.eventEvolutionDateTo = eventEvolutionDateTo;
292+
return this;
293+
}
294+
295+
public Date getEventEvolutionDateTo() {
296+
return eventEvolutionDateTo;
297+
}
298+
299+
public EventCriteria evolutionDateFilterOption(DateFilterOption evolutionDateFilterOption) {
300+
this.evolutionDateFilterOption = evolutionDateFilterOption;
301+
return this;
302+
}
303+
304+
public DateFilterOption getEvolutionDateFilterOption() {
305+
return evolutionDateFilterOption;
306+
}
307+
271308
public EventCriteria surveillanceOfficer(UserReferenceDto surveillanceOfficer) {
272309
this.surveillanceOfficer = surveillanceOfficer;
273310
return this;
@@ -341,6 +378,9 @@ public EventCriteria dateBetween(DateType dateType, Date dateFrom, Date dateTo,
341378
case EVENT:
342379
eventDateBetween(dateFrom, dateTo, dateFilterOption);
343380
break;
381+
case EVENT_SIGNAL_EVOLUTION:
382+
eventEvolutionDateBetween(dateFrom, dateTo, dateFilterOption);
383+
break;
344384
case ACTION:
345385
actionChangeDateBetween(dateFrom, dateTo, dateFilterOption);
346386
break;
@@ -389,6 +429,7 @@ public DateFilterOption getActionChangeDateFilterOption() {
389429

390430
public enum DateType {
391431
EVENT,
432+
EVENT_SIGNAL_EVOLUTION,
392433
ACTION,
393434
}
394435

sormas-api/src/main/java/de/symeda/sormas/api/event/EventDto.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public class EventDto extends PseudonymizableDto {
5252
public static final String MULTI_DAY_EVENT = "multiDayEvent";
5353
public static final String REPORT_DATE_TIME = "reportDateTime";
5454
public static final String REPORTING_USER = "reportingUser";
55+
public static final String EVOLUTION_DATE = "evolutionDate";
56+
public static final String EVOLUTION_COMMENT = "evolutionComment";
5557
public static final String EVENT_LOCATION = "eventLocation";
5658
public static final String TYPE_OF_PLACE = "typeOfPlace";
5759
public static final String MEANS_OF_TRANSPORT = "meansOfTransport";
@@ -98,6 +100,8 @@ public class EventDto extends PseudonymizableDto {
98100
private Date reportDateTime;
99101
@Required
100102
private UserReferenceDto reportingUser;
103+
private Date evolutionDate;
104+
private String evolutionComment;
101105
private LocationDto eventLocation;
102106
private TypeOfPlace typeOfPlace;
103107
private MeansOfTransport meansOfTransport;
@@ -259,6 +263,22 @@ public void setReportingUser(UserReferenceDto reportingUser) {
259263
this.reportingUser = reportingUser;
260264
}
261265

266+
public Date getEvolutionDate() {
267+
return evolutionDate;
268+
}
269+
270+
public void setEvolutionDate(Date evolutionDate) {
271+
this.evolutionDate = evolutionDate;
272+
}
273+
274+
public String getEvolutionComment() {
275+
return evolutionComment;
276+
}
277+
278+
public void setEvolutionComment(String evolutionComment) {
279+
this.evolutionComment = evolutionComment;
280+
}
281+
262282
public TypeOfPlace getTypeOfPlace() {
263283
return typeOfPlace;
264284
}

0 commit comments

Comments
 (0)