Skip to content

Commit

Permalink
PI-2634: Document 'Appointment Reminders and Delius' service
Browse files Browse the repository at this point in the history
  • Loading branch information
mxco86 committed Nov 14, 2024
1 parent 6405a62 commit 6403547
Show file tree
Hide file tree
Showing 3 changed files with 997 additions and 2 deletions.
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,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
Loading

0 comments on commit 6403547

Please sign in to comment.