Skip to content

Commit 3bf71d7

Browse files
committed
Merge branch 'main' into feature/CCM-15297_Prevent_MeshDownloader_from_publishing_duplicate_events
2 parents dc787cd + d97dccd commit 3bf71d7

71 files changed

Lines changed: 938 additions & 473 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/architecture/c4/notifhir/reporting/recorder/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ parent: Reporting
55
nav_order: 1
66
has_children: true
77
is_not_draft: false
8-
last_modified_date: 2025-10-24
8+
last_modified_date: 2026-03-26
99
owner: Tom D'Roza
1010
author: Tom D'Roza
11-
diagrams: [c4code-mesh-statusreporter-recorder, sequence-nhsapp-callback]
11+
diagrams: [c4code-mesh-statusreporter-recorder]
1212
events-raised: []
1313
events-consumed: [
1414
mesh-inbox-message-downloaded,

docs/architecture/c4/notifhir/viewer/callback/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ parent: Viewer Services
55
nav_order: 8
66
has_children: true
77
is_not_draft: false
8-
last_modified_date: 2024-05-28
8+
last_modified_date: 2026-03-26
99
owner: Ross Buggins
10-
author: Ross Buggins
11-
diagrams: [c4code-nhsapp-callback, sequence-nhsapp-callback]
10+
author: Tom D'Roza
11+
diagrams: [c4code-nhsapp-status-handler]
1212
events-raised: [viewer-digital-letter-read]
1313
events-consumed: []
1414
c4type: code

docs/collections/_diagrams/c4code-nhsapp-callback.md

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
title: c4code-nhsapp-status-handler
4+
5+
---
6+
7+
```mermaid
8+
architecture-beta
9+
group AppStatusHandler(cloud)[NHSAppStatusHandler]
10+
service optedOutEvent(aws:res-amazon-eventbridge-event)[channel status PUBLISHED v1 Event]
11+
service lambda(logos:aws-lambda)[App Status Handler] in AppStatusHandler
12+
service sqs(logos:aws-sqs)[App Status Queue] in AppStatusHandler
13+
service ddb(aws:arch-amazon-dynamodb)[Items With TTL] in AppStatusHandler
14+
service docReadEvent(aws:res-amazon-eventbridge-event)[DigitalLetterRead Event]
15+
16+
optedOutEvent:R --> L:sqs
17+
sqs:R --> L:lambda
18+
lambda:B --> T:ddb
19+
lambda:R --> L:docReadEvent
20+
```

docs/collections/_diagrams/sequence-nhsapp-callback.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

infrastructure/terraform/components/dl/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ No requirements.
3838
| <a name="input_force_lambda_code_deploy"></a> [force\_lambda\_code\_deploy](#input\_force\_lambda\_code\_deploy) | If the lambda package in s3 has the same commit id tag as the terraform build branch, the lambda will not update automatically. Set to True if making changes to Lambda code from on the same commit for example during development | `bool` | `false` | no |
3939
| <a name="input_group"></a> [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes |
4040
| <a name="input_kms_deletion_window"></a> [kms\_deletion\_window](#input\_kms\_deletion\_window) | When a kms key is deleted, how long should it wait in the pending deletion state? | `string` | `"30"` | no |
41+
| <a name="input_lambda_timeout_seconds"></a> [lambda\_timeout\_seconds](#input\_lambda\_timeout\_seconds) | The timeout of the lambdas that are triggered by SQS. | `string` | `"45"` | no |
4142
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | The log level to be used in lambda functions within the component. Any log with a lower severity than the configured value will not be logged: https://docs.python.org/3/library/logging.html#levels | `string` | `"INFO"` | no |
4243
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events to be retained, default of 0 is indefinite | `number` | `0` | no |
4344
| <a name="input_mesh_poll_schedule"></a> [mesh\_poll\_schedule](#input\_mesh\_poll\_schedule) | Schedule to poll MESH for messages | `string` | `"rate(5 minutes)"` | no |
@@ -55,6 +56,7 @@ No requirements.
5556
| <a name="input_shared_infra_account_id"></a> [shared\_infra\_account\_id](#input\_shared\_infra\_account\_id) | The AWS Shared Infra Account ID (numeric) | `string` | n/a | yes |
5657
| <a name="input_sns_success_logging_sample_percent"></a> [sns\_success\_logging\_sample\_percent](#input\_sns\_success\_logging\_sample\_percent) | Enable SNS Delivery Successful Sample Percentage | `number` | `0` | no |
5758
| <a name="input_sqs_max_receive_count"></a> [sqs\_max\_receive\_count](#input\_sqs\_max\_receive\_count) | Maximum number of times a message can be received before being sent to the DLQ | `string` | `"3"` | no |
59+
| <a name="input_sqs_visibility_timeout_seconds"></a> [sqs\_visibility\_timeout\_seconds](#input\_sqs\_visibility\_timeout\_seconds) | The visibility timeout of the SQS queues. AWS recommends this timeout to be at least 6 times the function timeout (lambda\_timeout\_seconds), see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-lambda-function-trigger.html | `string` | `"270"` | no |
5860
| <a name="input_ttl_poll_schedule"></a> [ttl\_poll\_schedule](#input\_ttl\_poll\_schedule) | Schedule to poll for any overdue TTL records | `string` | `"rate(10 minutes)"` | no |
5961
## Modules
6062

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
code,description
2+
DL_PDMV_001,Letter rejected by PDM
3+
DL_PDMV_002,Timeout waiting for letter storage
4+
DL_CLIV_003,Attachment contains a virus
5+
DL_INTE_001,Request rejected by Core API
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
resource "aws_glue_catalog_table" "failure_code_lookup" {
2+
name = "failure_code_lookup"
3+
description = "Lookup table for failure code descriptions"
4+
database_name = aws_glue_catalog_database.reporting.name
5+
6+
table_type = "EXTERNAL_TABLE"
7+
8+
storage_descriptor {
9+
location = "s3://${module.s3bucket_reporting.bucket}/reference-data/failure_codes/"
10+
11+
input_format = "org.apache.hadoop.mapred.TextInputFormat"
12+
output_format = "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
13+
14+
ser_de_info {
15+
name = "csv"
16+
serialization_library = "org.apache.hadoop.hive.serde2.OpenCSVSerde"
17+
18+
parameters = {
19+
"separatorChar" = ","
20+
"skip.header.line.count" = "1"
21+
}
22+
}
23+
24+
columns {
25+
name = "code"
26+
type = "string"
27+
}
28+
29+
columns {
30+
name = "description"
31+
type = "string"
32+
}
33+
}
34+
35+
parameters = {
36+
EXTERNAL = "TRUE"
37+
classification = "csv"
38+
}
39+
}

infrastructure/terraform/components/dl/module_lambda_apim_refresh_token.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module "lambda_lambda_apim_refresh_token" {
2424
function_include_common = true
2525
handler_function_name = "handler"
2626
runtime = "nodejs22.x"
27-
memory = 128
28-
timeout = 5
27+
memory = 256
28+
timeout = var.lambda_timeout_seconds
2929
log_level = var.log_level
3030
schedule = var.apim_auth_token_schedule
3131

infrastructure/terraform/components/dl/module_lambda_core_notifier.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module "core_notifier" {
2424
function_include_common = true
2525
handler_function_name = "handler"
2626
runtime = "nodejs22.x"
27-
memory = 128
28-
timeout = 60
27+
memory = 256
28+
timeout = var.lambda_timeout_seconds
2929
log_level = var.log_level
3030

3131
force_lambda_code_deploy = var.force_lambda_code_deploy

0 commit comments

Comments
 (0)