Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PI-2634: Document 'Appointment Reminders and Delius' service #4429

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions projects/appointment-reminders-and-delius/README.md
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 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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 send 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
marcus-bcl marked this conversation as resolved.
Show resolved Hide resolved
- The person has not opted out of SMS contacts
|
}

validate_activity: Activity Validation {
explanation: |md
- The person has an active unpaid work requirement
- The unpaid work requirement is not related to\
Education, Training and Employment
- There is time remaining on the unpaid work requirement
- The appointment does not have an outcome
marcus-bcl marked this conversation as resolved.
Show resolved Hide resolved
|
}
}

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 -> validate
validate -> ok: OK
validate -> fail: Fail

ok -> deduplicate
deduplicate -> send
send -> end1
fail -> end2
Loading
Loading