Skip to content

Commit 38972cf

Browse files
added architecture overview diagram and simplified PR template (#1447)
Co-authored-by: Thomas-Boyle <45789537+Thomas-Boyle@users.noreply.github.com>
1 parent 273d76d commit 38972cf

2 files changed

Lines changed: 80 additions & 22 deletions

File tree

.github/pull_request_template.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
## Summary
1+
## PR Description
22

3-
- Routine Change
4-
- :exclamation: Breaking Change
5-
- :robot: Operational or Infrastructure Change
6-
- :sparkles: New Feature
7-
- :warning: Potential issues that might be caused by this change
3+
Description of the changes made.
84

9-
Add any other relevant notes or explanations here. **Remove this line if you have nothing to add.**
5+
## How were the changes tested
106

11-
## Reviews Required
12-
13-
- [x] Dev
14-
- [ ] Test
15-
- [ ] Tech Author
16-
- [ ] Product Owner
17-
18-
## Review Checklist
19-
20-
:information_source: This section is to be filled in by the **reviewer**.
21-
22-
- [ ] I have reviewed the changes in this PR and they fill all of the acceptance criteria of the ticket.
23-
- [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
24-
- [ ] If there were changes that are outside of the regular release processes e.g. account infrastructure to setup, manual setup for external API integrations, secrets to set, then I have checked that the developer has flagged this to the Tech Lead as release steps.
25-
- [ ] I have checked that no Personal Identifiable Data (PID) is logged as part of the changes.
7+
Describe how the changes were tested
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# System Overview
2+
3+
This page gives a high-level view of the Immunisation FHIR API runtime architecture.
4+
5+
It focuses on the API path, batch ingestion path, outbound notification flow, runtime configuration, and NHS number change handling.
6+
7+
## High-Level Diagram
8+
9+
```mermaid
10+
flowchart LR
11+
subgraph Ingress[Ingress and API]
12+
Suppliers[Supplier systems] --> Apigee[Apigee proxy\nOAuth, rate limiting, supplier header]
13+
Apigee --> ApiGw[AWS API Gateway HTTP API]
14+
ApiGw --> Backend[Backend API Lambdas\nCRUD, search, status]
15+
Backend --> IEDS[(IEDS DynamoDB\nImmunisation event store)]
16+
end
17+
18+
subgraph Batch[Batch ingestion]
19+
SupplierFiles[Supplier batch files in S3] --> Filename[Filename Processor Lambda]
20+
Mesh[MESH mailbox bucket] --> MeshProc[Mesh Processor Lambda]
21+
MeshProc --> Filename
22+
Filename --> BatchCreated[SQS FIFO\nbatch-file-created]
23+
BatchCreated --> BatchFilter[Batch Processor Filter Lambda]
24+
BatchFilter --> SupplierQueue[SQS FIFO\nsupplier metadata queue]
25+
SupplierQueue --> BatchPipe[EventBridge Pipe]
26+
BatchPipe --> RecordProcessor[ECS Fargate Record Processor]
27+
RecordProcessor --> Kinesis[Kinesis data stream]
28+
Kinesis --> Forwarder[Record Forwarder Lambda]
29+
Forwarder --> IEDS
30+
Forwarder --> AckQueue[SQS FIFO\nack metadata queue]
31+
AckQueue --> Ack[Ack Backend Lambda]
32+
end
33+
34+
subgraph Outbound[Outbound notifications]
35+
IEDS -->|DynamoDB stream| Delta[Delta Lambda]
36+
Delta --> DeltaTable[(Delta DynamoDB)]
37+
DeltaTable -->|DynamoDB stream| MnsPipe[EventBridge Pipe]
38+
MnsPipe --> MnsQueue[SQS\nmns-outbound-events]
39+
MnsQueue --> MnsPublisher[MNS Publisher Lambda]
40+
MnsPublisher --> Subscribers[MNS subscribers]
41+
end
42+
43+
subgraph Config[Runtime config]
44+
ConfigBucket[S3 config bucket] --> RedisSync[Redis Sync Lambda]
45+
RedisSync --> Redis[(Redis cache\npermissions, disease mappings, config)]
46+
Redis --> Backend
47+
Redis --> Filename
48+
Redis --> RecordProcessor
49+
Redis --> Forwarder
50+
end
51+
52+
subgraph IdSync[Identity sync]
53+
MnsIdEvent[MNS NHS number change event] --> IdQueue[SQS\nid-sync-queue]
54+
IdQueue --> IdSyncLambda[ID Sync Lambda]
55+
IdSyncLambda --> IEDS
56+
end
57+
```
58+
59+
## Key Runtime Stores
60+
61+
| Store | Purpose |
62+
| -------------- | ------------------------------------------------------------------- |
63+
| IEDS DynamoDB | System of record for immunisation events |
64+
| Delta DynamoDB | Outbound change store derived from IEDS stream events |
65+
| Redis | Runtime cache for permissions, disease mappings, and related config |
66+
| Audit table | Batch-processing control state, deduplication, and status tracking |
67+
68+
## Design Notes
69+
70+
- The filename processor is the batch entry point for files placed in the source bucket.
71+
- The audit table is for deduplication, processing state, and ordering decisions.
72+
- The batch processor filter ensures only one event is processed at a time for a given supplier and vaccine-type combination.
73+
- The supplier metadata FIFO queue preserves ordering before work is dispatched to ECS through EventBridge Pipe.
74+
- ECS is used for record processing because batch row processing can be long-running.
75+
- The record forwarder is the component that applies processed batch changes to IEDS.
76+
- ACK creation is part of the batch lifecycle.

0 commit comments

Comments
 (0)