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

Commit 27ee4aa

Browse files
Add an investigation status field to events SORMAS-Foundation#2992 (SORMAS-Foundation#3155)
* Add an investigation status field to events SORMAS-Foundation#2992 * Fix event investigation start/end date fields on mobile app SORMAS-Foundation#2992 * Fix an event creation in a test added in the meantime by another PR SORMAS-Foundation#2992
1 parent a70018a commit 27ee4aa

46 files changed

Lines changed: 565 additions & 103 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ public class DashboardEventDto implements Serializable {
3030
public static final String I18N_PREFIX = "Event";
3131

3232
public static final String EVENT_STATUS = "eventStatus";
33+
public static final String EVENT_INVESTIGATION_STATUS = "eventInvestigationStatus";
3334
public static final String DISEASE = "disease";
3435

3536
private String uuid;
3637
private EventStatus eventStatus;
38+
private EventInvestigationStatus eventInvestigationStatus;
3739
private Disease disease;
3840
private String diseaseDetails;
3941
private Date eventDate;
@@ -48,6 +50,7 @@ public class DashboardEventDto implements Serializable {
4850
public DashboardEventDto(
4951
String uuid,
5052
EventStatus eventStatus,
53+
EventInvestigationStatus eventInvestigationStatus,
5154
Disease disease,
5255
String diseaseDetails,
5356
Date eventDate,
@@ -64,6 +67,7 @@ public DashboardEventDto(
6467

6568
this.uuid = uuid;
6669
this.eventStatus = eventStatus;
70+
this.eventInvestigationStatus = eventInvestigationStatus;
6771
this.disease = disease;
6872
this.diseaseDetails = diseaseDetails;
6973
this.eventDate = eventDate;
@@ -92,6 +96,14 @@ public void setEventStatus(EventStatus eventStatus) {
9296
this.eventStatus = eventStatus;
9397
}
9498

99+
public EventInvestigationStatus getEventInvestigationStatus() {
100+
return eventInvestigationStatus;
101+
}
102+
103+
public void setEventInvestigationStatus(EventInvestigationStatus eventInvestigationStatus) {
104+
this.eventInvestigationStatus = eventInvestigationStatus;
105+
}
106+
95107
public Disease getDisease() {
96108
return disease;
97109
}
@@ -154,7 +166,7 @@ public DistrictReferenceDto getDistrict() {
154166

155167
@Override
156168
public String toString() {
157-
return EventReferenceDto.buildCaption(getDisease(), getDiseaseDetails(), getEventStatus(), getEventDate());
169+
return EventReferenceDto.buildCaption(getDisease(), getDiseaseDetails(), getEventStatus(), getEventInvestigationStatus(), getEventDate());
158170
}
159171

160172
public EventJurisdictionDto getJurisdiction() {

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class EventActionIndexDto implements Serializable {
3535
public static final String EVENT_START_DATE = "eventStartDate";
3636
public static final String EVENT_END_DATE = "eventEndDate";
3737
public static final String EVENT_STATUS = "eventStatus";
38+
public static final String EVENT_INVESTIGATION_STATUS = "eventInvestigationStatus";
3839
public static final String ACTION_TITLE = "actionTitle";
3940
public static final String ACTION_CREATION_DATE = "actionCreationDate";
4041
public static final String ACTION_CHANGE_DATE = "actionChangeDate";
@@ -47,6 +48,7 @@ public class EventActionIndexDto implements Serializable {
4748
private Date eventStartDate;
4849
private Date eventEndDate;
4950
private EventStatus eventStatus;
51+
private EventInvestigationStatus eventInvestigationStatus;
5052
private String actionTitle;
5153
private Date actionCreationDate;
5254
private Date actionChangeDate;
@@ -60,6 +62,7 @@ public EventActionIndexDto(
6062
Date eventStartDate,
6163
Date eventEndDate,
6264
EventStatus eventStatus,
65+
EventInvestigationStatus eventInvestigationStatus,
6366
String actionTitle,
6467
Date actionCreationDate,
6568
Date actionChangeDate,
@@ -74,6 +77,7 @@ public EventActionIndexDto(
7477
this.eventStartDate = eventStartDate;
7578
this.eventEndDate = eventEndDate;
7679
this.eventStatus = eventStatus;
80+
this.eventInvestigationStatus = eventInvestigationStatus;
7781
this.actionTitle = actionTitle;
7882
this.actionCreationDate = actionCreationDate;
7983
this.actionChangeDate = actionChangeDate;
@@ -122,6 +126,14 @@ public void setEventStatus(EventStatus eventStatus) {
122126
this.eventStatus = eventStatus;
123127
}
124128

129+
public EventInvestigationStatus getEventInvestigationStatus() {
130+
return eventInvestigationStatus;
131+
}
132+
133+
public void setEventInvestigationStatus(EventInvestigationStatus eventInvestigationStatus) {
134+
this.eventInvestigationStatus = eventInvestigationStatus;
135+
}
136+
125137
public String getActionTitle() {
126138
return actionTitle;
127139
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public class EventCriteria extends BaseCriteria implements Serializable {
4141
public static final String SURVEILLANCE_OFFICER = "surveillanceOfficer";
4242
public static final String FREE_TEXT = "freeText";
4343
public static final String EVENT_STATUS = "eventStatus";
44+
public static final String EVENT_INVESTIGATION_STATUS = "eventInvestigationStatus";
4445
public static final String DISTRICT = "district";
4546
public static final String REGION = "region";
4647

4748
private EventStatus eventStatus;
49+
private EventInvestigationStatus eventInvestigationStatus;
4850
private Disease disease;
4951
private UserRole reportingUserRole;
5052
private Boolean deleted = Boolean.FALSE;
@@ -83,6 +85,19 @@ public void setEventStatus(EventStatus eventStatus) {
8385
this.eventStatus = eventStatus;
8486
}
8587

88+
public EventInvestigationStatus getEventInvestigationStatus() {
89+
return eventInvestigationStatus;
90+
}
91+
92+
public void setEventInvestigationStatus(EventInvestigationStatus eventInvestigationStatus) {
93+
this.eventInvestigationStatus = eventInvestigationStatus;
94+
}
95+
96+
public EventCriteria eventInvestigationStatus(EventInvestigationStatus eventInvestigationStatus) {
97+
this.eventInvestigationStatus = eventInvestigationStatus;
98+
return this;
99+
}
100+
86101
public Disease getDisease() {
87102
return disease;
88103
}

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public class EventDto extends PseudonymizableDto {
3535
public static final String I18N_PREFIX = "Event";
3636

3737
public static final String EVENT_STATUS = "eventStatus";
38+
public static final String EVENT_INVESTIGATION_STATUS = "eventInvestigationStatus";
39+
public static final String EVENT_INVESTIGATION_START_DATE = "eventInvestigationStartDate";
40+
public static final String EVENT_INVESTIGATION_END_DATE = "eventInvestigationEndDate";
3841
public static final String EVENT_PERSONS = "eventPersons";
3942
public static final String PARTICIPANTS_COUNT = "participantCount";
4043
public static final String EVENT_ACTIONS = "eventActions";
@@ -66,6 +69,9 @@ public class EventDto extends PseudonymizableDto {
6669

6770
@Required
6871
private EventStatus eventStatus;
72+
private EventInvestigationStatus eventInvestigationStatus;
73+
private Date eventInvestigationStartDate;
74+
private Date eventInvestigationEndDate;
6975
private String externalId;
7076
private String eventTitle;
7177
@Required
@@ -101,6 +107,7 @@ public static EventDto build() {
101107
event.setUuid(DataHelper.createUuid());
102108

103109
event.setEventStatus(EventStatus.SIGNAL);
110+
event.setEventInvestigationStatus(EventInvestigationStatus.PENDING);
104111
event.setEventLocation(LocationDto.build());
105112
event.setReportDateTime(new Date());
106113

@@ -115,6 +122,30 @@ public void setEventStatus(EventStatus eventStatus) {
115122
this.eventStatus = eventStatus;
116123
}
117124

125+
public EventInvestigationStatus getEventInvestigationStatus() {
126+
return eventInvestigationStatus;
127+
}
128+
129+
public void setEventInvestigationStatus(EventInvestigationStatus eventInvestigationStatus) {
130+
this.eventInvestigationStatus = eventInvestigationStatus;
131+
}
132+
133+
public Date getEventInvestigationStartDate() {
134+
return eventInvestigationStartDate;
135+
}
136+
137+
public void setEventInvestigationStartDate(Date eventInvestigationStartDate) {
138+
this.eventInvestigationStartDate = eventInvestigationStartDate;
139+
}
140+
141+
public Date getEventInvestigationEndDate() {
142+
return eventInvestigationEndDate;
143+
}
144+
145+
public void setEventInvestigationEndDate(Date eventInvestigationEndDate) {
146+
this.eventInvestigationEndDate = eventInvestigationEndDate;
147+
}
148+
118149
public String getExternalId() {
119150
return externalId;
120151
}

0 commit comments

Comments
 (0)