Skip to main content

NHS Notify Reminder System

Free appointment reminders via NHS App and email. Replaces paid SMS services (Accurx, Mjog).

What this does

  • Reads appointment data from EMIS Web CSV exports
  • Sends 48-hour and 24-hour reminders via NHS Notify
  • Messages arrive in the NHS App inbox (or email as fallback)
  • Tracks delivery via SharePoint List (no patient data stored)
  • Alerts practice manager if failures exceed 20%
Runs twice daily (08:00 and 13:00)
Cost: £0

Prerequisites checklist

Work through these before attempting installation. Each has a clear owner so the admin team can divide up the work.

1

NHS Notify account approved

Apply for a routing plan. Once approved, NHS Notify will provide a routing plan UUID — this goes into config.json.

Owner: Dr Krishnan Pasupathi, GP Partner, Wye Valley SurgeryContact: england.nhsnotify@nhs.net
2

MESH mailbox credentials

MESH is the NHS secure messaging endpoint NHS Notify submits through. You need mailbox ID, password, and shared key.

Owner: SCW IT teamContact: Raise a ticket via SCW Work Reception
3

EMIS Population Report configured

Report name: "Appointments Next 3 Days". Fields: NHS Number, Appointment Date/Time, Slot Type, Clinician, Site. Scheduled 08:00 and 13:00, exports CSV.

Owner: Practice admin (with EMIS access)Contact: EMIS Web → Population Reporting
4

SCW HSCN whitelist

Whitelist outbound traffic to NHS Notify and MESH endpoints so the surgery PC on HSCN can reach them.

Owner: SCW Work ReceptionContact: Dr K can log the ticket directly
5

NHSmail SMTP for alerts

Used to email the practice manager if delivery failure rate exceeds 20%. Host: send.nhs.net, port 587.

Owner: Practice managerContact: Shared NHSmail account

Setup steps

1

Copy the scripts to the surgery PC

Place the reminder-system folder at C:\ReminderSystem\ on a PC that stays on during surgery hours.

2

Install Python dependencies

Open Command Prompt in C:\ReminderSystem\ and run: pip install -r requirements.txt

Tip: Most NHS PCs already have Python 3.10+. If not, install from python.org and tick "Add to PATH".
3

Fill in config.json

Open config.json in Notepad. Replace every REPLACE_WITH_* placeholder with the value from the prerequisites above.

Tip: Do not commit or email config.json anywhere — it contains MESH credentials.
4

Dry run to verify

Run: python send_reminders.py --dry-run. This reads the EMIS CSV and shows what would be sent, without actually sending.

Tip: Check the log file in logs/ to confirm the right appointments are being picked up.
5

Schedule via Windows Task Scheduler

Create two tasks for send_reminders.py (08:00 and 13:00 daily) and one for check_delivery.py (every 30 minutes during working hours). Use "Run whether user is logged on or not".

6

Go live with a small cohort

Start with one clinician's appointments for 3 days. Review logs and confirm patients receive reminders before expanding to the whole practice.

How deduplication keeps things safe

Each reminder is stamped with a deterministic key: SHA256(nhs_number + datetime + type).

If the script runs twice for the same appointment, NHS Notify sees the same key and rejects the duplicate with HTTP 422. This means:

  • Safe to run on multiple PCs — only one message gets through
  • Safe if Task Scheduler fires twice
  • Safe to re-run after errors

No patient data is stored anywhere. NHS numbers flow through the script transiently and are never written to disk or sent to SharePoint.

Optional: SharePoint tracking

If you want a dashboard showing delivery rates, set up a Power Automate webhook:

  1. Create a SharePoint List called Appointment Reminders
  2. Add columns: appointment hash, reminder type, timestamps, status
  3. Create a Power Automate flow: HTTP trigger → Create SharePoint item
  4. Paste the webhook URL into config.json
  5. Build a Power BI dashboard from the SharePoint List

Only appointment hashes and timestamps are sent — no NHS numbers, names, or addresses.

Troubleshooting

No CSV files found

Check emis_csv_folder in config.json matches where EMIS exports. Check the EMIS Population Report is scheduled and running.

HTTP 401 from MESH

MESH credentials may have expired — raise a ticket with the SCW IT team.

All messages show as duplicates

This is normal if the script ran already for these appointments. Idempotency keys (SHA256 of NHS number + datetime + type) prevent double-sending.

Reminders not arriving in NHS App

Check NHS Notify status page. Verify routing plan is active. Patient may not have NHS App installed — email fallback activates automatically.

Logs are in the logs/ folder, one file per day per script.

Governance note

Before go-live: confirm DPIA sign-off for processing EMIS appointment data through NHS Notify. Pilot at Wye Valley Surgery first; external publication of this blueprint will follow once the pilot confirms it works as intended.

Scripts and source

The Python scripts live at tools/reminder-system/ on Dr Krishnan’s machine. Request a zipped copy when you’re ready to install.

Once the Wye Valley pilot is live, a public blueprint will be shared.

Internal pilot — Wye Valley Surgery

Questions? Contact Dr Krishnan Pasupathi