This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
forked from SEL-Columbia/dristhi
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Interfaces for Alerts and Actions
Signed-off-by: Samuel Githengi <samuel.githengi@gmail.com>
- Loading branch information
Showing
18 changed files
with
122 additions
and
93 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
opensrp-core/src/main/java/org/opensrp/scheduler/repository/ActionsRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.opensrp.scheduler.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.joda.time.DateTime; | ||
import org.opensrp.repository.BaseRepository; | ||
import org.opensrp.scheduler.Action; | ||
|
||
public interface ActionsRepository extends BaseRepository<Action>{ | ||
|
||
List<Action> findByProviderIdAndTimeStamp(String providerId, long timeStamp); | ||
|
||
List<Action> findAlertByANMIdEntityIdScheduleName(String providerId, String baseEntityId, String scheduleName); | ||
|
||
List<Action> findByCaseIdScheduleAndTimeStamp(String baseEntityId, String schedule, DateTime start, DateTime end); | ||
|
||
List<Action> findByCaseIdAndTimeStamp(String baseEntityId, long timeStamp); | ||
|
||
void deleteAllByTarget(String target); | ||
|
||
void markAllAsInActiveFor(String baseEntityId); | ||
|
||
void addOrUpdateAlert(Action alertAction); | ||
|
||
void markAlertAsInactiveFor(String providerId, String baseEntityId, String scheduleName); | ||
|
||
List<Action> findByCriteria(String team, String providerId, long timeStamp, String sortBy, String sortOrder, int limit); | ||
} |
38 changes: 38 additions & 0 deletions
38
opensrp-core/src/main/java/org/opensrp/scheduler/repository/AlertsRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.opensrp.scheduler.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.joda.time.DateTime; | ||
import org.opensrp.dto.AlertStatus; | ||
import org.opensrp.repository.BaseRepository; | ||
import org.opensrp.scheduler.Alert; | ||
|
||
public interface AlertsRepository extends BaseRepository<Alert>{ | ||
|
||
List<Alert> findByProviderAndTimestamp(String provider, long timeStamp); | ||
|
||
List<Alert> findActiveByProviderAndTimestamp(String provider, long timeStamp); | ||
|
||
List<Alert> findAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName); | ||
|
||
List<Alert> findActiveAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName); | ||
|
||
List<Alert> findActiveAlertByEntityIdTriggerName(String entityId, String triggerName); | ||
|
||
List<Alert> findActiveAlertByEntityId(String entityId); | ||
|
||
List<Alert> findByEntityIdTriggerAndTimeStamp(String entityId, String trigger, DateTime start, DateTime end); | ||
|
||
void markAllAsClosedFor(String entityId, String reasonForClose); | ||
|
||
void markAlertAsClosedFor(String providerId, String entityId, String triggerName, String reasonForClose); | ||
|
||
void markAlertAsCompleteFor(String providerId, String entityId, String triggerName, String completionDate); | ||
|
||
void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String entityId, String providerId, String triggerName, | ||
String triggerCode, AlertStatus alertStatus, DateTime startDate, | ||
DateTime expiryDate); | ||
|
||
void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
opensrp-core/src/main/java/org/opensrp/service/BaseEntityService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters