generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PI-2634: Document 'Appointment Reminders and Delius' service
- Loading branch information
Showing
3 changed files
with
997 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,35 @@ | ||
# appointment-reminders-and-delius | ||
# Appointment Reminders and Delius | ||
|
||
// TODO Describe the service | ||
## Business Need | ||
|
||
- Sending appointment reminders to people on probation to help improve compliance with supervision activities | ||
- Providing a method of automating the sending of SMS messages via GOV.UK Notify | ||
- Standardising the process of sending SMS appointment reminders across regions | ||
|
||
## Workflows | ||
|
||
### Sending SMS Reminders Based on Delius Data | ||
|
||
The service will send appointment reminders to people on probation by combining the data in _Delius_ and the [GOV.UK Notify](https://www.notifications.service.gov.uk/) service. Data is gathered from Delius, validated and templated SMS messages are sent using the GOV.UK Notify API. | ||
|
||
![Workflow Map](./tech-docs/source/img/east-of-england-upw-reminders.svg) | ||
|
||
### Downloading CSV Data | ||
|
||
A CSV file of the appointment reminders that the service will send on a particular day can be accessed via an API endpoint | ||
|
||
## Interfaces | ||
|
||
### Scheduled Job | ||
|
||
- SMS messages are send via a scheduled job | ||
- Telemetry is send to Application Insights for each SMS message sent | ||
|
||
### API Access Control | ||
|
||
API endpoints are secured by roles supplied by the HMPPS Auth client used in | ||
the requests | ||
|
||
| API Endpoint | Required Role | | ||
|-----------------------|--------------------------------------------------| | ||
| /upw-appointments.csv | PROBATION\_API\_\_REMINDERS\_\_UPW\_APPOINTMENTS | |
77 changes: 77 additions & 0 deletions
77
projects/appointment-reminders-and-delius/tech-docs/diag/east-of-england-upw-reminders.d2
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,77 @@ | ||
# Appointment SMS Flow | ||
|
||
direction: down | ||
|
||
style { ...@../../../../script/style.style } | ||
vars { ...@../../../../script/style.vars } | ||
** { ...@../../../../script/style.all-style } | ||
|
||
data: Delius Data { | ||
"" { | ||
explanation: |md | ||
Name, mobile number and appointment date | ||
| | ||
} | ||
} | ||
|
||
deduplicate: Deduplication { | ||
"" { | ||
explanation: |md | ||
Where there are multiple appointments for a mobile number\ | ||
only consider a single reminder | ||
| | ||
} | ||
} | ||
|
||
validate: Validation { | ||
validate_person: Person Validation { | ||
explanation: |md | ||
- The person is not in custody or on remand | ||
- The person is not unlawfully at large | ||
- The person is not Limited Access | ||
| | ||
} | ||
|
||
validate_comms: Communication Validation { | ||
explanation: |md | ||
- The mobile number is formatted correctly | ||
- The person has not opted out of SMS contacts | ||
| | ||
} | ||
|
||
validate_activity: Activity Validation { | ||
explanation: |md | ||
- The person has an active unpaid work requirement | ||
- There is time remaining on the unpaid work requirement | ||
- The appointment does not have an outcome | ||
| | ||
} | ||
} | ||
|
||
ok: Validation OK | ||
fail: Validation Fail | ||
|
||
send: Send SMS { | ||
notify: GOV.UK Notify { | ||
explanation: |md | ||
Send SMS appointment reminder to person on probation | ||
| | ||
} | ||
} | ||
|
||
end1: End { | ||
shape: circle | ||
} | ||
|
||
end2: End { | ||
shape: circle | ||
} | ||
|
||
data -> deduplicate | ||
deduplicate -> validate | ||
validate -> ok: OK | ||
validate -> fail: Fail | ||
|
||
ok -> send | ||
send -> end1 | ||
fail -> end2 |
Oops, something went wrong.