Skip to content

Commit 651616c

Browse files
[PRMP-975] Document Search Results Backend - Pagination (#588)
Co-authored-by: DuncanSangsterNHS <duncan.sangster3@nhs.net>
1 parent 0691246 commit 651616c

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

infrastructure/dynamo_db.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ module "lloyd_george_reference_dynamodb_table" {
9393
{
9494
name = "S3FileKey"
9595
type = "S"
96+
},
97+
{
98+
name = "Created"
99+
type = "S"
96100
}
97101
]
98102

@@ -105,6 +109,7 @@ module "lloyd_george_reference_dynamodb_table" {
105109
{
106110
name = "NhsNumberIndex"
107111
hash_key = "NhsNumber"
112+
range_key = "Created"
108113
projection_type = "ALL"
109114
},
110115
{

infrastructure/lambda-search-doc-references.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ module "search-document-references-lambda" {
7373
http_methods = ["GET"]
7474
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
7575
lambda_environment_variables = {
76-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
77-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
78-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
79-
DYNAMODB_TABLE_LIST = "[\u0022${terraform.workspace}_${var.docstore_dynamodb_table_name}\u0022, \u0022${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}\u0022]"
80-
WORKSPACE = terraform.workspace
76+
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
77+
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
78+
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
79+
LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
80+
WORKSPACE = terraform.workspace
8181
}
8282
depends_on = [
8383
aws_api_gateway_rest_api.ndr_doc_store_api,

infrastructure/lambda-search-document-references-fhir.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ module "search-document-references-fhir-lambda" {
2424
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2525
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
2626
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
27-
DYNAMODB_TABLE_LIST = "[\u0022${module.core_dynamodb_table.table_name}\u0022, \u0022${module.lloyd_george_reference_dynamodb_table.table_name}\u0022]"
2827
DOCUMENT_RETRIEVE_ENDPOINT_APIM = "${local.apim_api_url}/DocumentReference"
2928
WORKSPACE = terraform.workspace
29+
LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
3030
}
3131
depends_on = [
3232
aws_api_gateway_rest_api.ndr_doc_store_api,

0 commit comments

Comments
 (0)