From 9cbce36bece0c6a903cb8709c049a991fb984f3f Mon Sep 17 00:00:00 2001 From: Adam Waller <176666249+adam-wallernhs1@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:13:17 +0100 Subject: [PATCH 1/4] changing the data and creating config to support the expected responses --- tests/e2e/data/configs/global_config.json | 159 +++++++++++++++++++ tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json | 6 - 2 files changed, 159 insertions(+), 6 deletions(-) create mode 100644 tests/e2e/data/configs/global_config.json diff --git a/tests/e2e/data/configs/global_config.json b/tests/e2e/data/configs/global_config.json new file mode 100644 index 000000000..8c60865b7 --- /dev/null +++ b/tests/e2e/data/configs/global_config.json @@ -0,0 +1,159 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "Automation RSV - Campaign 1", + "Type": "O", + "Target": "RSV", + "Manager": "adam.waller1@nhs.net", + "Approver": "adam.waller1@nhs.net", + "Reviewer": "adam.waller1@nhs.net", + "IterationFrequency": "X", + "IterationType": "A", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACTGP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACTGP", + "Version": 1, + "Name": "Automation RSV - Campaign 1 Iteration 1", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "A", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75_rolling", + "CohortGroupCode": "rsv_age_range", + "CohortGroupDescriptionPositive": "You are currently aged 75 to 79", + "CohortGroupDescriptionNegative": "You are not currently aged 75 to 79", + "Priority": 0 + }, + { + "CohortLabel": "rsv_75to79_2024", + "CohortGroupCode": "rsv_catch_up_age_range", + "CohortGroupDescriptionPositive": "You turned 80 after 1 September 2024, so are eligible for the RSV vaccine until 31 August 2025", + "CohortGroupDescriptionNegative": "You did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroupCode": "elid_all_people", + "CohortGroupDescriptionPositive": "Our records do not say why you are eligible", + "CohortGroupDescriptionNegative": "", + "Priority": 10 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV within the last 25 years from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 110 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80" + }, + { + "Type": "S", + "Name": "Dose Interval - Make NotActionable everyone who has been given a dose of RSV Vaccination in the last 25 years", + "Description": "AlreadyVaccinated|##You've had your RSV vaccination\\nBased on our records, you recently had this vaccination. You do not need to do anything.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Future Booking", + "Description": "AlreadyBooked|You are already Booked.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_DATE", + "Operator": "D>=", + "Comparator": "0" + }, + { + "Type": "R", + "Name": "Future Booking", + "Description": "AlreadyBooked|You are already Booked.", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "BookNBS" + } + ] + } + ], + "AvailableActions": [ + { + "actionType": "ButtonAuthLink", + "actionCode": "BookNBS", + "description": "", + "urlLink": "http://www.nhs.uk/book-rsv", + "urlLabel": "Continue to booking" + }, + { + "actionType": "Link", + "actionCode": "FindWalkin", + "description": "Find a walk-in service for RSV vaccinations", + "urlLink": "www.england.nhs.uk/rsv-east", + "urlLabel": "" + }, + { + "actionType": "InfoText", + "actionCode": "ContactGP", + "description": "Contact your GP surgery to get vaccinated", + "urlLabel": "" + } + ] + } +} diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json index 712cf9439..d2b2ddebc 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json @@ -28,12 +28,6 @@ "13Q_FLAG": "N", "CARE_HOME_FLAG": "N", "DE_FLAG": "N" - }, - { - "NHS_NUMBER": "5000000001", - "ATTRIBUTE_TYPE": "RSV", - "BOOKED_APPOINTMENT_DATE": "<>", - "BOOKED_APPOINTMENT_PROVIDER": "NBS" } ] } From fae2d8d7322b35a63638190fc27da47c8d251c2c Mon Sep 17 00:00:00 2001 From: Adam Waller <176666249+adam-wallernhs1@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:48:55 +0100 Subject: [PATCH 2/4] changing the data and creating config to support the expected responses --- tests/e2e/data/configs/global_config.json | 31 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tests/e2e/data/configs/global_config.json b/tests/e2e/data/configs/global_config.json index 8c60865b7..1286e8e19 100644 --- a/tests/e2e/data/configs/global_config.json +++ b/tests/e2e/data/configs/global_config.json @@ -11,7 +11,7 @@ "IterationFrequency": "X", "IterationType": "A", "IterationTime": "07:00:00", - "DefaultCommsRouting": "CONTACTGP", + "DefaultCommsRouting": "CONTACT_GP", "StartDate": "20250601", "EndDate": "20260601", "ApprovalMinimum": 0, @@ -19,7 +19,7 @@ "Iterations": [ { "ID": ",<>", - "DefaultCommsRouting": "CONTACTGP", + "DefaultCommsRouting": "CONTACT_GP", "Version": 1, "Name": "Automation RSV - Campaign 1 Iteration 1", "IterationDate": "20250601", @@ -128,9 +128,32 @@ "AttributeName": "BOOKED_DATE", "Operator": "D>=", "Comparator": "0", - "CommsRouting": "BookNBS" + "CommsRouting": "AMEND_NBS" } - ] + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "", + "ActionType": "ButtonAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Update or Cancel booking" + }, + "CONTACT_GP": { + "actionType": "InfoText", + "actionCode": "ContactGP", + "description": "Contact your GP surgery to get vaccinated", + "UrlLink": "", + "urlLabel": "" + } + } } ], "AvailableActions": [ From 0d88a304f71da2c504189af836d17d6e18a29bb7 Mon Sep 17 00:00:00 2001 From: Adam Waller <176666249+adam-wallernhs1@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:29:20 +0100 Subject: [PATCH 3/4] updated config and testdata to allign with the correct cohort data structure in dynamo --- tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json | 4 ++- tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json | 17 ++++++++---- tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json | 17 ++++++++---- tests/test_data/test_config/test_config.json | 16 ++++++------ .../test_records/test_cohort_records.json | 26 +++++++++++++++++-- 16 files changed, 191 insertions(+), 76 deletions(-) diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json index d2b2ddebc..457437429 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000001", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000001", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json index bd49f7d82..78026a684 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000002", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000002", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json index 07364dac6..df7ceced6 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000003", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_age_catchup", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75to79_2024": { + "M": { + "dateJoined": { + "S": "20221120" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000003", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json index 0e2734b43..ca15b178e 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000004", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000004", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json index 1f8d11043..a0f76ddd3 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000005", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000005", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json index a68bb1204..728250475 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000006", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000006", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json index 5d0534e29..fc9d4afb0 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000007", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000007", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json index 5f0673c5f..25f7e19fa 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000008", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000008", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json index 3570ac674..753398d0a 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000009", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000009", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json index 55ad46fde..7eb7d0488 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000010", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000010", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json index 621617418..9626840b3 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000011", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000011", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json index dfdda6170..922748b12 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json @@ -4,7 +4,9 @@ { "NHS_NUMBER": "5000000012", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [] + "COHORT_MAP": { + "cohorts": {} + } }, { "NHS_NUMBER": "5000000012", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json index b66f71afe..2381f3b6f 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000013", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "covid_16+_immunosuppression", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "covid_16+_immunosuppression": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "5000000013", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json index c480e69bd..5cd1e21d7 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json +++ b/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json @@ -4,12 +4,19 @@ { "NHS_NUMBER": "5000000014", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "covid_16+_immunosuppression", - "DATE_JOINED": "20250101" + "COHORT_MAP": { + "cohorts": { + "M": { + "covid_16+_immunosuppression": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } } - ] + } }, { "NHS_NUMBER": "50000000014", diff --git a/tests/test_data/test_config/test_config.json b/tests/test_data/test_config/test_config.json index 47cfe4716..54791c33d 100644 --- a/tests/test_data/test_config/test_config.json +++ b/tests/test_data/test_config/test_config.json @@ -4,7 +4,7 @@ "Version": "1", "Name": "Test Config", "Type": "V", - "Target": "COVID", + "Target": "RSV", "Manager": "person@test.com", "Approver": "person@test.com", "Reviewer": "person@test.com", @@ -19,16 +19,16 @@ "IterationCohorts": [ { "CohortLabel": "rsv_75_rolling", - "CohortGroupCode": "rsv_age_range", - "CohortGroupDescriptionPositive": "You are currently aged 75 to 79", - "CohortGroupDescriptionNegative": "You are not currently aged 75 to 79", + "CohortGroup": "rsv_age_range", + "PositiveDescription": "You are currently aged 75 to 79", + "NegativeDescription": "You are not currently aged 75 to 79", "Priority": 0 }, { "CohortLabel": "rsv_75to79_2024", - "CohortGroupCode": "rsv_catch_up_age_range", - "CohortGroupDescriptionPositive": "You turned 80 after 1 September 2024, so are eligible for the RSV vaccine until 31 August 2025", - "CohortGroupDescriptionNegative": "You did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", + "CohortGroup": "rsv_catch_up_age_range", + "PositiveDescription": "You turned 80 after 1 September 2024, so are eligible for the RSV vaccine until 31 August 2025", + "NegativeDescription": "You did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", "Priority": 10 } ], @@ -55,7 +55,7 @@ } ], "StartDate": "20250101", - "EndDate": "20250101", + "EndDate": "20260101", "ApprovalMinimum": 1, "ApprovalMaximum": 5000000 } diff --git a/tests/test_data/test_records/test_cohort_records.json b/tests/test_data/test_records/test_cohort_records.json index cadc04950..14cf2f0ab 100644 --- a/tests/test_data/test_records/test_cohort_records.json +++ b/tests/test_data/test_records/test_cohort_records.json @@ -1,2 +1,24 @@ -{"NHS_NUMBER": "1234567890", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [{"COHORT_LABEL": "under_75", "DATE_JOINED": "2025-01-01"},{"COHORT_LABEL": "over_75", "DATE_JOINED": "2025-01-01"}]} -{"NHS_NUMBER": "2345678901", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [{"COHORT_LABEL": "under_75", "DATE_JOINED": "2025-01-01"},{"COHORT_LABEL": "over_75", "DATE_JOINED": "2025-01-01"}]} +{ + "NHS_NUMBER": "5000000001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + }, + "rsv_75to79_2024": { + "M": { + "dateJoined": { + "S": "20221120" + } + } + } + } + } + } +} From db9c72ee949fea4e858d148ab54c47d2e01ae659 Mon Sep 17 00:00:00 2001 From: Adam Waller <176666249+adam-wallernhs1@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:51:34 +0100 Subject: [PATCH 4/4] updated config and testdata to allign with the correct cohort data structure in dynamo --- tests/test_data/test_config/test_config.json | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_data/test_config/test_config.json b/tests/test_data/test_config/test_config.json index 54791c33d..165660db6 100644 --- a/tests/test_data/test_config/test_config.json +++ b/tests/test_data/test_config/test_config.json @@ -42,6 +42,28 @@ "AttributeName": "DATE_OF_BIRTH", "Operator": "=", "Comparator": "19000101" + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "Already Vaccinated|You have already been Vaccinated", + "Priority": 30, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_75to79_2024", + "Operator": "is_not_null", + "Comparator": "" + }, + { + "Type": "S", + "Name": "In Supressed Cohort", + "Description": "In Supressed Cohort|You Are In Supressed Cohort", + "Priority": 40, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "=", + "Comparator": "rsv_75to79_2024" } ], "Version": "1",