diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c18f0bef..643cd94a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,7 +17,7 @@ Add any summary information of what is in the change. **Remove this line if you Pull requests should be named using the following format: ```text -Tag: [AEA-NNNN] - Short description +Tag: [ELI-NNNN] - Short description ``` Tag can be one of: @@ -45,7 +45,7 @@ The description of your pull request will be used as the commit message for the If you need to rename your pull request, you can restart the checks by either: - Closing and reopening the pull request -- pushing an empty commit +- pushing an empty commit ```bash git commit --allow-empty -m 'trigger build' git push diff --git a/.github/workflows/pr-link.yml b/.github/workflows/pr-link.yml index 83dbaf9c..cc52d2d0 100644 --- a/.github/workflows/pr-link.yml +++ b/.github/workflows/pr-link.yml @@ -1,12 +1,16 @@ name: PR Link ticket on: pull_request: - types: [opened] + types: [ opened ] jobs: link-ticket: runs-on: ubuntu-22.04 env: REF: ${{ github.event.pull_request.head.ref }} + permissions: + id-token: write + pull-requests: write + issues: write steps: - name: Check ticket name conforms to requirements run: echo "$REF" | grep -i -E -q "(eli-[0-9]+)|(dependabot\/)" @@ -31,10 +35,13 @@ jobs: - name: Comment on PR with link to JIRA ticket if: contains(github.event.pull_request.head.ref, 'eli-') continue-on-error: true - uses: unsplash/comment-on-pr@b5610c6125a7197eaec80072ea35ef53e1fc6035 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: actions/github-script@v8 with: - msg: | - This branch is work on a ticket in an NHS England JIRA Project. Here's a handy link to the ticket: - # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }}) + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `This branch is work on a ticket in an NHS England JIRA Project. Here is a handy link to the ticket: + [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})` + }) diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 0c3febbc..cb6a912b 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -12,23 +12,27 @@ on: type: environment required: true default: "dev" + log_level: + description: 'Log level to output to console' + type: choice + options: ["INFO", "DEBUG"] + required: false + default: "INFO" id: description: 'Unique run identifier (Do not change this)' - required: false + required: true default: "Manually Triggered Run" - pull_request_id: - description: 'The ID of the pull request. This should be in the format pr-xxxx where xxxx is the pull request id' - required: false - default: "" github_tag: description: 'The github tag to run the test pack from' - required: false + required: true default: "main" jobs: regression_tests: permissions: id-token: write + issues: write + pull-requests: write runs-on: ubuntu-22.04 environment: ${{ inputs.environment }} steps: @@ -36,31 +40,30 @@ jobs: env: tags: ${{ inputs.tags }} environment: ${{ inputs.environment }} + log_level: ${{ inputs.log_level }} id: ${{ inputs.id }} - pull_request_id: ${{ inputs.pull_request_id }} github_tag: ${{ inputs.github_tag }} run: | echo "tags: ${tags}" echo "environment: ${environment}" + echo "log_level: ${log_level}" echo "id: ${id}" - echo "pull_request_id: ${pull_request_id}" echo "github_tag: ${github_tag}" # output to summary # shellcheck disable=SC2129 echo "tags: ${tags}" >> "$GITHUB_STEP_SUMMARY" echo "environment: ${environment}" >> "$GITHUB_STEP_SUMMARY" + echo "log_level: ${log_level}" >> "$GITHUB_STEP_SUMMARY" echo "id: ${id}" >> "$GITHUB_STEP_SUMMARY" - echo "pull_request_id: ${pull_request_id}" >> "$GITHUB_STEP_SUMMARY" echo "github_tag: ${github_tag}" >> "$GITHUB_STEP_SUMMARY" - name: ${{github.event.inputs.id}} env: ID: ${{github.event.inputs.id}} ENV: ${{ inputs.environment }} - PULL_REQUEST_ID: ${{ inputs.pull_request_id }} run: | - echo run identifier "$ID"-"$ENV"-"$PULL_REQUEST_ID" - echo run identifier "$ID"-"$ENV"-"$PULL_REQUEST_ID" >> "$GITHUB_STEP_SUMMARY" + echo run identifier "$ID"-"$ENV" + echo run identifier "$ID"-"$ENV" >> "$GITHUB_STEP_SUMMARY" - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 @@ -98,18 +101,17 @@ jobs: if: steps.cache-venv.outputs.cache-hit != 'true' run: make install + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v5.0.0 + with: + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/Eligibility-Signposting-API-E2E-Regression-Tests + aws-region: eu-west-2 + - name: Regression Tests id: tests - continue-on-error: true env: ENVIRONMENT: ${{ inputs.environment }} - PULL_REQUEST_ID: ${{ inputs.pull_request_id }} + LOG_LEVEL: ${{ inputs.log_level }} INPUT_TAG: ${{ inputs.tags }} - run: echo Coming Soon! -# run: make run-tests - - - name: force error on failure - if: steps.tests.outcome != 'success' run: | - echo The regression tests step failed, this likely means there are test failures. - exit 1 + make run-tests env="$ENVIRONMENT" log_level="$LOG_LEVEL" diff --git a/.gitignore b/.gitignore index bee820c1..e5ae5a8a 100644 --- a/.gitignore +++ b/.gitignore @@ -254,3 +254,4 @@ vscode # Node Modules node_modules +/certs/ diff --git a/.tool-versions b/.tool-versions index f9ebb4fb..357623e0 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,5 +1,5 @@ python 3.13.5 -poetry 2.1.4 +poetry 2.2.0 shellcheck 0.11.0 actionlint 1.7.7 nodejs 22.18.0 diff --git a/Makefile b/Makefile index 1864ce12..9f1e2ea5 100644 --- a/Makefile +++ b/Makefile @@ -76,5 +76,7 @@ deep-clean-install: pre-commit: poetry run pre-commit run --all-files -run-tests: - poetry run pytest +run-tests: guard-env guard-log_level + poetry run pytest --env=${env} --log-cli-level=${log_level} -s tests/test_story_tests.py + poetry run pytest --env=${env} --log-cli-level=${log_level} -s tests/test_error_scenario_tests.py + poetry run pytest --env=${env} --log-cli-level=${log_level} -s tests/test_vita_integration_tests.py diff --git a/data/configs/inProgressTestConfigs/440/AUTO_RSV_ELI-440-04.json b/data/configs/inProgressTestConfigs/440/AUTO_RSV_ELI-440-04.json new file mode 100644 index 00000000..06bbdea5 --- /dev/null +++ b/data/configs/inProgressTestConfigs/440/AUTO_RSV_ELI-440-04.json @@ -0,0 +1,94 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-440-04-Campaign-ID", + "Version": 1, + "Name": "ELI-440-04-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-440-04-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-440-04-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "elid_virtual_cohort", + "CohortGroup": "elid_virtual_cohort", + "PositiveDescription": "In elid_virtual_cohort", + "NegativeDescription": "Out elid_virtual_cohort", + "Priority": 1, + "Virtual": "Y" + }, + { + "CohortLabel": "rsv_eli_440_cohort_999", + "CohortGroup": "rsv_eli_440_cohort_999", + "PositiveDescription": "In rsv_eli_440_cohort_999", + "NegativeDescription": "Out rsv_eli_440_cohort_999", + "Priority": 2 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Filter based on cohort membership", + "Description": "Filter based on cohort membership", + "Priority": 100, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "in", + "Comparator": "elid_virtual_cohort" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "TestNotEliAction", + "UrlLink": "https://www.noteligible.com/440", + "UrlLabel": "not_eli_UrlLabel" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json index 7a9f6b9d..e1cee202 100644 --- a/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json @@ -56,7 +56,8 @@ "CohortGroup": "magic_cohort", "PositiveDescription": "", "NegativeDescription": "", - "Priority": 20 + "Priority": 20, + "Virtual": "Y" } ], "IterationRules": [ diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-01.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-01.json new file mode 100644 index 00000000..f6b25d52 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-01.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-01-Campaign-ID", + "Version": 1, + "Name": "ELI-223-01-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-01-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-01-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-02.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-02.json new file mode 100644 index 00000000..14d81b3f --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-02.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-02-Campaign-ID", + "Version": 1, + "Name": "ELI-223-02-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-02-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-02-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]] and a COVID vaccination on [[TARGET.COVID.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]].You also have a Flu Vaccination Booking on [[TARGET.FLU.BOOKED_APPOINTMENT_DATE:DATE(%Y/%m/%d)]] and your date of birth is [[PERSON.DATE_OF_BIRTH]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "ActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "ActionDescription ICB: [[PERSON.ICB]]", + "ActionType": "ActionType PCN: [[PERSON.PCN]]", + "UrlLink": null, + "UrlLabel": "urlLabel MSOA: [[PERSON.MSOA]]" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-03.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-03.json new file mode 100644 index 00000000..0a6c4a3e --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-03.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-03-Campaign-ID", + "Version": 1, + "Name": "ELI-223-03-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-03-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-03-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]] and a COVID vaccination on [[TARGET.COVID.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]].You also have a Flu Vaccination Booking on [[TARGET.FLU.BOOKED_APPOINTMENT_DATE:DATE(%Y/%m/%d)]] and your date of birth is [[PERSON.DATE_OF_BIRTHS]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "ActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "ActionDescription ICB: [[PERSON.ICB]]", + "ActionType": "ActionType PCN: [[PERSON.PCN]]", + "UrlLink": null, + "UrlLabel": "urlLabel MSOA: [[PERSON.MSOA]]" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-04.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-04.json new file mode 100644 index 00000000..ca197f9a --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-04.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-04-Campaign-ID", + "Version": 1, + "Name": "ELI-223-04-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-04-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-04-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]].You also have a Flu Vaccination Booking on [[TARGET.FLU.BOOKED_APPOINTMENT_DATE:DATE(%Y/%m/%d)]] and your ICB is [[PERSON.ICB]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "ActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "ActionDescription ICB: [[PERSON.ICB]]", + "ActionType": "ActionType PCN: [[PERSON.PCN]]", + "UrlLink": null, + "UrlLabel": "urlLabel MSOA: [[PERSON.MSOA]]" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-05.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-05.json new file mode 100644 index 00000000..7ed59ffe --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-05.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-05-Campaign-ID", + "Version": 1, + "Name": "ELI-223-05-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-05-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-05-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%A, (%d) %B %Y)]].", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-06.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-06.json new file mode 100644 index 00000000..53a96572 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-06.json @@ -0,0 +1,100 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-06-Campaign-ID", + "Version": 1, + "Name": "ELI-223-06-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-06-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-06-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated and Booked", + "Description": "## 1You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]] and are booked on [[TARGET.RSV.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Already Vaccinated and Booked", + "Description": "## 2You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]] and are booked on [[TARGET.RSV.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-07.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-07.json new file mode 100644 index 00000000..3c461ea3 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-07.json @@ -0,0 +1,100 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-07-Campaign-ID", + "Version": 1, + "Name": "ELI-223-07-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-07-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-07-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "N" + }, + { + "Type": "S", + "Name": "Already Booked", + "Description": "## You have a COVID vaccination booking on [[TARGET.COVID.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 210, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-08.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-08.json new file mode 100644 index 00000000..1ec4154b --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-08.json @@ -0,0 +1,100 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-08-Campaign-ID", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-08-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "N" + }, + { + "Type": "S", + "Name": "Already Booked", + "Description": "## You have a COVID vaccination booking on [[TARGET.COVID.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 210, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEligible", + "ActionDescription": "## You are not eligible as your dob is [[PERSON.DATE_OF_BIRTH:DATE(%d %B %Y)]].", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "You're not Eligible" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-09.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-09.json new file mode 100644 index 00000000..1a0de384 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-09.json @@ -0,0 +1,314 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-08-Campaign-ID", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-08-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Target Substitution LAST_SUCCESSFUL_DATE", + "Description": "Target Substitution LAST_SUCCESSFUL_DATE [[tARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]", + "Priority": 1, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution BOOKED_APPOINTMENT_DATE", + "Description": "Target Substitution BOOKED_APPOINTMENT_DATE [[TARGET.cOVID.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 2, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution BOOKED_APPOINTMENT_PROVIDER", + "Description": "Target Substitution BOOKED_APPOINTMENT_PROVIDER [[TARGET.RSV.bOOKED_APPOINTMENT_PROVIDER]]", + "Priority": 3, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution INVALID_DOSES_COUNT", + "Description": "Target Substitution INVALID_DOSES_COUNT [[TARGET.COVID.INVALID_DOSES_COUNT]]", + "Priority": 4, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "INVALID_DOSES_COUNT", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution LAST_INVITE_DATE", + "Description": "Target Substitution LAST_INVITE_DATE [[TARGET.RSV.LAST_INVITE_DATE:dATE(%d %B %Y)]]", + "Priority": 5, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_INVITE_DATE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution LAST_INVITE_STATUS", + "Description": "Target Substitution LAST_INVITE_STATUS [[TARGET.COVID.LAST_INVITE_STATUS]]", + "Priority": 6, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "LAST_INVITE_STATUS", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution LAST_VALID_DOSE_DATE", + "Description": "Target Substitution LAST_VALID_DOSE_DATE [[TARGET.RSV.LAST_VALID_DOSE_DATE]]", + "Priority": 7, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_VALID_DOSE_DATE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Target Substitution VALID_DOSES_COUNT", + "Description": "Target Substitution VALID_DOSES_COUNT [[TARGET.COVID.VALID_DOSES_COUNT]]", + "Priority": 8, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "VALID_DOSES_COUNT", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution DATE_OF_BIRTH", + "Description": "Target Substitution DATE_OF_BIRTH [[pERSON.DATE_OF_BIRTH:DATE(%d %B %Y)]]", + "Priority": 9, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution GENDER", + "Description": "Target Substitution GENDER [[PERSON.GENDER]]", + "Priority": 10, + "AttributeLevel": "PERSON", + "AttributeName": "GENDER", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution POSTCODE", + "Description": "Target Substitution POSTCODE [[PERSON.pOSTCODE]]", + "Priority": 11, + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution POSTCODE_SECTOR", + "Description": "Target Substitution POSTCODE_SECTOR [[PERSON.POSTCODE_SECTOR]]", + "Priority": 12, + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_SECTOR", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution POSTCODE_OUTCODE", + "Description": "Target Substitution POSTCODE_OUTCODE [[PERSON.POSTCODE_OUTCODE]]", + "Priority": 13, + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_OUTCODE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution MSOA", + "Description": "Target Substitution MSOA [[PERSON.MSOA]]", + "Priority": 14, + "AttributeLevel": "PERSON", + "AttributeName": "MSOA", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution LSOA", + "Description": "Target Substitution LSOA [[PERSON.LSOA]]", + "Priority": 15, + "AttributeLevel": "PERSON", + "AttributeName": "LSOA", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution LOCAL_AUTHORITY", + "Description": "Target Substitution LOCAL_AUTHORITY [[PERSON.LOCAL_AUTHORITY]]", + "Priority": 16, + "AttributeLevel": "PERSON", + "AttributeName": "LOCAL_AUTHORITY", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution GP_PRACTICE_CODE", + "Description": "Target Substitution GP_PRACTICE_CODE [[PERSON.GP_PRACTICE_CODE]]", + "Priority": 17, + "AttributeLevel": "PERSON", + "AttributeName": "GP_PRACTICE_CODE", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution PCN", + "Description": "Target Substitution PCN [[PERSON.PCN]]", + "Priority": 18, + "AttributeLevel": "PERSON", + "AttributeName": "PCN", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution ICB", + "Description": "Target Substitution ICB [[PERSON.ICB]]", + "Priority": 19, + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution COMMISSIONING_REGION", + "Description": "Target Substitution COMMISSIONING_REGION [[PERSON.COMMISSIONING_REGION]]", + "Priority": 20, + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution 13Q_FLAG", + "Description": "Target Substitution 13Q_FLAG [[PERSON.13Q_FLAG]]", + "Priority": 21, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution CARE_HOME_FLAG", + "Description": "Target Substitution CARE_HOME_FLAG [[PERSON.CARE_HOME_FLAG]]", + "Priority": 22, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "is_not_empty", + "Comparator": "" + }, + { + "Type": "S", + "Name": "Person Substitution DE_FLAG", + "Description": "Target Substitution DE_FLAG [[PERSON.DE_FLAG]]", + "Priority": 23, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "is_not_empty", + "Comparator": "" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEligible", + "ActionDescription": "## You are not eligible as your dob is [[PERSON.DATE_OF_BIRTH]].", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "You're not Eligible" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-10.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-10.json new file mode 100644 index 00000000..0102b2f2 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-10.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-10-Campaign-ID", + "Version": 1, + "Name": "ELI-223-10-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-10-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-10-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:LOOKUP(%X %Y %Z)]].", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "TestActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-11.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-11.json new file mode 100644 index 00000000..2af5d692 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-11.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-08-Campaign-ID", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-08-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-08-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Booked", + "Description": "## You have a COVID vaccination booking on [[TARGET.COVID.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "Priority": 210, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_empty", + "Comparator": "", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionable", + "ActionDescription": "## You are actionable as your dob is [[PERSON.DATE_OF_BIRTH:DATE(%d %B %Y)]].", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "You're actionable" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEligible", + "ActionDescription": "## You are not eligible as your dob is [[PERSON.DATE_OF_BIRTH:DATE(%d %B %Y)]].", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "You're not Eligible" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-12.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-12.json new file mode 100644 index 00000000..9d05cc77 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-223-12.json @@ -0,0 +1,88 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-223-12-Campaign-ID", + "Version": 1, + "Name": "ELI-223-12-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-223-12-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-223-12-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_223_cohort_1", + "CohortGroup": "rsv_eli_223_cohort_group", + "PositiveDescription": "are a member of eli_223_cohort_group", + "NegativeDescription": "are not a member of eli_223_cohort_group", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "We believe you had the RSV vaccination on [[PERSON.POSTCODE:DATE(%d %B %Y)]]", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestActionDefault", + "ActionDescription": "ActionDefault Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "TestActionDefault" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "ActionDescription ICB: [[PERSON.ICB]]", + "ActionType": "ActionType PCN: [[PERSON.PCN]]", + "UrlLink": null, + "UrlLabel": "urlLabel MSOA: [[PERSON.MSOA]]" + }, + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "## You have an RSV vaccination appointment\n You can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json index 8b714875..70066de8 100644 --- a/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json @@ -56,7 +56,8 @@ "CohortGroup": "magic_cohort", "PositiveDescription": "", "NegativeDescription": "", - "Priority": 20 + "Priority": 20, + "Virtual": "Y" } ], "IterationRules": [ diff --git a/data/configs/inProgressTestConfigs/AUTO_RSV_ELI-371.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-371.json similarity index 98% rename from data/configs/inProgressTestConfigs/AUTO_RSV_ELI-371.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-371.json index fb60fdf4..2ee01057 100644 --- a/data/configs/inProgressTestConfigs/AUTO_RSV_ELI-371.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-371.json @@ -78,13 +78,13 @@ { "Type": "S", "Name": "This is a rule on it's own and not part of the AND rules above", - "Description": "Testing of AND rules where names are different", + "Description": "This is a rule on it's own", "Operator": "=", "Comparator": "19820501", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", "CohortLabel": "rsv_75to79", - "Priority": 1000 + "Priority": 999 }, { "Type": "R", diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-01.json similarity index 63% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-405-01.json index d6516c20..d3d58aa6 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-01.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-01-Campaign-ID", + "ID": "AUTO_RSV_ELI-405-01-Campaign-ID", "Version": 1, - "Name": "ELI-376-01-Iteration-Config-Name", + "Name": "ELI-405-01-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -24,12 +24,12 @@ "DefaultCommsRouting": "BOOK_NBS", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-01-Iteration-ID", + "ID": "AUTO_RSV_ELI-405-01-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-01-Iteration-Config-Name", + "Name": "ELI-405-01-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", @@ -38,31 +38,31 @@ "Type": "O", "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", "Priority": 0 }, { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", "Priority": 10 }, { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", + "CohortLabel": "rsv_eli_405_cohort_3", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_20", + "NegativeDescription": "are not a member of eli_405_cohort_group_20", "Priority": 20 }, { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", + "CohortLabel": "rsv_eli_405_cohort_4", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", "Priority": 30 } ], @@ -75,7 +75,7 @@ "Comparator": "-80", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 100 }, { @@ -86,7 +86,18 @@ "Comparator": "-75", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_1", + "Priority": 200 + }, + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "NotActionable Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 200 } ], diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-02.json similarity index 56% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-405-02.json index 1b4aa219..54bb9530 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-02.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-03-Campaign-ID", + "ID": "AUTO_RSV_ELI-405-02-Campaign-ID", "Version": 1, - "Name": "ELI-376-03-Iteration-Config-Name", + "Name": "ELI-405-02-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -21,15 +21,15 @@ "EndDate": "20350717", "ApprovalMinimum": 0, "ApprovalMaximum": 0, - "DefaultCommsRouting": "BOOK_NBS", + "DefaultCommsRouting": "", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-03-Iteration-ID", + "ID": "AUTO_RSV_ELI-405-02-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-03-Iteration-Config-Name", + "Name": "ELI-405-04-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", @@ -38,31 +38,31 @@ "Type": "O", "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", "Priority": 0 }, { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", "Priority": 10 }, { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", + "CohortLabel": "rsv_eli_405_cohort_3", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_20", + "NegativeDescription": "are not a member of eli_405_cohort_group_20", "Priority": 20 }, { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", + "CohortLabel": "rsv_eli_405_cohort_4", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", "Priority": 30 } ], @@ -75,18 +75,41 @@ "Comparator": "-80", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_4", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 100 }, + { + "Type": "F", + "Name": "NotEligible Reason 2", + "Description": "NotEligible Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_405_cohort_4", + "Priority": 110 + }, { "Type": "S", "Name": "NotActionable Reason 1", "Description": "NotActionable Description 1", + "Operator": "Y<=", + "Comparator": "-800", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_405_cohort_1", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason 2", + "Description": "NotActionable Description 2", "Operator": "=", - "Comparator": "ABC", + "Comparator": "ABCD", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "Priority": 200 + "CohortLabel": "rsv_eli_405_cohort_4", + "Priority": 110 } ], "ActionsMapper": { diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-03.json similarity index 68% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-405-03.json index c2f3b6d6..05f9a70e 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-03.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-10-Campaign-ID", + "ID": "AUTO_RSV_ELI-405-03-Campaign-ID", "Version": 1, - "Name": "ELI-376-10-Iteration-Config-Name", + "Name": "ELI-405-03-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -24,12 +24,12 @@ "DefaultCommsRouting": "BOOK_NBS", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-10-Iteration-ID", + "ID": "AUTO_RSV_ELI-405-03-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-05-Iteration-Config-Name", + "Name": "ELI-405-03-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", @@ -38,31 +38,24 @@ "Type": "O", "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", "Priority": 0 }, { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", "Priority": 10 }, { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", - "Priority": 20 - }, - { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", + "CohortLabel": "rsv_eli_405_cohort_4", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", "Priority": 30 } ], @@ -72,10 +65,10 @@ "Name": "NotEligible Reason 1", "Description": "NotEligible Description 1", "Operator": "Y<=", - "Comparator": "-80", + "Comparator": "-800", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 100 }, { @@ -83,10 +76,10 @@ "Name": "NotEligible Reason 2", "Description": "NotEligible Description 2", "Operator": "=", - "Comparator": "ABC", + "Comparator": "ABCD", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "CohortLabel": "rsv_eli_376_cohort_2", + "CohortLabel": "rsv_eli_405_cohort_2", "Priority": 110 }, { @@ -97,7 +90,7 @@ "Comparator": "-80", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_3", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 200 }, { @@ -108,7 +101,7 @@ "Comparator": "ABC", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "CohortLabel": "rsv_eli_376_cohort_4", + "CohortLabel": "rsv_eli_405_cohort_2", "Priority": 210 } ], diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-04.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-04.json new file mode 100644 index 00000000..a3758999 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-04.json @@ -0,0 +1,148 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-405-04-Campaign-ID", + "Version": 1, + "Name": "ELI-405-04-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-405-04-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-405-04-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_405_cohort_3", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_20", + "NegativeDescription": "are not a member of eli_405_cohort_group_20", + "Priority": 20 + }, + { + "CohortLabel": "rsv_eli_405_cohort_4", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", + "Priority": 30 + }, + { + "CohortLabel": "rsv_eli_405_cohort_5", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", + "Priority": 40 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_405_cohort_1", + "Priority": 100 + }, + { + "Type": "F", + "Name": "NotEligible Reason 2", + "Description": "NotEligible Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_405_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "NotActionable Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_405_cohort_3", + "Priority": 200 + }, + { + "Type": "S", + "Name": "NotActionable Reason 2", + "Description": "NotActionable Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_405_cohort_4", + "Priority": 210 + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-05.json similarity index 64% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-405-05.json index cccccc45..43285c8d 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-05.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-05-Campaign-ID", + "ID": "AUTO_RSV_ELI-405-05-Campaign-ID", "Version": 1, - "Name": "ELI-376-05-Iteration-Config-Name", + "Name": "ELI-405-05-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -24,12 +24,12 @@ "DefaultCommsRouting": "BOOK_NBS", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-05-Iteration-ID", + "ID": "AUTO_RSV_ELI-405-05-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-05-Iteration-Config-Name", + "Name": "ELI-405-05-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", @@ -38,31 +38,31 @@ "Type": "O", "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", "Priority": 0 }, { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", "Priority": 10 }, { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", + "CohortLabel": "rsv_eli_405_cohort_3", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_20", + "NegativeDescription": "are not a member of eli_405_cohort_group_20", "Priority": 20 }, { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", + "CohortLabel": "rsv_eli_405_cohort_4", + "CohortGroup": "rsv_eli_405_cohort_group_other", + "PositiveDescription": "are a member of eli_405_cohort_group_other", + "NegativeDescription": "are not a member of eli_405_cohort_group_other", "Priority": 30 } ], @@ -75,7 +75,7 @@ "Comparator": "-80", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "Cohort_label": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 100 }, { @@ -86,31 +86,9 @@ "Comparator": "ABC", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "Cohort_label": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_2", "Priority": 110 }, - { - "Type": "F", - "Name": "NotEligible Reason 3", - "Description": "NotEligible Description 3", - "Operator": "=", - "Comparator": "E02003792", - "AttributeLevel": "PERSON", - "AttributeName": "MSOA", - "Cohort_label": "rsv_eli_376_cohort_3", - "Priority": 120 - }, - { - "Type": "F", - "Name": "NotEligible Reason 4", - "Description": "NotEligible Description 4", - "Operator": "=", - "Comparator": "E01018267", - "AttributeLevel": "PERSON", - "AttributeName": "LSOA", - "Cohort_label": "rsv_eli_376_cohort_4", - "Priority": 130 - }, { "Type": "S", "Name": "NotActionable Reason 1", @@ -129,7 +107,19 @@ "Comparator": "ABC", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "Priority": 210 + "Priority": 210, + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason 3", + "Description": "NotActionable Description 3", + "Operator": "=", + "Comparator": "U75549", + "AttributeLevel": "PERSON", + "AttributeName": "PCN", + "CohortLabel": "rsv_eli_405_cohort_4", + "Priority": 220 } ], "ActionsMapper": { diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-06.json similarity index 64% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-405-06.json index 99ed0279..8476e234 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-405-06.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-04-Campaign-ID", + "ID": "AUTO_RSV_ELI-405-06-Campaign-ID", "Version": 1, - "Name": "ELI-376-04-Iteration-Config-Name", + "Name": "ELI-405-06-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -24,12 +24,12 @@ "DefaultCommsRouting": "", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-04-Iteration-ID", + "ID": "AUTO_RSV_ELI-405-06-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-04-Iteration-Config-Name", + "Name": "ELI-405-04-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", @@ -38,32 +38,18 @@ "Type": "O", "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", + "CohortLabel": "rsv_eli_405_cohort_1", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_0", + "NegativeDescription": "are not a member of eli_405_cohort_group_0", "Priority": 0 }, { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", + "CohortLabel": "rsv_eli_405_cohort_2", + "CohortGroup": "rsv_eli_405_cohort_group", + "PositiveDescription": "are a member of eli_405_cohort_group_10", + "NegativeDescription": "are not a member of eli_405_cohort_group_10", "Priority": 10 - }, - { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", - "Priority": 20 - }, - { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", - "Priority": 30 } ], "IterationRules": [ @@ -75,7 +61,7 @@ "Comparator": "-80", "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_1", + "CohortLabel": "rsv_eli_405_cohort_1", "Priority": 100 }, { @@ -86,7 +72,7 @@ "Comparator": "ABC", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "CohortLabel": "rsv_eli_376_cohort_4", + "CohortLabel": "rsv_eli_405_cohort_2", "Priority": 110 } ], diff --git a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-427-01-3.json similarity index 52% rename from data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json rename to data/configs/storyTestConfigs/AUTO_RSV_ELI-427-01-3.json index a6ee1a28..6c85268b 100644 --- a/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-427-01-3.json @@ -1,8 +1,8 @@ { "CampaignConfig": { - "ID": "AUTO_RSV_ELI-376-02-Campaign-ID", + "ID": "AUTO_RSV_ELI-427-01-3-Campaign-ID", "Version": 1, - "Name": "ELI-376-02-Iteration-Config-Name", + "Name": "ELI-427-01-3-Iteration-Config-Name", "Type": "V", "Target": "RSV", "Manager": [ @@ -21,72 +21,66 @@ "EndDate": "20350717", "ApprovalMinimum": 0, "ApprovalMaximum": 0, - "DefaultCommsRouting": "BOOK_NBS", + "DefaultCommsRouting": "TEST_ACTION", "Iterations": [ { - "ID": "AUTO_RSV_ELI-376-02-Iteration-ID", + "ID": "AUTO_RSV_ELI-427-01-3-Iteration-ID", "DefaultCommsRouting": "TEST_ACTION", "DefaultNotActionableRouting": "TEST_NOT_ACTION", "DefaultNotEligibleRouting": "TEST_NOT_ELI", "Version": 1, - "Name": "ELI-376-02-Iteration-Config-Name", + "Name": "ELI-427-01-3-Iteration-Config-Name", "IterationDate": "20240808", "IterationNumber": 1, "CommsType": "I", "ApprovalMinimum": 0, "ApprovalMaximum": 0, "Type": "O", + "StatusText": { + "Actionable": "CUSTOM1 - You should have the RSV Vaccine and you have an appointment on [[TARGET.RSV.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]", + "NotActionable": "CUSTOM2 - You had the RSV Vaccine on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]", + "NotEligible": "CUSTOM3 - We do not believe you should have it as you were born on [[TARGET.PERSON.DATE_OF_BIRTH]] and your postcode is [[TARGET.PERSON.POSTCODE]]" + }, "IterationCohorts": [ { - "CohortLabel": "rsv_eli_376_cohort_1", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_0", - "NegativeDescription": "are not a member of eli_376_cohort_group_0", - "Priority": 0 - }, - { - "CohortLabel": "rsv_eli_376_cohort_2", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_10", - "NegativeDescription": "are not a member of eli_376_cohort_group_10", - "Priority": 10 - }, - { - "CohortLabel": "rsv_eli_376_cohort_3", - "CohortGroup": "rsv_eli_376_cohort_group", - "PositiveDescription": "are a member of eli_376_cohort_group_20", - "NegativeDescription": "are not a member of eli_376_cohort_group_20", - "Priority": 20 - }, - { - "CohortLabel": "rsv_eli_376_cohort_4", - "CohortGroup": "rsv_eli_376_cohort_group_other", - "PositiveDescription": "are a member of eli_376_cohort_group_other", - "NegativeDescription": "are not a member of eli_376_cohort_group_other", - "Priority": 30 + "CohortLabel": "eli_427_cohort_1", + "CohortGroup": "eli_427_cohort_group_1", + "PositiveDescription": "In eli_427_cohort_1", + "NegativeDescription": "Not in eli_427_cohort_1", + "Priority": 1 } ], "IterationRules": [ { "Type": "F", - "Name": "NotEligible Reason 1", - "Description": "NotEligible Description 1", - "Operator": "Y<=", - "Comparator": "-80", + "Name": "Remove under 74 Years on day of execution", + "Description": "Filter out anyone who is not 74 years old.", + "Priority": 100, "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "Priority": 100 + "Operator": "Y>", + "Comparator": "-74" }, { - "Type": "S", - "Name": "NotActionable Reason 1", - "Description": "NotActionable Description 1", - "Operator": "Y>", - "Comparator": "-75", + "Type": "F", + "Name": "Remove under 75 Years on day of execution", + "Description": "Filter out anyone who is not 74 years old.", + "Priority": 101, "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "CohortLabel": "rsv_eli_376_cohort_1", - "Priority": 200 + "Operator": "Y<", + "Comparator": "-74" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "" } ], "ActionsMapper": { diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-427-04-6.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-427-04-6.json new file mode 100644 index 00000000..e3fe6b44 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-427-04-6.json @@ -0,0 +1,110 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-427-04-Campaign-ID", + "Version": 1, + "Name": "ELI-427-04-Iteration-Config-Name", + "Type": "V", + "Target": "FLU", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "TEST_ACTION", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-427-04-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-427-04-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "StatusText": { + "Actionable": "" + }, + "IterationCohorts": [ + { + "CohortLabel": "eli_427_cohort_1", + "CohortGroup": "eli_427_cohort_group_1", + "PositiveDescription": "In eli_427_cohort_1", + "NegativeDescription": "Not in eli_427_cohort_1", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove under 74 Years on day of execution", + "Description": "Filter out anyone who is not 74 years old.", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-74" + }, + { + "Type": "F", + "Name": "Remove under 75 Years on day of execution", + "Description": "Filter out anyone who is not 74 years old.", + "Priority": 101, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-74" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-01.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-01.json new file mode 100644 index 00000000..1870bb32 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-01.json @@ -0,0 +1,141 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-440-01-Campaign-ID", + "Version": 1, + "Name": "ELI-440-01-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-440-01-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-440-01-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "In elid_all_people", + "NegativeDescription": "Not in elid_all_people", + "Priority": 1 + }, + { + "CohortLabel": "elid_virtual_cohort_missing_attribute", + "CohortGroup": "elid_virtual_cohort_missing_attribute", + "PositiveDescription": "In elid_virtual_cohort_missing_attribute", + "NegativeDescription": "Out elid_virtual_cohort_missing_attribute", + "Priority": 2, + "Virtual": "N" + }, + { + "CohortLabel": "elid_virtual_cohort", + "CohortGroup": "elid_virtual_cohort", + "PositiveDescription": "In elid_virtual_cohort", + "NegativeDescription": "Out elid_virtual_cohort", + "Priority": 3, + "Virtual": "Y" + }, + { + "CohortLabel": "elid_virtual_cohort_2", + "CohortGroup": "elid_virtual_cohort", + "PositiveDescription": "In elid_virtual_cohort", + "NegativeDescription": "Out elid_virtual_cohort", + "Priority": 4, + "Virtual": "Y" + }, + { + "CohortLabel": "elid_virtual_cohort_3", + "CohortGroup": "elid_virtual_cohort_3", + "PositiveDescription": "In elid_virtual_cohort_3", + "NegativeDescription": "Out elid_virtual_cohort_3", + "Priority": 5, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove under 74 Years on day of execution", + "Description": "Filter out anyone from the virtual cohort who is not 74 years old.", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-74", + "CohortLabel": "elid_virtual_cohort" + }, + { + "Type": "F", + "Name": "Remove under 75 Years on day of execution", + "Description": "Filter out anyone from the virtual cohort who is not 74 years old.", + "Priority": 101, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-74", + "CohortLabel": "elid_virtual_cohort" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-02-3.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-02-3.json new file mode 100644 index 00000000..5128692e --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-02-3.json @@ -0,0 +1,143 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-440-02-3-Campaign-ID", + "Version": 1, + "Name": "ELI-440-02-3-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-440-02-3-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-440-02-3-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "elid_virtual_cohort", + "CohortGroup": "elid_virtual_cohort", + "PositiveDescription": "In elid_virtual_cohort", + "NegativeDescription": "Out elid_virtual_cohort", + "Priority": 1, + "Virtual": "Y" + }, + { + "CohortLabel": "elid_virtual_cohort_2", + "CohortGroup": "elid_virtual_cohort_2", + "PositiveDescription": "In elid_virtual_cohort_2", + "NegativeDescription": "Out elid_virtual_cohort_2", + "Priority": 2, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove under 74 Years on day of execution from first virtual cohort", + "Description": "Filter out anyone from the virtual cohort who is not 74 years old.", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-74", + "CohortLabel": "elid_virtual_cohort" + }, + { + "Type": "F", + "Name": "Remove over 74 Years on day of execution from first virtual cohort", + "Description": "Filter out anyone from the virtual cohort who is not 74 years old.", + "Priority": 101, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-74", + "CohortLabel": "elid_virtual_cohort" + }, + { + "Type": "F", + "Name": "Remove 75 Years on day of execution from second virtual cohort", + "Description": "Filter out anyone from the virtual cohort who is exactly 75 years old from second virtual cohort.", + "Priority": 102, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "=", + "Comparator": "<>", + "CohortLabel": "elid_virtual_cohort_2" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "CohortLabel": "elid_virtual_cohort", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 201, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "CohortLabel": "elid_virtual_cohort_2" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-05-6.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-05-6.json new file mode 100644 index 00000000..6e53312b --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-05-6.json @@ -0,0 +1,87 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-440-01-Campaign-ID", + "Version": 1, + "Name": "ELI-440-01-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-440-01-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-440-01-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_real_world", + "CohortGroup": "rsv_eli_real_world", + "PositiveDescription": "In rsv_eli_real_world", + "NegativeDescription": "Out rsv_eli_real_world", + "Priority": 1, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Filter anyone who is the the first virtual cohort", + "Description": "Filter anyone who is the the first virtual cohort.", + "Priority": 100, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "elid_virtual_cohort" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-07.json b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-07.json new file mode 100644 index 00000000..ec55b314 --- /dev/null +++ b/data/configs/storyTestConfigs/AUTO_RSV_ELI-440-07.json @@ -0,0 +1,116 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-440-07-Campaign-ID", + "Version": 1, + "Name": "ELI-440-07-Iteration-Config-Name", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "20250717", + "EndDate": "20350717", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-440-07-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-440-07-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_real_world", + "CohortGroup": "rsv_eli_real_world", + "PositiveDescription": "In rsv_eli_real_world", + "NegativeDescription": "Out rsv_eli_real_world", + "Priority": 1 + }, + { + "CohortLabel": "elid_virtual_cohort_1", + "CohortGroup": "elid_virtual_cohort_1", + "PositiveDescription": "In elid_virtual_cohort_1", + "NegativeDescription": "Out elid_virtual_cohort_1", + "Priority": 2, + "Virtual": "Y" + }, + { + "CohortLabel": "elid_virtual_cohort_2", + "CohortGroup": "elid_virtual_cohort_2", + "PositiveDescription": "In elid_virtual_cohort_2", + "NegativeDescription": "Out elid_virtual_cohort_2", + "Priority": 3, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "CohortLabel": "elid_virtual_cohort_1" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "is_not_empty", + "Comparator": "", + "CohortLabel": "elid_virtual_cohort_1" + } + ], + "ActionsMapper": { + "TEST_ACTION": { + "ExternalRoutingCode": "TestAction", + "ActionDescription": "TestAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "TEST_NOT_ACTION": { + "ExternalRoutingCode": "TestNotAction", + "ActionDescription": "TestNotAction Description", + "ActionType": "ButtonWithAuthLink", + "UrlLink": null, + "UrlLabel": "" + }, + "TEST_NOT_ELI": { + "ExternalRoutingCode": "TestNotEli", + "ActionDescription": "TestNotEli Description", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json b/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json index f92afbfe..726a3a62 100644 --- a/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json +++ b/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json @@ -6,13 +6,13 @@ "Type": "V", "Target": "RSV", "Manager": [ - "person1@nhs.net" + "example@nhs.net" ], "Approver": [ - "person1@nhs.net" + "example@nhs.net" ], "Reviewer": [ - "person1@nhs.net" + "example@nhs.net" ], "IterationFrequency": "X", "IterationType": "O", @@ -40,8 +40,8 @@ { "CohortLabel": "rsv_75to79", "CohortGroup": "rsv_age", - "PositiveDescription": "are aged 75 to 79 years old", - "NegativeDescription": "are not aged 75 to 79 years old", + "PositiveDescription": "are aged between 75 and 79", + "NegativeDescription": "are not aged 75 to 79", "Priority": 0 }, { @@ -56,7 +56,8 @@ "CohortGroup": "magic_cohort", "PositiveDescription": "", "NegativeDescription": "", - "Priority": 20 + "Priority": 20, + "Virtual": "Y" } ], "IterationRules": [ @@ -97,29 +98,29 @@ }, { "Type": "F", - "Name": "Remove over 80 on day of execution", - "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Name": "Remove anyone 80 or over on day of execution from the 75 to 79 cohort", + "Description": "Exclude anyone who turned 80 on the day", "Priority": 130, "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", - "Operator": "<", - "Comparator": "19440902", + "Operator": "Y<=", + "Comparator": "-80", "CohortLabel": "rsv_75to79" }, { "Type": "F", - "Name": "Remove 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.", + "Name": "Remove under 80 years on day of execution from the 80 since 2nd Sept 2024 cohort", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 80 years is filtered out", "Priority": 140, "AttributeLevel": "PERSON", "AttributeName": "DATE_OF_BIRTH", "Operator": "Y>", - "Comparator": "-75", + "Comparator": "-80", "CohortLabel": "rsv_80_since_02_Sept_2024" }, { "Type": "F", - "Name": "Remove over 80 on day of execution", + "Name": "Remove those over 80 before 2nd September 2024 from the 80 since 2nd Sept 2024 cohort", "Description": "Exclude anyone who turned 80 before 2nd September 2024", "Priority": 150, "AttributeLevel": "PERSON", @@ -211,7 +212,7 @@ }, { "Type": "S", - "Name": "Empty Suggestion", + "Name": "EmptySuggestion", "Description": "", "Priority": 198, "AttributeLevel": "PERSON", @@ -222,8 +223,8 @@ }, { "Type": "S", - "Name": "Already Vaccinated", - "Description": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "Name": "AlreadyVaccinated", + "Description": "## You've had your RSV vaccination\n\nWe believe you were vaccinated against RSV on 3 April 2025.", "Priority": 200, "AttributeLevel": "TARGET", "AttributeTarget": "RSV", @@ -234,7 +235,7 @@ }, { "Type": "S", - "Name": "Other Setting", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 510, "AttributeLevel": "PERSON", @@ -246,7 +247,7 @@ }, { "Type": "S", - "Name": "Other Setting", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 520, "AttributeLevel": "PERSON", @@ -258,7 +259,7 @@ }, { "Type": "S", - "Name": "Other Setting", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 530, "AttributeLevel": "PERSON", @@ -270,7 +271,7 @@ }, { "Type": "S", - "Name": "Other Setting", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 540, "AttributeLevel": "PERSON", @@ -282,7 +283,7 @@ }, { "Type": "S", - "Name": "Other Setting with no future booking", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 550, "AttributeLevel": "PERSON", @@ -294,7 +295,7 @@ }, { "Type": "S", - "Name": "Other Setting", + "Name": "OtherSetting", "Description": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "Priority": 560, "AttributeLevel": "PERSON", @@ -342,14 +343,25 @@ }, { "Type": "R", - "Name": "Within CP Expansion ICB", + "Name": "Within CP Expansion ICB not 80 plus", "Description": "Book an appointment on NBS as within CP expansion", "Priority": 1200, "Operator": "in", "Comparator": "QH8,QJG", "AttributeLevel": "PERSON", "AttributeName": "ICB", - "CommsRouting": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + "CommsRouting": "CONTACT_GP|BOOK_NBS_INFO|WALKIN|HELP_SUPPORT" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB not 80 plus", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1200, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-80", + "CommsRouting": "CONTACT_GP|BOOK_NBS_INFO|WALKIN|HELP_SUPPORT" }, { "Type": "R", @@ -360,7 +372,29 @@ "Comparator": "E08000028,E08000031,E08000025,E06000016,E06000008,E07000117,E07000120,E08000011,E08000012,E07000122,E07000123,E08000014,E07000126,E08000013,E07000127,E08000015,E07000128", "AttributeLevel": "PERSON", "AttributeName": "LOCAL_AUTHORITY", - "CommsRouting": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + "CommsRouting": "CONTACT_GP|BOOK_NBS_INFO|WALKIN|HELP_SUPPORT" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB not 80 plus", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-80", + "CommsRouting": "CONTACT_GP|BOOK_NBS_INFO|WALKIN|HELP_SUPPORT" + }, + { + "Type": "R", + "Name": "Fix for Vita Scenario 2,3", + "Description": "Fix for Vita Scenario 2,3 which forces the response to only show BOOK_LOCAL", + "Priority": 1950, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "in", + "Comparator": "9686368906,9658218873", + "CommsRouting": "BOOK_LOCAL" }, { "Type": "Y", @@ -416,58 +450,72 @@ "UrlLink": "http://www.nhs.uk/book-rsv", "UrlLabel": "Continue to booking" }, + "BOOK_NBS_INFO": { + "ExternalRoutingCode": "BookNBSInfoText", + "ActionDescription": "## Book an appointment online at a pharmacy\n\nYou can book an appointment online at a pharmacy that offers the RSV vaccination. You need to be registered with a GP to do this.", + "ActionType": "ButtonWithAuthLinkWithInfoText", + "UrlLink": "https://f.nhswebsite-integration.nhs.uk/nbs/nhs-app/rsv", + "UrlLabel": "Continue to booking" + }, "AMEND_NBS": { "ExternalRoutingCode": "AmendNBS", - "ActionDescription": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "ActionDescription": "## You have an RSV vaccination appointment booked\n\nYou can view, change or cancel your appointment below.", "ActionType": "ButtonWithAuthLink", "UrlLink": "http://www.nhs.uk/book-rsv", "UrlLabel": "Manage your appointment" }, "CONTACT_GP": { "ExternalRoutingCode": "ContactGP", - "ActionDescription": "Contact your GP", + "ActionDescription": "## Get vaccinated at your GP practice\n\nContact your GP surgery to book an appointment.", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" }, "BOOK_LOCAL": { "ExternalRoutingCode": "BookLocal", - "ActionDescription": "##Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", + "ActionDescription": "## Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\n\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" }, "MANAGE_LOCAL": { "ExternalRoutingCode": "ManageLocal", - "ActionDescription": "##You have an RSV vaccination appointment\n\nContact your healthcare provider to change or cancel your appointment.", + "ActionDescription": "## You have an RSV vaccination appointment booked\n\nTo change or cancel your appointment, contact the provider you booked it with.", "ActionType": "CardWithText", "UrlLink": null, "UrlLabel": "" }, "HELP_SUPPORT": { "ExternalRoutingCode": "HelpSupportInfo", - "ActionDescription": "## CONTENT TBC\n\nBlah blah blah.", + "ActionDescription": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" }, "CHECK_CORRECT_X": { "ExternalRoutingCode": "HealthcareProInfo", - "ActionDescription": "## If you think this is incorrect\n\nSpeak to your healthcare professional if you think you should be offered this vaccine.\n\nFor anything else, visit our help and support page. (ADD LINK)", + "ActionDescription": "## If you think this is incorrect\n\nSpeak to your healthcare professional if you think you should be offered this vaccine.\n\nFor anything else, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" }, "CHECK_CORRECT_ALREADY_VACCINATED": { "ExternalRoutingCode": "AlreadyVaccinatedInfo", - "ActionDescription": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our help and support page. (ADD LINK).", + "ActionDescription": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" }, + "WALKIN": { + "ExternalRoutingCode": "WalkIn", + "ActionDescription": "## Get vaccinated without an appointment\n\nYou can get an RSV vaccination at some pharmacies without needing an appointment.\n\nYou do not need to be registered with a GP to do this.", + "ActionType": "ActionLinkWithInfoText", + "UrlLink": "https://www.nhs.uk/service-search/vaccination-and-booking-services/find-a-pharmacy-where-you-can-get-a-free-rsv-vaccination", + "UrlLabel": "Find a pharmacy where you can get a free RSV vaccination" + }, "CHECK_CORRECT_OTHER_SETTING": { "ExternalRoutingCode": "ManagedSettingInfo", - "ActionDescription": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our help and support page. (ADD LINK).", + "ActionDescription": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "ActionType": "InfoText", "UrlLink": null, "UrlLabel": "" diff --git a/data/dynamoDB/inProgressTestData/440/AUTO_RSV_ELI-440_004.json b/data/dynamoDB/inProgressTestData/440/AUTO_RSV_ELI-440_004.json new file mode 100644 index 00000000..4bac7dd0 --- /dev/null +++ b/data/dynamoDB/inProgressTestData/440/AUTO_RSV_ELI-440_004.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "ELI-ELI-440-04 - Filter on virtual cohort Label - NotEligible", + "comment:": "Failing due to issue expected to be fixed in ELI-454- Reintroduce when fixed", + "request_headers": { + "nhs-login-nhs-number": "9900440004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-04.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_440_cohort_999", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440004", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_001.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_001.json new file mode 100644 index 00000000..dfc5c7eb --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_001.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "ELI-223-001 - Single S Substitution - Single Target - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900223001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223001", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223001", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_002.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_002.json new file mode 100644 index 00000000..860e59e7 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_002.json @@ -0,0 +1,60 @@ +{ + "scenario_name": "ELI-223-002 - 3 x S Substitution - 3 x Different Targets - date of birth - 3 x Different Formats - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900223002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223002", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223002", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223002", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_003.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_003.json new file mode 100644 index 00000000..16578139 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_003.json @@ -0,0 +1,61 @@ +{ + "scenario_name": "ELI-223-003 - Error - Invalid Token", + "request_headers": { + "nhs-login-nhs-number": "9900223003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-03.json" + ], + "expected_response_code": 500, + "data": [ + { + "NHS_NUMBER": "9900223003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223003", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223003", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223003", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_004.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_004.json new file mode 100644 index 00000000..70c10802 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_004.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "ELI-223-004 - Missing Values", + "request_headers": { + "nhs-login-nhs-number": "9900223004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-04.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223004", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": null, + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": null, + "ICB": null, + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223004", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_005.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_005.json new file mode 100644 index 00000000..b84fc95b --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_005.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "ELI-223-005 - Invalid Date Formatting", + "request_headers": { + "nhs-login-nhs-number": "9900223005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-05.json" + ], + "expected_response_code": 500, + "data": [ + { + "NHS_NUMBER": "9900223005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223005", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": null, + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": null, + "ICB": null, + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "20250228", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_006.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_006.json new file mode 100644 index 00000000..6d4bf1cf --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_006.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "ELI-223-006 - S Substitutions AND Rule - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900223006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-06.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223006", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223006", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350102", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_007.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_007.json new file mode 100644 index 00000000..fa769955 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_007.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "ELI-223-007 - S Substitutions in 2 Rules - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900223007" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-07.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223007", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223007", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223007", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223007", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350102", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_008.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_008.json new file mode 100644 index 00000000..05e85bea --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_008.json @@ -0,0 +1,43 @@ +{ + "scenario_name": "ELI-223-008 - Substitution in Action - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900223008" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-08.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223008", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223008", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223008", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350102", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_009.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_009.json new file mode 100644 index 00000000..786b1149 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_009.json @@ -0,0 +1,76 @@ +{ + "scenario_name": "ELI-223-009 - Substitution for all Person and Target attributes plus case insensitive", + "request_headers": { + "nhs-login-nhs-number": "9900223009" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-09.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223009", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223009", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "LOCAL_AUTHORITY": "E08000012", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223009", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS", + "INVALID_DOSES_COUNT": "1", + "LAST_INVITE_DATE": "<>", + "LAST_INVITE_STATUS": "Created", + "LAST_VALID_DOSE_DATE": "<>", + "VALID_DOSES_COUNT": "3" + }, + { + "NHS_NUMBER": "9900223009", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ABC", + "INVALID_DOSES_COUNT": "10", + "LAST_INVITE_DATE": "<>", + "LAST_INVITE_STATUS": "Read", + "LAST_VALID_DOSE_DATE": "<>", + "VALID_DOSES_COUNT": "30" + }, + { + "NHS_NUMBER": "9900223009", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "DEF", + "INVALID_DOSES_COUNT": "100", + "LAST_INVITE_DATE": "<>", + "LAST_INVITE_STATUS": "Read", + "LAST_VALID_DOSE_DATE": "<>", + "VALID_DOSES_COUNT": "300" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_010.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_010.json new file mode 100644 index 00000000..b7f04bd1 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_010.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "ELI-223-010 - Unknown Formating Function", + "request_headers": { + "nhs-login-nhs-number": "9900223010" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-10.json" + ], + "expected_response_code": 500, + "data": [ + { + "NHS_NUMBER": "9900223010", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223010", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": null, + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": null, + "ICB": null, + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223010", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "20250228", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_011.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_011.json new file mode 100644 index 00000000..f201463e --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_011.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "ELI-223-011 - Substitution in Action - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900223011" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-11.json" + ], + "data": [ + { + "NHS_NUMBER": "9900223011", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223011", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223011", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223011", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350102", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_012.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_012.json new file mode 100644 index 00000000..59843267 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-223_012.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-223-012 - Invalid datatype", + "request_headers": { + "nhs-login-nhs-number": "9900223012" + }, + "config_filenames": [ + "AUTO_RSV_ELI-223-12.json" + ], + "expected_response_code": 500, + "data": [ + { + "NHS_NUMBER": "9900223012", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_223_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900223012", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900223012", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>>", + "BOOKED_APPOINTMENT_DATE": "20350101", + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900223012", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20350102", + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_001.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_001.json similarity index 91% rename from data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_001.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_001.json index ad25ea5b..3d941cda 100644 --- a/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_001.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_001.json @@ -1,5 +1,5 @@ { - "scenario_name": "RSV - Ineligible - Suppressed by AND rule with different rule names", + "scenario_name": "RSV - NotActionable - Suppressed by AND rule with different rule names", "request_headers": { "nhs-login-nhs-number": "9900037101" }, diff --git a/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_002.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_002.json similarity index 75% rename from data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_002.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_002.json index 29b5a7e9..1271515e 100644 --- a/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-371_002.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-371_002.json @@ -1,14 +1,14 @@ { - "scenario_name": "RSV - Ineligible - Suppressed by single rule using a different D.O.B.", + "scenario_name": "RSV - NotActionable - Suppressed by single rule using a different D.O.B.", "request_headers": { - "nhs-login-nhs-number": "9900037101" + "nhs-login-nhs-number": "9900037102" }, "config_filenames": [ "AUTO_RSV_ELI-371.json" ], "data": [ { - "NHS_NUMBER": "9900037101", + "NHS_NUMBER": "9900037102", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { @@ -18,9 +18,9 @@ ] }, { - "NHS_NUMBER": "9900037101", + "NHS_NUMBER": "9900037102", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19810501", + "DATE_OF_BIRTH": "19820501", "GENDER": "0", "POSTCODE": "SG8 6EG", "POSTCODE_SECTOR": "SG86", @@ -36,7 +36,7 @@ "DE_FLAG": "N" }, { - "NHS_NUMBER": "9900037101", + "NHS_NUMBER": "9900037102", "ATTRIBUTE_TYPE": "RSV", "BOOKED_APPOINTMENT_DATE": "<>", "BOOKED_APPOINTMENT_PROVIDER": "NBS" diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_001.json similarity index 68% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_001.json index 1f085096..7489221f 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_001.json @@ -1,36 +1,36 @@ { - "scenario_name": "ELI-376 - Audit Records - No F no S - Actionable", + "scenario_name": "ELI-405 - Audit Records - F & S rule but not matched - Actionable", "request_headers": { - "nhs-login-nhs-number": "9900376001" + "nhs-login-nhs-number": "9900405001" }, "config_filenames": [ - "AUTO_RSV_ELI-376-01.json" + "AUTO_RSV_ELI-405-01.json" ], "data": [ { - "NHS_NUMBER": "9900376001", + "NHS_NUMBER": "9900405001", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", + "COHORT_LABEL": "rsv_eli_405_cohort_1", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_2", + "COHORT_LABEL": "rsv_eli_405_cohort_2", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_3", + "COHORT_LABEL": "rsv_eli_405_cohort_3", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "rsv_eli_405_cohort_4", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376001", + "NHS_NUMBER": "9900405001", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -48,7 +48,7 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376001", + "NHS_NUMBER": "9900405001", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, "BOOKED_APPOINTMENT_DATE": "<>", diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_002.json similarity index 68% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_002.json index 46fd8abf..92cdd34d 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_002.json @@ -1,36 +1,36 @@ { - "scenario_name": "ELI-376 - Audit Records - Multiple F Rules - Actionable", + "scenario_name": "ELI-405 - Audit Records - 2 Cohort-specific F Rules Matched - Actionable", "request_headers": { - "nhs-login-nhs-number": "9900376004" + "nhs-login-nhs-number": "9900405002" }, "config_filenames": [ - "AUTO_RSV_ELI-376-04.json" + "AUTO_RSV_ELI-405-02.json" ], "data": [ { - "NHS_NUMBER": "9900376004", + "NHS_NUMBER": "9900405002", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", + "COHORT_LABEL": "rsv_eli_405_cohort_1", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_2", + "COHORT_LABEL": "rsv_eli_405_cohort_2", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_3", + "COHORT_LABEL": "rsv_eli_405_cohort_3", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "rsv_eli_405_cohort_4", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376004", + "NHS_NUMBER": "9900405002", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -48,7 +48,7 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376004", + "NHS_NUMBER": "9900405002", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, "BOOKED_APPOINTMENT_DATE": "<>", diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_003.json similarity index 63% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_003.json index 17c1f6de..8bd5d5b3 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_003.json @@ -1,36 +1,40 @@ { - "scenario_name": "ELI-376 - Audit Records - One F Rule One S Rule", + "scenario_name": "ELI-405 - Audit Records - 2 Cohort-specific S Rules Matched - Actionable", "request_headers": { - "nhs-login-nhs-number": "9900376003" + "nhs-login-nhs-number": "9900405003" }, "config_filenames": [ - "AUTO_RSV_ELI-376-03.json" + "AUTO_RSV_ELI-405-03.json" ], "data": [ { - "NHS_NUMBER": "9900376003", + "NHS_NUMBER": "9900405003", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", + "COHORT_LABEL": "rsv_eli_405_cohort_1", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_2", + "COHORT_LABEL": "rsv_eli_405_cohort_2", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_3", + "COHORT_LABEL": "rsv_eli_405_cohort_3", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "rsv_eli_405_cohort_4", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_405_cohort_5", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376003", + "NHS_NUMBER": "9900405003", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -48,7 +52,7 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376003", + "NHS_NUMBER": "9900405003", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, "BOOKED_APPOINTMENT_DATE": "<>", diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_004.json similarity index 64% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_004.json index 85579eb0..022742c0 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_004.json @@ -1,36 +1,40 @@ { - "scenario_name": "ELI-376 - Audit Records - Multiple F & S Rules", + "scenario_name": "ELI-405 - Audit Records - 2x F & 2x S Rules - Actionable", "request_headers": { - "nhs-login-nhs-number": "9900376010" + "nhs-login-nhs-number": "9900405004" }, "config_filenames": [ - "AUTO_RSV_ELI-376-10.json" + "AUTO_RSV_ELI-405-04.json" ], "data": [ { - "NHS_NUMBER": "9900376010", + "NHS_NUMBER": "9900405004", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", + "COHORT_LABEL": "rsv_eli_405_cohort_1", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_2", + "COHORT_LABEL": "rsv_eli_405_cohort_2", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_3", + "COHORT_LABEL": "rsv_eli_405_cohort_3", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "rsv_eli_405_cohort_4", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_405_cohort_5", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376010", + "NHS_NUMBER": "9900405004", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -48,7 +52,7 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376010", + "NHS_NUMBER": "9900405004", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, "BOOKED_APPOINTMENT_DATE": "<>", diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_005.json similarity index 66% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_005.json index e52ce68d..fd7b6ea4 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_005.json @@ -1,36 +1,36 @@ { - "scenario_name": "ELI-376 - Audit Records - Multiple F Rules - NotEligible", + "scenario_name": "ELI-405 - Audit Records - 2x Cohort-specific F & 3x S rules - not actionable - rule stop on 2nd priority", "request_headers": { - "nhs-login-nhs-number": "9900376005" + "nhs-login-nhs-number": "9900405005" }, "config_filenames": [ - "AUTO_RSV_ELI-376-05.json" + "AUTO_RSV_ELI-405-05.json" ], "data": [ { - "NHS_NUMBER": "9900376005", + "NHS_NUMBER": "9900405005", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", + "COHORT_LABEL": "rsv_eli_405_cohort_1", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_2", + "COHORT_LABEL": "rsv_eli_405_cohort_2", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_3", + "COHORT_LABEL": "rsv_eli_405_cohort_3", "DATE_JOINED": "20231020" }, { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "rsv_eli_405_cohort_4", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376005", + "NHS_NUMBER": "9900405005", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -48,7 +48,7 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376005", + "NHS_NUMBER": "9900405005", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, "BOOKED_APPOINTMENT_DATE": "<>", diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_006.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_006.json new file mode 100644 index 00000000..72c71f73 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-405_006.json @@ -0,0 +1,50 @@ +{ + "scenario_name": "ELI-405 - Audit Records - 2 Cohort-specific F rules - not eligible", + "request_headers": { + "nhs-login-nhs-number": "9900405006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-405-06.json" + ], + "data": [ + { + "NHS_NUMBER": "9900405006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_405_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_405_cohort_2", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900405006", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "ABC", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900405006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_001.json similarity index 51% rename from data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json rename to data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_001.json index 492ad0cd..3d441c38 100644 --- a/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_001.json @@ -1,38 +1,26 @@ { - "scenario_name": "ELI-376 - Audit Records - Single F Rule - NotEligible", + "scenario_name": "ELI-427-001 - Custom Status Text - Actionable", "request_headers": { - "nhs-login-nhs-number": "9900376002" + "nhs-login-nhs-number": "9900427001" }, "config_filenames": [ - "AUTO_RSV_ELI-376-02.json" + "AUTO_RSV_ELI-427-01-3.json" ], "data": [ { - "NHS_NUMBER": "9900376002", + "NHS_NUMBER": "9900427001", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_eli_376_cohort_1", - "DATE_JOINED": "20231020" - }, - { - "COHORT_LABEL": "rsv_eli_376_cohort_2", - "DATE_JOINED": "20231020" - }, - { - "COHORT_LABEL": "rsv_eli_376_cohort_3", - "DATE_JOINED": "20231020" - }, - { - "COHORT_LABEL": "rsv_eli_376_cohort_4", + "COHORT_LABEL": "eli_427_cohort_1", "DATE_JOINED": "20231020" } ] }, { - "NHS_NUMBER": "9900376002", + "NHS_NUMBER": "9900427001", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "<>", + "DATE_OF_BIRTH": "<>", "GENDER": "0", "POSTCODE": "SG8 6EG", "POSTCODE_SECTOR": "SG86", @@ -48,10 +36,10 @@ "DE_FLAG": "Y" }, { - "NHS_NUMBER": "9900376002", + "NHS_NUMBER": "9900427001", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": null, - "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", "BOOKED_APPOINTMENT_PROVIDER": "NBS" } ] diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_002.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_002.json new file mode 100644 index 00000000..dd0b4807 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_002.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-427-002 - Custom Status Text - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900427002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-427-01-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900427002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_427_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900427002", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900427002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_003.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_003.json new file mode 100644 index 00000000..37712876 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_003.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-427-003 - Custom Status Text - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900427003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-427-01-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900427003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_427_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900427003", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900427003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_004.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_004.json new file mode 100644 index 00000000..2443dc2b --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_004.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-427-004 - Empty Actionable Custom Status Text - Use Default - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900427004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-427-04-6.json" + ], + "data": [ + { + "NHS_NUMBER": "9900427004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_427_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900427004", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900427004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_005.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_005.json new file mode 100644 index 00000000..e4361a22 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_005.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-427-005 - Missing NotActionable Custom Status Text - Use Default - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900427005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-427-04-6.json" + ], + "data": [ + { + "NHS_NUMBER": "9900427005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_427_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900427005", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900427005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_006.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_006.json new file mode 100644 index 00000000..d6cfd082 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-427_006.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-427-006 - Missing NotEligible Custom Status Text - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900427006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-427-04-6.json" + ], + "data": [ + { + "NHS_NUMBER": "9900427006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_427_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900427006", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900427006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_001.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_001.json new file mode 100644 index 00000000..e27c2941 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_001.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-440-001 - elid_all_people no longer indicate a cohort is magic/virtual - Missing Virtual Defaults to N - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900440001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_440_cohort_999", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440001", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_002.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_002.json new file mode 100644 index 00000000..9ac42778 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_002.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-440-002 - virtual cohort filter rule - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900440002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-02-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_440_cohort_999", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440002", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_003.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_003.json new file mode 100644 index 00000000..bd879f62 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_003.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-440-003 - virtual cohort suppression rule - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900440003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-02-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_440_cohort_999", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440003", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_005.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_005.json new file mode 100644 index 00000000..c720fed1 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_005.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-ELI-440-05-6 - Backward Compatibility - 'In real world' cohort - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900440005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-05-6.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_real_world", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440005", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_006.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_006.json new file mode 100644 index 00000000..6718c070 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_006.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-ELI-440-06 - Backward Compatibility - Not 'In real world' cohort - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900440006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-05-6.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "not_in_rsv_eli_real_world", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440006", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_007.json b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_007.json new file mode 100644 index 00000000..59c0e5f5 --- /dev/null +++ b/data/dynamoDB/storyTestData/AUTO_RSV_ELI-440_007.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-ELI-440-07 - And S Rules with Virtual Cohorts using CohortLabel - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900440007" + }, + "config_filenames": [ + "AUTO_RSV_ELI-440-07.json" + ], + "data": [ + { + "NHS_NUMBER": "9900440007", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_real_world", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900440007", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900440007", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "not_null", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json index 35bcb3ef..e5e1d6bd 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json @@ -20,7 +20,7 @@ { "NHS_NUMBER": "9686368906", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json index 0e8cdd25..5fda873d 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json @@ -20,7 +20,7 @@ { "NHS_NUMBER": "9658218873", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json index ed20d7d3..01c541a9 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json @@ -10,7 +10,7 @@ { "NHS_NUMBER": "9658218881", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -28,7 +28,7 @@ { "NHS_NUMBER": "9658218881", "ATTRIBUTE_TYPE": "RSV", - "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20351212", "BOOKED_APPOINTMENT_PROVIDER": "NBS" } ] diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json index 2ef47a62..f21e7710 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json @@ -10,7 +10,7 @@ { "NHS_NUMBER": "9658218903", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -28,7 +28,7 @@ { "NHS_NUMBER": "9658218903", "ATTRIBUTE_TYPE": "RSV", - "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "20351212", "BOOKED_APPOINTMENT_PROVIDER": "ACC" } ] diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json index 9cda1139..792e7842 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json @@ -10,7 +10,7 @@ { "NHS_NUMBER": "9658218989", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json index e7b4d9a3..6ed305d6 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json @@ -20,7 +20,7 @@ { "NHS_NUMBER": "9658218997", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json index f0c0971a..aa31df59 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json @@ -20,7 +20,7 @@ { "NHS_NUMBER": "9658219012", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_010.json similarity index 65% rename from data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json rename to data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_010.json index 2f4cb8d8..0234ed45 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_010.json @@ -1,12 +1,14 @@ { - "scenario_name": "RSV - Vita Integration - NotActionable - empty suggestions - fallback to static", + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine - age rolling - TooClose", "request_headers": { - "nhs-login-nhs-number": "9658219004" + "nhs-login-nhs-number": "9658220142" }, - "config_filenames": ["vita_integration_test_config.json"], + "config_filenames": [ + "vita_integration_test_config.json" + ], "data": [ { - "NHS_NUMBER": "9658219004", + "NHS_NUMBER": "9658220142", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { @@ -16,9 +18,9 @@ ] }, { - "NHS_NUMBER": "9658219004", + "NHS_NUMBER": "9658220142", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json index 6ebd3beb..98c575b6 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json @@ -1,26 +1,16 @@ { - "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine - age rolling - TooClose", + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine ( managed setting ) - age rolling - OtherSetting", "request_headers": { - "nhs-login-nhs-number": "9658220142" + "nhs-login-nhs-number": "9658220150" }, "config_filenames": [ "vita_integration_test_config.json" ], "data": [ { - "NHS_NUMBER": "9658220142", - "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75to79", - "DATE_JOINED": "20231020" - } - ] - }, - { - "NHS_NUMBER": "9658220142", + "NHS_NUMBER": "9658220150", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -32,8 +22,18 @@ "ICB": "QUE", "COMMISSIONING_REGION": "Y61", "13Q_FLAG": "N", - "CARE_HOME_FLAG": "N", + "CARE_HOME_FLAG": "Y", "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9658220150", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] } ] } diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json index a9199331..fc806c47 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json @@ -1,16 +1,16 @@ { - "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine ( managed setting ) - age rolling - OtherSetting", + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - unknown membership - AlreadyVaccinated", "request_headers": { - "nhs-login-nhs-number": "9658220150" + "nhs-login-nhs-number": "9450114080" }, "config_filenames": [ "vita_integration_test_config.json" ], "data": [ { - "NHS_NUMBER": "9658220150", + "NHS_NUMBER": "9450114080", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -26,14 +26,9 @@ "DE_FLAG": "N" }, { - "NHS_NUMBER": "9658220150", - "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75to79", - "DATE_JOINED": "20231020" - } - ] + "NHS_NUMBER": "9450114080", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" } ] } diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json index 77057e50..a3dff10d 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json @@ -1,16 +1,21 @@ { - "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - unknown membership - AlreadyVaccinated", + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - empty cohorts - AlreadyVaccinated", "request_headers": { - "nhs-login-nhs-number": "9450114080" + "nhs-login-nhs-number": "9466447939" }, "config_filenames": [ "vita_integration_test_config.json" ], "data": [ { - "NHS_NUMBER": "9450114080", + "NHS_NUMBER": "9466447939", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9466447939", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -24,11 +29,6 @@ "13Q_FLAG": "N", "CARE_HOME_FLAG": "Y", "DE_FLAG": "N" - }, - { - "NHS_NUMBER": "9450114080", - "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": "<>" } ] } diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json index 7ec5f92d..e11d722f 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json @@ -1,21 +1,16 @@ { - "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - empty cohorts - AlreadyVaccinated", + "scenario_name": "RSV - Vita Integration - - Not Eligible", "request_headers": { - "nhs-login-nhs-number": "9466447939" + "nhs-login-nhs-number": "9657933617" }, "config_filenames": [ "vita_integration_test_config.json" ], "data": [ { - "NHS_NUMBER": "9466447939", - "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": "<>" - }, - { - "NHS_NUMBER": "9466447939", + "NHS_NUMBER": "9657933617", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", + "DATE_OF_BIRTH": "<>", "GENDER": "2", "POSTCODE": "CB3 8DX", "POSTCODE_SECTOR": "CB38", @@ -29,6 +24,12 @@ "13Q_FLAG": "N", "CARE_HOME_FLAG": "Y", "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9657933617", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null } ] } diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json deleted file mode 100644 index 2f663767..00000000 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "scenario_name": "RSV - Vita Integration - - Not Eligible", - "request_headers": { - "nhs-login-nhs-number": "9657933617" - }, - "config_filenames": [ - "vita_integration_test_config.json" - ], - "data": [ - { - "NHS_NUMBER": "9657933617", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", - "GENDER": "2", - "POSTCODE": "CB3 8DX", - "POSTCODE_SECTOR": "CB38", - "POSTCODE_OUTCODE": "CB3", - "MSOA": "E02007085", - "LSOA": "E01018223", - "GP_PRACTICE_CODE": "D81046", - "PCN": "U75549", - "ICB": "QUE", - "COMMISSIONING_REGION": "Y61", - "13Q_FLAG": "N", - "CARE_HOME_FLAG": "Y", - "DE_FLAG": "N" - }, - { - "NHS_NUMBER": "9657933617", - "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": null, - "BOOKED_APPOINTMENT_DATE": null - } - ] -} diff --git a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json index 79aff5d5..68c385ce 100644 --- a/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json +++ b/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json @@ -13,7 +13,7 @@ "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MEMBERSHIPS": [ { - "COHORT_LABEL": "rsv_75to79", + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", "DATE_JOINED": "20231020" } ] @@ -21,7 +21,7 @@ { "NHS_NUMBER": "9436793375", "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": 19500601, + "DATE_OF_BIRTH": 19001116, "GENDER": "0", "POSTCODE": "SG8 6EG", "POSTCODE_SECTOR": "SG86", diff --git a/data/responses/inProgressTestResponses/440/AUTO_RSV_ELI-440_004.json b/data/responses/inProgressTestResponses/440/AUTO_RSV_ELI-440_004.json new file mode 100644 index 00000000..604e7f14 --- /dev/null +++ b/data/responses/inProgressTestResponses/440/AUTO_RSV_ELI-440_004.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-09-17T13:22:37.091749+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEli", + "actionType": "TestNotEliAction", + "description": "TestNotEli Description", + "urlLabel": "not_eli_UrlLabel", + "urlLink": "https://www.noteligible.com/440" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "elid_virtual_cohort", + "cohortStatus": "NotEligible", + "cohortText": "Out elid_virtual_cohort" + }, + { + "cohortCode": "rsv_eli_440_cohort_999", + "cohortStatus": "NotEligible", + "cohortText": "Out rsv_eli_440_cohort_999" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "24f59fb8-6951-47e9-9a60-c08003f06fb6" +} diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_001.json similarity index 60% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-223_001.json index c8108df4..909db2b3 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_001.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-08-10T20:50:17.917074+00:00" + "lastUpdated": "2025-09-01T12:14:03.956690+00:00" }, "processedSuggestions": [ { @@ -16,21 +16,21 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "rsv_eli_223_cohort_group", "cohortStatus": "NotActionable", - "cohortText": "are a member of eli_376_cohort_group_0" + "cohortText": "are a member of eli_223_cohort_group" } ], "status": "NotActionable", "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "NotActionable Reason 1", - "ruleText": "NotActionable Description 1", + "ruleCode": "Already Vaccinated", + "ruleText": "## You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on <>", "ruleType": "S" } ] } ], - "responseId": "3726dc78-c69e-491a-8cbc-90e059ba2d49" + "responseId": "d3ee2545-836b-47ff-8906-0420037b26aa" } diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_002.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_002.json new file mode 100644 index 00000000..73254727 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_002.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-09-01T15:34:26.148961+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ActionType PCN: U75549", + "description": "ActionDescription ICB: QUE", + "urlLabel": "urlLabel MSOA: E02003792", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "We believe you had the RSV vaccination on <> and a COVID vaccination on <>.You also have a Flu Vaccination Booking on 2035/01/01 and your date of birth is <>", + "ruleType": "S" + } + ] + } + ], + "responseId": "d7671622-8269-4660-82ff-4d909da183dc" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_003.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_003.json new file mode 100644 index 00000000..b985424e --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_003.json @@ -0,0 +1,23 @@ +{ + "resourceType": "OperationOutcome", + "id": "606b9a26-d487-456b-99c9-b99b3e87908a", + "meta": { + "lastUpdated": "2025-09-01T15:45:05.443303Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INTERNAL_SERVER_ERROR", + "display": "An unexpected internal server error occurred." + } + ] + }, + "diagnostics": "An unexpected error occurred." + } + ] +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_004.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_004.json new file mode 100644 index 00000000..e415b077 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_004.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-09-01T15:34:26.148961+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ActionType PCN: ", + "description": "ActionDescription ICB: ", + "urlLabel": "urlLabel MSOA: ", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "We believe you had the RSV vaccination on .You also have a Flu Vaccination Booking on and your ICB is ", + "ruleType": "S" + } + ] + } + ], + "responseId": "d7671622-8269-4660-82ff-4d909da183dc" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_005.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_005.json new file mode 100644 index 00000000..b985424e --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_005.json @@ -0,0 +1,23 @@ +{ + "resourceType": "OperationOutcome", + "id": "606b9a26-d487-456b-99c9-b99b3e87908a", + "meta": { + "lastUpdated": "2025-09-01T15:45:05.443303Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INTERNAL_SERVER_ERROR", + "display": "An unexpected internal server error occurred." + } + ] + }, + "diagnostics": "An unexpected error occurred." + } + ] +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_006.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_006.json new file mode 100644 index 00000000..df6c8e5a --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_006.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-09-02T15:32:31.480934+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated and Booked", + "ruleText": "## 1You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on <> and are booked on 01 January 2035", + "ruleType": "S" + } + ] + } + ], + "responseId": "1692cb9d-9804-4405-91f4-dcb544ae5af1" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_007.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_007.json new file mode 100644 index 00000000..cbf5094a --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_007.json @@ -0,0 +1,41 @@ +{ + "meta": { + "lastUpdated": "2025-09-02T15:42:30.916497+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "## You've had your RSV vaccination\\n\\nWe believe you had the RSV vaccination on <>", + "ruleType": "S" + }, + { + "ruleCode": "Already Booked", + "ruleText": "## You have a COVID vaccination booking on 02 January 2035", + "ruleType": "S" + } + ] + } + ], + "responseId": "62f8b582-deee-4a3c-9798-1553d60024b6" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_008.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_008.json new file mode 100644 index 00000000..893b1eff --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_008.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-03T10:29:20.078600+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEligible", + "actionType": "ButtonWithAuthLink", + "description": "## You are not eligible as your dob is <>.", + "urlLabel": "You're not Eligible", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_223_cohort_group" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "a9feb039-5b9c-48d3-a7f7-f923e30550a6" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_009.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_009.json new file mode 100644 index 00000000..fa17173e --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_009.json @@ -0,0 +1,146 @@ +{ + "meta": { + "lastUpdated": "2025-09-03T11:57:45.194604+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Target Substitution LAST_SUCCESSFUL_DATE", + "ruleText": "Target Substitution LAST_SUCCESSFUL_DATE <>", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution BOOKED_APPOINTMENT_DATE", + "ruleText": "Target Substitution BOOKED_APPOINTMENT_DATE <>", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution BOOKED_APPOINTMENT_PROVIDER", + "ruleText": "Target Substitution BOOKED_APPOINTMENT_PROVIDER NBS", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution INVALID_DOSES_COUNT", + "ruleText": "Target Substitution INVALID_DOSES_COUNT 10", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution LAST_INVITE_DATE", + "ruleText": "Target Substitution LAST_INVITE_DATE <>", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution LAST_INVITE_STATUS", + "ruleText": "Target Substitution LAST_INVITE_STATUS Read", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution LAST_VALID_DOSE_DATE", + "ruleText": "Target Substitution LAST_VALID_DOSE_DATE <>", + "ruleType": "S" + }, + { + "ruleCode": "Target Substitution VALID_DOSES_COUNT", + "ruleText": "Target Substitution VALID_DOSES_COUNT 30", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution DATE_OF_BIRTH", + "ruleText": "Target Substitution DATE_OF_BIRTH <>", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution GENDER", + "ruleText": "Target Substitution GENDER 0", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution POSTCODE", + "ruleText": "Target Substitution POSTCODE SG8 6EG", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution POSTCODE_SECTOR", + "ruleText": "Target Substitution POSTCODE_SECTOR SG86", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution POSTCODE_OUTCODE", + "ruleText": "Target Substitution POSTCODE_OUTCODE SG8", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution MSOA", + "ruleText": "Target Substitution MSOA E02003792", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution LSOA", + "ruleText": "Target Substitution LSOA E01018267", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution LOCAL_AUTHORITY", + "ruleText": "Target Substitution LOCAL_AUTHORITY E08000012", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution GP_PRACTICE_CODE", + "ruleText": "Target Substitution GP_PRACTICE_CODE D81046", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution PCN", + "ruleText": "Target Substitution PCN U75549", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution ICB", + "ruleText": "Target Substitution ICB QUE", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution COMMISSIONING_REGION", + "ruleText": "Target Substitution COMMISSIONING_REGION Y61", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution 13Q_FLAG", + "ruleText": "Target Substitution 13Q_FLAG N", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution CARE_HOME_FLAG", + "ruleText": "Target Substitution CARE_HOME_FLAG N", + "ruleType": "S" + }, + { + "ruleCode": "Person Substitution DE_FLAG", + "ruleText": "Target Substitution DE_FLAG Y", + "ruleType": "S" + } + ] + } + ], + "responseId": "35c424aa-bf7a-42d8-b533-b33a09f8524f" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_010.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_010.json new file mode 100644 index 00000000..b985424e --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_010.json @@ -0,0 +1,23 @@ +{ + "resourceType": "OperationOutcome", + "id": "606b9a26-d487-456b-99c9-b99b3e87908a", + "meta": { + "lastUpdated": "2025-09-01T15:45:05.443303Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INTERNAL_SERVER_ERROR", + "display": "An unexpected internal server error occurred." + } + ] + }, + "diagnostics": "An unexpected error occurred." + } + ] +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_011.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_011.json new file mode 100644 index 00000000..2dc74b4a --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_011.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-03T10:29:20.078600+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestActionable", + "actionType": "ButtonWithAuthLink", + "description": "## You are actionable as your dob is <>.", + "urlLabel": "You're actionable", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_223_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_223_cohort_group" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "a9feb039-5b9c-48d3-a7f7-f923e30550a6" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-223_012.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_012.json new file mode 100644 index 00000000..b985424e --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-223_012.json @@ -0,0 +1,23 @@ +{ + "resourceType": "OperationOutcome", + "id": "606b9a26-d487-456b-99c9-b99b3e87908a", + "meta": { + "lastUpdated": "2025-09-01T15:45:05.443303Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INTERNAL_SERVER_ERROR", + "display": "An unexpected internal server error occurred." + } + ] + }, + "diagnostics": "An unexpected error occurred." + } + ] +} diff --git a/data/responses/inProgressTestResponses/AUTO_RSV_ELI-371_001.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-371_001.json similarity index 100% rename from data/responses/inProgressTestResponses/AUTO_RSV_ELI-371_001.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-371_001.json diff --git a/data/responses/inProgressTestResponses/AUTO_RSV_ELI-371_002.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-371_002.json similarity index 78% rename from data/responses/inProgressTestResponses/AUTO_RSV_ELI-371_002.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-371_002.json index 387439f1..44793dd3 100644 --- a/data/responses/inProgressTestResponses/AUTO_RSV_ELI-371_002.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-371_002.json @@ -17,8 +17,8 @@ "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "Testing of AND rules where names are different", - "ruleText": "Testing of AND rules where names are different", + "ruleCode": "This is a rule on it's own and not part of the AND rules above", + "ruleText": "This is a rule on it's own", "ruleType": "S" } ] diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_001.json similarity index 76% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-405_001.json index d611ab02..c19b20ab 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_001.json @@ -16,14 +16,14 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "rsv_eli_405_cohort_group", "cohortStatus": "Actionable", - "cohortText": "are a member of eli_376_cohort_group_0" + "cohortText": "are a member of eli_405_cohort_group_0" }, { - "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortCode": "rsv_eli_405_cohort_group_other", "cohortStatus": "Actionable", - "cohortText": "are a member of eli_376_cohort_group_other" + "cohortText": "are a member of eli_405_cohort_group_other" } ], "status": "Actionable", diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_002.json similarity index 85% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-405_002.json index cce80a66..3ddbc187 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_002.json @@ -16,9 +16,9 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "rsv_eli_405_cohort_group", "cohortStatus": "Actionable", - "cohortText": "are a member of eli_376_cohort_group_10" + "cohortText": "are a member of eli_405_cohort_group_10" } ], "status": "Actionable", diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-405_003.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_003.json new file mode 100644 index 00000000..ca53fd09 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_003.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_405_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_405_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-405_004.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_004.json new file mode 100644 index 00000000..ca53fd09 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_004.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_405_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_405_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_005.json similarity index 81% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-405_005.json index d10737c7..00c0d82d 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_005.json @@ -16,14 +16,14 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "rsv_eli_405_cohort_group", "cohortStatus": "NotActionable", - "cohortText": "are a member of eli_376_cohort_group_20" + "cohortText": "are a member of eli_405_cohort_group_20" }, { - "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortCode": "rsv_eli_405_cohort_group_other", "cohortStatus": "NotActionable", - "cohortText": "are a member of eli_376_cohort_group_other" + "cohortText": "are a member of eli_405_cohort_group_other" } ], "status": "NotActionable", diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_006.json similarity index 55% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-405_006.json index 50817596..d5b67a50 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-405_006.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-08-10T20:01:50.163464+00:00" + "lastUpdated": "" }, "processedSuggestions": [ { @@ -16,14 +16,9 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "rsv_eli_405_cohort_group", "cohortStatus": "NotEligible", - "cohortText": "are not a member of eli_376_cohort_group_0" - }, - { - "cohortCode": "rsv_eli_376_cohort_group_other", - "cohortStatus": "NotEligible", - "cohortText": "are not a member of eli_376_cohort_group_other" + "cohortText": "are not a member of eli_405_cohort_group_0" } ], "status": "NotEligible", @@ -31,5 +26,5 @@ "suitabilityRules": [] } ], - "responseId": "8251a4cd-3d39-4b46-8c32-03597c834c51" + "responseId": "" } diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_001.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_001.json new file mode 100644 index 00000000..a75d8a93 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_001.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:37:31.026669+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "Actionable", + "cohortText": "In eli_427_cohort_1" + } + ], + "status": "Actionable", + "statusText": "CUSTOM1 - You should have the RSV Vaccine and you have an appointment on <>", + "suitabilityRules": [] + } + ], + "responseId": "78b0e4ea-7efb-4860-8168-7ec5b8f176fa" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_002.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_002.json new file mode 100644 index 00000000..693795db --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_002.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:40:12.555932+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "NotActionable", + "cohortText": "In eli_427_cohort_1" + } + ], + "status": "NotActionable", + "statusText": "CUSTOM2 - You had the RSV Vaccine on <>", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "36c8036a-3e35-40ec-9572-5f82f00e067a" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_003.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_003.json new file mode 100644 index 00000000..0c33bbd3 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_003.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:43:55.970331+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEli", + "actionType": "", + "description": "TestNotEli Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "NotEligible", + "cohortText": "Not in eli_427_cohort_1" + } + ], + "status": "NotEligible", + "statusText": "CUSTOM3 - We do not believe you should have it as you were born on <> and your postcode is SG8 6EG", + "suitabilityRules": [] + } + ], + "responseId": "d5f9af16-453e-45c5-947f-dc2de44d5109" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_004.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_004.json new file mode 100644 index 00000000..c7a1d8d5 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_004.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:37:31.026669+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "Actionable", + "cohortText": "In eli_427_cohort_1" + } + ], + "status": "Actionable", + "statusText": "You should have the FLU vaccine", + "suitabilityRules": [] + } + ], + "responseId": "78b0e4ea-7efb-4860-8168-7ec5b8f176fa" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_005.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_005.json new file mode 100644 index 00000000..7be7b23d --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_005.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:40:12.555932+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "NotActionable", + "cohortText": "In eli_427_cohort_1" + } + ], + "status": "NotActionable", + "statusText": "You should have the FLU vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "36c8036a-3e35-40ec-9572-5f82f00e067a" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-427_006.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_006.json new file mode 100644 index 00000000..9340e64b --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-427_006.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:43:55.970331+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEli", + "actionType": "", + "description": "TestNotEli Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "eli_427_cohort_group_1", + "cohortStatus": "NotEligible", + "cohortText": "Not in eli_427_cohort_1" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "d5f9af16-453e-45c5-947f-dc2de44d5109" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-440_001.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_001.json new file mode 100644 index 00000000..5b6e39a7 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_001.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T13:10:10.614854+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "elid_virtual_cohort", + "cohortStatus": "Actionable", + "cohortText": "In elid_virtual_cohort" + }, + { + "cohortCode": "elid_virtual_cohort_3", + "cohortStatus": "Actionable", + "cohortText": "In elid_virtual_cohort_3" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "09fe3425-cc1d-4d37-99c5-d65dc232cae4" +} diff --git a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_002.json similarity index 61% rename from data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json rename to data/responses/storyTestResponses/AUTO_RSV_ELI-440_002.json index d49216aa..3f3ce31d 100644 --- a/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_002.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-08-11T20:39:19.034500+00:00" + "lastUpdated": "2025-09-16T12:50:45.738791+00:00" }, "processedSuggestions": [ { @@ -16,14 +16,14 @@ "condition": "RSV", "eligibilityCohorts": [ { - "cohortCode": "rsv_eli_376_cohort_group", + "cohortCode": "elid_virtual_cohort", "cohortStatus": "NotEligible", - "cohortText": "are not a member of eli_376_cohort_group_0" + "cohortText": "Out elid_virtual_cohort" }, { - "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortCode": "elid_virtual_cohort_2", "cohortStatus": "NotEligible", - "cohortText": "are not a member of eli_376_cohort_group_other" + "cohortText": "Out elid_virtual_cohort_2" } ], "status": "NotEligible", @@ -31,5 +31,5 @@ "suitabilityRules": [] } ], - "responseId": "9d6c58d5-b36d-4f93-be8b-e5ed5e9da570" + "responseId": "a3e00f89-5be5-4413-aa58-c4e8116f89ef" } diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-440_003.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_003.json new file mode 100644 index 00000000..96e8c08b --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_003.json @@ -0,0 +1,46 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T13:23:05.834482+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "elid_virtual_cohort", + "cohortStatus": "NotActionable", + "cohortText": "In elid_virtual_cohort" + }, + { + "cohortCode": "elid_virtual_cohort_2", + "cohortStatus": "NotActionable", + "cohortText": "In elid_virtual_cohort_2" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination.", + "ruleType": "S" + }, + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "8dd952eb-a464-432b-9e14-9c08c4a993e8" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-440_005.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_005.json new file mode 100644 index 00000000..5235bc60 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_005.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:03:42.734055+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_real_world", + "cohortStatus": "Actionable", + "cohortText": "In rsv_eli_real_world" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ab6deb80-2ef6-41b8-b04c-8c0d235e0d42" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-440_006.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_006.json new file mode 100644 index 00000000..5235bc60 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_006.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:03:42.734055+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_real_world", + "cohortStatus": "Actionable", + "cohortText": "In rsv_eli_real_world" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ab6deb80-2ef6-41b8-b04c-8c0d235e0d42" +} diff --git a/data/responses/storyTestResponses/AUTO_RSV_ELI-440_007.json b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_007.json new file mode 100644 index 00000000..605ac519 --- /dev/null +++ b/data/responses/storyTestResponses/AUTO_RSV_ELI-440_007.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-09-16T14:03:42.734055+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestAction", + "actionType": "ButtonWithAuthLink", + "description": "TestAction Description", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_real_world", + "cohortStatus": "Actionable", + "cohortText": "In rsv_eli_real_world" + }, + { + "cohortCode": "elid_virtual_cohort_2", + "cohortStatus": "Actionable", + "cohortText": "In elid_virtual_cohort_2" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ab6deb80-2ef6-41b8-b04c-8c0d235e0d42" +} diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json index 61e94390..3d1094c7 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json @@ -1,28 +1,35 @@ { "meta": { - "lastUpdated": "2025-07-31T15:33:02.541065+00:00" + "lastUpdated": "2025-09-05T15:10:53.120938+00:00" }, "processedSuggestions": [ { "actions": [ { - "actionCode": "BookLocal", + "actionCode": "ContactGP", "actionType": "InfoText", - "description": "##Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", + "description": "## Get vaccinated at your GP practice\n\nContact your GP surgery to book an appointment.", "urlLabel": "", "urlLink": "" }, { - "actionCode": "BookNBS", - "actionType": "ButtonWithAuthLink", - "description": "", + "actionCode": "BookNBSInfoText", + "actionType": "ButtonWithAuthLinkWithInfoText", + "description": "## Book an appointment online at a pharmacy\n\nYou can book an appointment online at a pharmacy that offers the RSV vaccination. You need to be registered with a GP to do this.", "urlLabel": "Continue to booking", - "urlLink": "http://www.nhs.uk/book-rsv" + "urlLink": "https://f.nhswebsite-integration.nhs.uk/nbs/nhs-app/rsv" + }, + { + "actionCode": "WalkIn", + "actionType": "ActionLinkWithInfoText", + "description": "## Get vaccinated without an appointment\n\nYou can get an RSV vaccination at some pharmacies without needing an appointment.\n\nYou do not need to be registered with a GP to do this.", + "urlLabel": "Find a pharmacy where you can get a free RSV vaccination", + "urlLink": "https://www.nhs.uk/service-search/vaccination-and-booking-services/find-a-pharmacy-where-you-can-get-a-free-rsv-vaccination" }, { "actionCode": "HelpSupportInfo", "actionType": "InfoText", - "description": "## CONTENT TBC\n\nBlah blah blah.", + "description": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "urlLabel": "", "urlLink": "" } @@ -32,7 +39,7 @@ { "cohortCode": "rsv_age", "cohortStatus": "Actionable", - "cohortText": "are aged 75 to 79 years old" + "cohortText": "are aged between 75 and 79" } ], "status": "Actionable", @@ -40,5 +47,5 @@ "suitabilityRules": [] } ], - "responseId": "da7c72bb-0a3e-47c1-a4c6-12a7994c4f31" + "responseId": "6dee29a7-3419-48f0-9f10-2a8a0caf79ea" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json index e75e4213..e730c3c3 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-07-31T15:34:16.758583+00:00" + "lastUpdated": "2025-08-29T15:27:30.337860+00:00" }, "processedSuggestions": [ { @@ -8,14 +8,7 @@ { "actionCode": "BookLocal", "actionType": "InfoText", - "description": "##Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", - "urlLabel": "", - "urlLink": "" - }, - { - "actionCode": "HelpSupportInfo", - "actionType": "InfoText", - "description": "## CONTENT TBC\n\nBlah blah blah.", + "description": "## Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\n\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", "urlLabel": "", "urlLink": "" } @@ -25,7 +18,7 @@ { "cohortCode": "rsv_age", "cohortStatus": "Actionable", - "cohortText": "are aged 75 to 79 years old" + "cohortText": "are aged between 75 and 79" } ], "status": "Actionable", @@ -33,5 +26,5 @@ "suitabilityRules": [] } ], - "responseId": "04e12c58-86a4-46e9-a6ef-d640eb9a8e94" + "responseId": "db3354f3-2388-48cf-be82-b32270be2c33" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json index ff2e37c6..878429f7 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-07-31T15:35:30.455708+00:00" + "lastUpdated": "2025-08-29T15:36:03.086801+00:00" }, "processedSuggestions": [ { @@ -8,14 +8,7 @@ { "actionCode": "BookLocal", "actionType": "InfoText", - "description": "##Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", - "urlLabel": "", - "urlLink": "" - }, - { - "actionCode": "HelpSupportInfo", - "actionType": "InfoText", - "description": "## CONTENT TBC\n\nBlah blah blah.", + "description": "## Getting the vaccine\n\nYou can get an RSV vaccination at your GP surgery.\n\nYour GP surgery may contact you about getting the RSV vaccine. This may be by letter, text, phone call, email or through the NHS App. You do not need to wait to be contacted before booking your vaccination.", "urlLabel": "", "urlLink": "" } @@ -33,5 +26,5 @@ "suitabilityRules": [] } ], - "responseId": "ad2f0a17-938a-423f-a2c7-82cfda58ced9" + "responseId": "d149d5a0-fd89-4015-80db-c249ab8a324f" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json index 63326278..c34de8c0 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json @@ -8,7 +8,7 @@ { "actionCode": "AmendNBS", "actionType": "ButtonWithAuthLink", - "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "description": "## You have an RSV vaccination appointment booked\n\nYou can view, change or cancel your appointment below.", "urlLabel": "Manage your appointment", "urlLink": "http://www.nhs.uk/book-rsv" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json index af3da5ed..de0097fe 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json @@ -8,7 +8,7 @@ { "actionCode": "ManageLocal", "actionType": "CardWithText", - "description": "##You have an RSV vaccination appointment\n\nContact your healthcare provider to change or cancel your appointment.", + "description": "## You have an RSV vaccination appointment booked\n\nTo change or cancel your appointment, contact the provider you booked it with.", "urlLabel": "", "urlLink": "" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json index 2272fda9..71de20a7 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json @@ -8,7 +8,7 @@ { "actionCode": "AlreadyVaccinatedInfo", "actionType": "InfoText", - "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our help and support page. (ADD LINK).", + "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "urlLabel": "", "urlLink": "" } @@ -19,8 +19,8 @@ "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "Already Vaccinated", - "ruleText": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination\n\nWe believe you were vaccinated against RSV on 3 April 2025.", "ruleType": "S" } ] diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json index 1629b915..f088108d 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json @@ -10,7 +10,7 @@ { "cohortCode": "rsv_age", "cohortStatus": "NotActionable", - "cohortText": "are aged 75 to 79 years old" + "cohortText": "are aged between 75 and 79" } ], "status": "NotActionable", diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json deleted file mode 100644 index 8c12bd37..00000000 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "scenario_name": "RSV - Vita Integration - NotActionable - empty suggestions - fallback to static", - "request_headers": { - "nhs-login-nhs-number": "9658219004" - }, - "config_filename": "vita_integration_test_config.json", - "data": [ - { - "NHS_NUMBER": "9658219004", - "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MEMBERSHIPS": [ - { - "COHORT_LABEL": "rsv_75_rolling", - "DATE_JOINED": "20231020" - } - ] - }, - { - "NHS_NUMBER": "9658219004", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19500601", - "GENDER": "2", - "POSTCODE": "CB3 8DX", - "POSTCODE_SECTOR": "CB38", - "POSTCODE_OUTCODE": "CB3", - "MSOA": "E02007085", - "LSOA": "E01018223", - "GP_PRACTICE_CODE": "D81046", - "PCN": "U75549", - "ICB": "QUE", - "COMMISSIONING_REGION": "Y61", - "13Q_FLAG": "N", - "CARE_HOME_FLAG": "N", - "DE_FLAG": "N" - } - ] -} diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json index 82fab2ff..c4bb0f71 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json @@ -10,7 +10,7 @@ { "cohortCode": "rsv_age", "cohortStatus": "NotActionable", - "cohortText": "are aged 75 to 79 years old" + "cohortText": "are aged between 75 and 79" } ], "status": "NotActionable", diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_010.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_010.json new file mode 100644 index 00000000..7a493b8b --- /dev/null +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_010.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T08:09:38.885621+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged between 75 and 79" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "TooClose", + "ruleText": "##You have recently have the RSV vaccination\n\nYou must leave 90 days between doses of the RSV vaccine. Please try again soon.", + "ruleType": "S" + } + ] + } + ], + "responseId": "ef603f99-9a14-4f5e-8f54-d071201d478e" +} diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json index 698ff986..db005a77 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json @@ -1,28 +1,36 @@ { "meta": { - "lastUpdated": "2025-08-01T08:09:38.885621+00:00" + "lastUpdated": "2025-09-05T14:51:57.234910+00:00" }, "processedSuggestions": [ { - "actions": [], + "actions": [ + { + "actionCode": "ManagedSettingInfo", + "actionType": "InfoText", + "description": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", + "urlLabel": "", + "urlLink": "" + } + ], "condition": "RSV", "eligibilityCohorts": [ { "cohortCode": "rsv_age", "cohortStatus": "NotActionable", - "cohortText": "are aged 75 to 79 years old" + "cohortText": "are aged between 75 and 79" } ], "status": "NotActionable", "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "TooClose", - "ruleText": "##You have recently have the RSV vaccination\n\nYou must leave 90 days between doses of the RSV vaccine. Please try again soon.", + "ruleCode": "OtherSetting", + "ruleText": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", "ruleType": "S" } ] } ], - "responseId": "ef603f99-9a14-4f5e-8f54-d071201d478e" + "responseId": "68e372d6-cc59-41c9-a6ad-b2cdf9b25bdb" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json index 5ca38ff4..36e1969a 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json @@ -1,36 +1,30 @@ { "meta": { - "lastUpdated": "2025-08-01T08:10:25.890939+00:00" + "lastUpdated": "2025-08-29T16:02:53.910473+00:00" }, "processedSuggestions": [ { "actions": [ { - "actionCode": "ManagedSettingInfo", + "actionCode": "AlreadyVaccinatedInfo", "actionType": "InfoText", - "description": "## If you think this is incorrect\n\nIf you have already had this vaccination or your personal details are wrong, visit our help and support page. (ADD LINK).", + "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "urlLabel": "", "urlLink": "" } ], "condition": "RSV", - "eligibilityCohorts": [ - { - "cohortCode": "rsv_age", - "cohortStatus": "NotActionable", - "cohortText": "are aged 75 to 79 years old" - } - ], + "eligibilityCohorts": [], "status": "NotActionable", "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "Other Setting", - "ruleText": "## Getting the vaccine\n\nWe believe you're living in a setting where care is provided.\n\nSpeak to a member of staff where you live about getting the RSV vaccine.", + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination\n\nWe believe you were vaccinated against RSV on 3 April 2025.", "ruleType": "S" } ] } ], - "responseId": "2effe07d-747b-4288-84ef-9b7770dc7430" + "responseId": "c999bfc5-48b1-44f0-9e99-58d4c4ca495b" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json index 03870ebd..94ef8120 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json @@ -1,6 +1,6 @@ { "meta": { - "lastUpdated": "2025-08-01T08:11:38.412584+00:00" + "lastUpdated": "2025-08-29T16:07:13.490700+00:00" }, "processedSuggestions": [ { @@ -8,7 +8,7 @@ { "actionCode": "AlreadyVaccinatedInfo", "actionType": "InfoText", - "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our help and support page. (ADD LINK).", + "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "urlLabel": "", "urlLink": "" } @@ -19,12 +19,12 @@ "statusText": "You should have the RSV vaccine", "suitabilityRules": [ { - "ruleCode": "Already Vaccinated", - "ruleText": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "ruleCode": "AlreadyVaccinated", + "ruleText": "## You've had your RSV vaccination\n\nWe believe you were vaccinated against RSV on 3 April 2025.", "ruleType": "S" } ] } ], - "responseId": "970bede3-4428-4456-9f4f-f1bf73c16953" + "responseId": "15eeb2a1-d6d2-465e-8f09-5701000725ac" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json index 03870ebd..165448c6 100644 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json +++ b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json @@ -1,30 +1,35 @@ { "meta": { - "lastUpdated": "2025-08-01T08:11:38.412584+00:00" + "lastUpdated": "2025-08-29T16:08:57.918587+00:00" }, "processedSuggestions": [ { "actions": [ { - "actionCode": "AlreadyVaccinatedInfo", + "actionCode": "HealthcareProInfo", "actionType": "InfoText", - "description": "## If you think this is incorrect\n\nIf you believe you've not been vaccinated against RSV, speak to your healthcare professional.\n\nFor anything else please see our help and support page. (ADD LINK).", + "description": "## If you think this is incorrect\n\nSpeak to your healthcare professional if you think you should be offered this vaccine.\n\nFor anything else, visit our [help and support page](https://www.nhs.uk/nhs-app/nhs-app-help-and-support/).", "urlLabel": "", "urlLink": "" } ], "condition": "RSV", - "eligibilityCohorts": [], - "status": "NotActionable", - "statusText": "You should have the RSV vaccine", - "suitabilityRules": [ + "eligibilityCohorts": [ { - "ruleCode": "Already Vaccinated", - "ruleText": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", - "ruleType": "S" + "cohortCode": "rsv_age", + "cohortStatus": "NotEligible", + "cohortText": "are not aged 75 to 79" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "NotEligible", + "cohortText": "did not turn 80 after 1 September 2024" } - ] + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] } ], - "responseId": "970bede3-4428-4456-9f4f-f1bf73c16953" + "responseId": "7ca07f73-f8be-4449-9f88-e6c06675cdad" } diff --git a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json b/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json deleted file mode 100644 index 8c1d5607..00000000 --- a/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "meta": { - "lastUpdated": "2025-08-01T08:12:24.020848+00:00" - }, - "processedSuggestions": [ - { - "actions": [ - { - "actionCode": "HealthcareProInfo", - "actionType": "InfoText", - "description": "## If you think this is incorrect\n\nSpeak to your healthcare professional if you think you should be offered this vaccine.\n\nFor anything else, visit our help and support page. (ADD LINK)", - "urlLabel": "", - "urlLink": "" - } - ], - "condition": "RSV", - "eligibilityCohorts": [ - { - "cohortCode": "rsv_age", - "cohortStatus": "NotEligible", - "cohortText": "are not aged 75 to 79 years old" - }, - { - "cohortCode": "rsv_age_catchup", - "cohortStatus": "NotEligible", - "cohortText": "did not turn 80 after 1 September 2024" - } - ], - "status": "NotEligible", - "statusText": "We do not believe you can have it", - "suitabilityRules": [] - } - ], - "responseId": "b79bdab6-ce92-4bea-90c4-eabf3b4adc90" -} diff --git a/package-lock.json b/package-lock.json index 9aed8ee6..7c95253d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3495,7 +3495,6 @@ "version": "5.6.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -4333,7 +4332,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, "license": "ISC" }, "node_modules/handlebars": { @@ -4362,7 +4360,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -4395,7 +4392,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^10.0.1" @@ -4505,9 +4501,9 @@ } }, "node_modules/index-to-position": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", - "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", + "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==", "dev": true, "license": "MIT", "engines": { @@ -4528,7 +4524,6 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, "license": "ISC" }, "node_modules/into-stream": { @@ -4635,7 +4630,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, "license": "ISC" }, "node_modules/issue-parser": { @@ -4696,7 +4690,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, "license": "MIT" }, "node_modules/jsonfile": { @@ -4816,7 +4809,6 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, "license": "ISC" }, "node_modules/marked": { @@ -4931,7 +4923,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -4980,7 +4971,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^7.0.0", @@ -7564,7 +7554,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -8038,7 +8027,6 @@ "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -8253,7 +8241,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "spdx-expression-parse": "^3.0.0", @@ -8264,14 +8251,12 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", @@ -8282,7 +8267,6 @@ "version": "3.0.22", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", - "dev": true, "license": "CC0-1.0" }, "node_modules/split2": { @@ -8408,7 +8392,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -8717,7 +8700,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, "license": "Apache-2.0", "dependencies": { "spdx-correct": "^3.0.0", @@ -8728,7 +8710,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" diff --git a/poetry.lock b/poetry.lock index df761064..9a972d60 100644 --- a/poetry.lock +++ b/poetry.lock @@ -377,7 +377,7 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["main"] -markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" +markers = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -1166,14 +1166,14 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pydantic-settings" -version = "2.10.1" +version = "2.11.0" description = "Settings management using Pydantic" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic_settings-2.10.1-py3-none-any.whl", hash = "sha256:a60952460b99cf661dc25c29c0ef171721f98bfcb52ef8d9ea4c943d7c8cc796"}, - {file = "pydantic_settings-2.10.1.tar.gz", hash = "sha256:06f0062169818d0f5524420a360d632d5857b83cffd4d42fe29597807a1614ee"}, + {file = "pydantic_settings-2.11.0-py3-none-any.whl", hash = "sha256:fe2cea3413b9530d10f3a5875adffb17ada5c1e1bab0b2885546d7310415207c"}, + {file = "pydantic_settings-2.11.0.tar.gz", hash = "sha256:d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180"}, ] [package.dependencies] @@ -1365,65 +1365,78 @@ dev = ["black", "build", "mypy", "pytest", "pytest-cov", "setuptools", "tox", "t [[package]] name = "pyyaml" -version = "6.0.2" +version = "6.0.3" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, - {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, - {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, - {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, - {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, - {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, - {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, - {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, - {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, - {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, - {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, - {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, - {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, - {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, - {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, - {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, - {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, + {file = "pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b"}, + {file = "pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b"}, + {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0"}, + {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69"}, + {file = "pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e"}, + {file = "pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c"}, + {file = "pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e"}, + {file = "pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d"}, + {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a"}, + {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4"}, + {file = "pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b"}, + {file = "pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf"}, + {file = "pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196"}, + {file = "pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc"}, + {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e"}, + {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea"}, + {file = "pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5"}, + {file = "pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b"}, + {file = "pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd"}, + {file = "pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8"}, + {file = "pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6"}, + {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6"}, + {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be"}, + {file = "pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26"}, + {file = "pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c"}, + {file = "pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb"}, + {file = "pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac"}, + {file = "pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5"}, + {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764"}, + {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35"}, + {file = "pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac"}, + {file = "pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3"}, + {file = "pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3"}, + {file = "pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c"}, + {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065"}, + {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65"}, + {file = "pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9"}, + {file = "pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b"}, + {file = "pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da"}, + {file = "pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a"}, + {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926"}, + {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7"}, + {file = "pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0"}, + {file = "pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007"}, + {file = "pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"}, ] [[package]] diff --git a/tests/conftest.py b/tests/conftest.py index 5c27bba1..2a87341f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,18 +6,9 @@ from dotenv import load_dotenv from utils.eligibility_api_client import EligibilityApiClient -from utils.s3_config_manager import upload_configs_to_s3 +from utils.s3_config_manager import upload_configs_to_s3, delete_all_configs_from_s3 -# Load environment variables from .env.local -load_dotenv(dotenv_path=".env") - -# Constants -BASE_URL = os.getenv( - "BASE_URL", "https://test.eligibility-signposting-api.nhs.uk/patient-check" -) -# API_KEY = os.getenv("API_KEY", "") -DYNAMODB_TABLE_NAME = os.getenv("DYNAMODB_TABLE_NAME", "eligibility_data_store") -# AWS_REGION = os.getenv("AWS_REGION", "eu-west-2") +load_dotenv() # Resolve test data path robustly BASE_DIR = Path(__file__).resolve().parent.parent @@ -26,12 +17,65 @@ logger = logging.getLogger(__name__) +def pytest_addoption(parser): + parser.addoption( + "--env", + required=True, + action="store", + default="", + help="Specify the environment for testing: 'dev', 'test' or 'preprod'", + ) + + +def pytest_configure(config): + env = config.getoption("--env").lower() + assert env in [ + "dev", + "test", + "preprod", + ], f"env must be dev, test, or preprod but was: {env}" + + logger.info(f"Setting environment variables for: {env}") + os.environ["ENVIRONMENT"] = env + os.environ["BASE_URL"] = ( + f"https://{env}.eligibility-signposting-api.nhs.uk/patient-check/" + ) + os.environ["S3_BUCKET_NAME"] = f"eligibility-signposting-api-{env}-eli-rules" + os.environ["SSM_PARAM_KEY_FILE"] = f"/{env}/mtls/api_private_key_cert" + os.environ["SSM_PARAM_CLIENT_CERT"] = f"/{env}/mtls/api_client_cert" + os.environ["SSM_PARAM_CA_CERT"] = f"/{env}/mtls/api_ca_cert" + os.environ["DYNAMODB_TABLE_NAME"] = ( + f"eligibility-signposting-api-{env}-eligibility_datastore" + ) + + assert os.getenv("BASE_URL") is not None, "BASE_URL must be set" + assert os.getenv("S3_BUCKET_NAME") is not None, "S3_BUCKET_NAME must be set" + assert os.getenv("SSM_PARAM_KEY_FILE") is not None, "SSM_PARAM_KEY_FILE must be set" + assert ( + os.getenv("SSM_PARAM_CLIENT_CERT") is not None + ), "SSM_PARAM_CLIENT_CERT must be set" + assert os.getenv("SSM_PARAM_CA_CERT") is not None, "SSM_PARAM_CA_CERT must be set" + assert ( + os.getenv("DYNAMODB_TABLE_NAME") is not None + ), "DYNAMODB_TABLE_NAME must be set" + + logger.debug(f"Environment variables for the {env.upper()} environment:") + logger.debug(f"ENVIRONMENT {os.getenv("ENVIRONMENT")}") + logger.debug(f"BASE_URL: {os.getenv("BASE_URL")}") + logger.debug(f"S3_BUCKET_NAME: {os.getenv("S3_BUCKET_NAME")}") + logger.debug(f"SSM_PARAM_KEY_FILE: {os.getenv("SSM_PARAM_KEY_FILE")}") + logger.debug(f"SSM_PARAM_CLIENT_CERT: {os.getenv("SSM_PARAM_CLIENT_CERT")}") + logger.debug(f"SSM_PARAM_CA_CERT: {os.getenv("SSM_PARAM_CA_CERT")}") + logger.debug(f"DYNAMODB_TABLE_NAME: {os.getenv("DYNAMODB_TABLE_NAME")}") + return + + @pytest.fixture(scope="session") def eligibility_client(): - return EligibilityApiClient(BASE_URL, cert_dir="certs") + return EligibilityApiClient(cert_dir="certs") -@pytest.fixture +@pytest.fixture(scope="session") def get_scenario_params(request): _ = request @@ -42,6 +86,7 @@ def _setup(scenario, config_path): query_params = scenario.get("query_params", {}) expected_response_code = scenario["expected_response_code"] + delete_all_configs_from_s3() upload_configs_to_s3(config_filenames, config_path) return ( diff --git a/tests/test_regression_tests.py b/tests/test_regression_tests.py deleted file mode 100644 index d9380ec3..00000000 --- a/tests/test_regression_tests.py +++ /dev/null @@ -1,46 +0,0 @@ -import http - -import pytest - -from tests import test_config -from utils.data_helper import initialise_tests, load_all_expected_responses - -# Update the below with the configuration values specified in test_config.py -all_data, dto = initialise_tests(test_config.REGRESSION_TEST_DATA) -all_expected_responses = load_all_expected_responses(test_config.REGRESSION_RESPONSES) -config_path = test_config.REGRESSION_CONFIGS - -param_list = list(all_data.items()) -id_list = [ - f"{filename} - {scenario.get('scenario_name', 'No Scenario')}" - for filename, scenario in param_list -] - - -@pytest.mark.functionale2eregression -@pytest.mark.parametrize(("filename", "scenario"), param_list, ids=id_list) -def test_run_regression_tests( - filename, scenario, eligibility_client, get_scenario_params -): - ( - nhs_number, - config_filenames, - request_headers, - query_params, - expected_response_code, - ) = get_scenario_params(scenario, config_path) - - actual_response = eligibility_client.make_request( - nhs_number, headers=request_headers, strict_ssl=False - ) - expected_response = all_expected_responses.get(filename).get("response_items", {}) - - expected_response_code = expected_response_code or http.HTTPStatus.OK - - assert actual_response["status_code"] == expected_response_code - assert actual_response["body"] == expected_response, ( - f"\n❌ Mismatch in test: {filename}\n" - f"NHS Number: {nhs_number}\n" - f"Expected: {expected_response}\n" - f"Actual: {actual_response}\n" - ) diff --git a/tests/test_smoke_tests.py b/tests/test_smoke_tests.py deleted file mode 100644 index db7d7536..00000000 --- a/tests/test_smoke_tests.py +++ /dev/null @@ -1,44 +0,0 @@ -import http - -import pytest - -from tests import test_config -from utils.data_helper import initialise_tests, load_all_expected_responses - -# Update the below with the configuration values specified in test_config.py -all_data, dto = initialise_tests(test_config.SMOKE_TEST_DATA) -all_expected_responses = load_all_expected_responses(test_config.SMOKE_TEST_RESPONSES) -config_path = test_config.SMOKE_TEST_CONFIGS - -param_list = list(all_data.items()) -id_list = [ - f"{filename} - {scenario.get('scenario_name', 'No Scenario')}" - for filename, scenario in param_list -] - - -@pytest.mark.sandboxtests -@pytest.mark.parametrize(("filename", "scenario"), param_list, ids=id_list) -def test_run_smoke_case(filename, scenario, eligibility_client, get_scenario_params): - ( - nhs_number, - config_filenames, - request_headers, - query_params, - expected_response_code, - ) = get_scenario_params(scenario, config_path) - - actual_response = eligibility_client.make_request( - nhs_number, headers=request_headers, query_params=query_params, strict_ssl=False - ) - expected_response = all_expected_responses.get(filename).get("response_items", {}) - - expected_response_code = expected_response_code or http.HTTPStatus.OK - - assert actual_response["status_code"] == expected_response_code - assert actual_response["body"] == expected_response, ( - f"\n❌ Mismatch in test: {filename}\n" - f"NHS Number: {nhs_number}\n" - f"Expected: {expected_response}\n" - f"Actual: {actual_response}\n" - ) diff --git a/utils/credential_helper.py b/utils/credential_helper.py deleted file mode 100644 index ccb47a7c..00000000 --- a/utils/credential_helper.py +++ /dev/null @@ -1,18 +0,0 @@ -import logging - -import boto3 - -logger = logging.getLogger(__name__) - - -class AWSSession: - def __init__(self, environment): - # Create DynamoDB resource using credentials from env - self.session = boto3.session.Session(profile_name=environment) - self.credentials = self.session.get_credentials() - self.access_key = self.credentials.access_key - self.secret_key = self.credentials.secret_key - self.token = self.credentials.token - - def get_session(self): - return self.session diff --git a/utils/data_helper.py b/utils/data_helper.py index e3a1199f..263f5d85 100644 --- a/utils/data_helper.py +++ b/utils/data_helper.py @@ -1,21 +1,27 @@ import json +import logging from pathlib import Path -from .dynamo_helper import insert_into_dynamo +from dotenv import load_dotenv + +from .dynamo_helper import insert_into_dynamo, reset_dynamo_tables from .placeholder_context import PlaceholderDTO, ResolvedPlaceholderContext from .placeholder_utils import resolve_placeholders keys_to_ignore = ["responseId", "lastUpdated", "id"] +load_dotenv() +logger = logging.getLogger(__name__) def initialise_tests(folder): folder_path = Path(folder).resolve() all_data, dto = load_all_test_scenarios(folder_path) - # Insert to Dynamo (placeholder) + reset_dynamo_tables() + logger.info("Adding data into Dynamo") for scenario in all_data.values(): insert_into_dynamo(scenario["dynamo_items"]) - + logger.info("Data Added to Dynamo") return all_data, dto diff --git a/utils/dynamo_helper.py b/utils/dynamo_helper.py index f1a1f8e9..ac9ff4dd 100644 --- a/utils/dynamo_helper.py +++ b/utils/dynamo_helper.py @@ -3,17 +3,19 @@ import boto3 from botocore.exceptions import ClientError +from dotenv import load_dotenv logger = logging.getLogger(__name__) +load_dotenv() class DynamoDBHelper: def __init__(self, table_name): # Create DynamoDB resource using credentials from env - self.session = boto3.Session(profile_name="test") - self.credentials = self.session.get_credentials() - self.dynamodb = self.session.resource("dynamodb") - self.table = self.dynamodb.Table(table_name) + self.table_name = table_name + self.dynamodb_client = boto3.client("dynamodb", "eu-west-2") + self.dynamodb_resource = boto3.resource("dynamodb", "eu-west-2") + self.table = self.dynamodb_resource.Table(table_name) def insert_item(self, item: dict): """ @@ -55,14 +57,114 @@ def get_item(self, key: dict): else: return response.get("Item") + def delete_item(self, key: dict): + """ + delete a single item by primary key. + """ + try: + response = self.table.delete(Key=key) + except ClientError as e: + logger.exception( + "Failed to delete item: %s", e.response["Error"]["Message"] + ) + raise + else: + return response + + def get_table_information(self): + logger.debug(f"Describe table: {self.table_name}") + try: + table_description = self.dynamodb_client.describe_table( + TableName=self.table_name + ) + except ClientError as e: + logger.exception( + f"Failed to get table information: {e.response["Error"]["Message"]}" + ) + raise + table_arn = table_description["Table"]["TableArn"] + return table_description, table_arn + + +def reset_dynamo_tables(): + environment = os.getenv("ENVIRONMENT") + logger.info("Resetting DynamoDB. This may take a few moments, please be patient.") + if environment not in ["dev", "test"]: + logger.warning( + f"{environment} is not supported. Resetting DynamoDB is only supported in dev or test." + ) + return + dynamo_db_table = DynamoDBHelper(os.getenv("DYNAMODB_TABLE_NAME")) + table_name = dynamo_db_table.table_name + + # --- Step 1: Fetch table information --- + table_description, table_arn = dynamo_db_table.get_table_information() + key_schema = table_description["Table"]["KeySchema"] + logger.debug(f"KeySchema: {key_schema}") + attribute_definitions = table_description["Table"]["AttributeDefinitions"] + logger.debug(f"attribute_definitions: {attribute_definitions}") + tags = dynamo_db_table.dynamodb_client.list_tags_of_resource(ResourceArn=table_arn) + logger.debug(f"tags: {tags}") + # --- Step 2: Delete the table --- + try: + logger.info(f"Deleting table '{table_name}'...") + dynamo_db_table.dynamodb_client.delete_table(TableName=table_name) + + # Wait for the table to be completely deleted + logger.debug( + f"Waiting for table '{dynamo_db_table.table_name}' to be deleted..." + ) + waiter = dynamo_db_table.dynamodb_client.get_waiter("table_not_exists") + waiter.wait(TableName=dynamo_db_table.table_name) + logger.info(f"Table '{dynamo_db_table.table_name}' successfully deleted.") + + except ClientError as e: + if e.response["Error"]["Code"] == "ResourceNotFoundException": + logger.warning( + f"Table '{dynamo_db_table.table_name}' does not exist. Skipping deletion." + ) + else: + logger.exception( + f"Error deleting table '{dynamo_db_table.table_name}': {e}" + ) + return + + # --- Step 3: Recreate the table --- + logger.info(f"Creating table '{dynamo_db_table.table_name}'...") + try: + dynamo_db_table.dynamodb_client.create_table( + TableName=dynamo_db_table.table_name, + KeySchema=key_schema, + AttributeDefinitions=attribute_definitions, + BillingMode="PAY_PER_REQUEST", + ) + + # Wait for the new table to become active + logger.debug( + f"Waiting for table '{dynamo_db_table.table_name}' to be created and become active..." + ) + waiter = dynamo_db_table.dynamodb_client.get_waiter("table_exists") + waiter.wait(TableName=dynamo_db_table.table_name) + logger.info( + f"Table '{dynamo_db_table.table_name}' successfully created and is now active." + ) + except ClientError as e: + logger.exception(f"Error creating table '{dynamo_db_table.table_name}': {e}") + + # --- Step 4: Restore the tags --- + logger.debug(f"restoring tags to table '{dynamo_db_table.table_name}'...") + dynamo_db_table.dynamodb_client.tag_resource( + ResourceArn=table_arn, Tags=tags["Tags"] + ) + def insert_into_dynamo(data): - logger.info("Inserting into Dynamo: %s", data) + logger.debug("Inserting into Dynamo: %s", data) table = DynamoDBHelper(os.getenv("DYNAMODB_TABLE_NAME")) for item in data: try: table.insert_item(item) - logger.info("✅ Inserted: %s", item) + logger.debug("✅ Inserted: %s", item) except ClientError as e: logger.exception( "❌ Failed to insert %s: %s", item, e.response["Error"]["Message"] diff --git a/utils/eligibility_api_client.py b/utils/eligibility_api_client.py index f1018dd9..2e2d0065 100644 --- a/utils/eligibility_api_client.py +++ b/utils/eligibility_api_client.py @@ -1,4 +1,5 @@ import json +import os from pathlib import Path from typing import Any @@ -7,19 +8,15 @@ from botocore.exceptions import ClientError from dotenv import load_dotenv from requests import Response - from utils.data_helper import clean_responses ignore_keys = ["lastUpdated", "responseId", "id"] +load_dotenv() class EligibilityApiClient: - def __init__(self, api_url: str, cert_dir: str = "tests/e2e/certs") -> None: - load_dotenv(dotenv_path=Path(__file__).resolve().parent / "../.env") - - self.api_url: str = api_url - self.session = boto3.session.Session(profile_name="test") - + def __init__(self, cert_dir: str = "tests/certs") -> None: + self.api_url: str = os.getenv("BASE_URL") self.cert_dir: Path = Path(cert_dir) self.cert_dir.mkdir(parents=True, exist_ok=True) @@ -30,16 +27,16 @@ def __init__(self, api_url: str, cert_dir: str = "tests/e2e/certs") -> None: } self.ssm_params: dict[str, str] = { - "private_key": "/test/mtls/api_private_key_cert", - "client_cert": "/test/mtls/api_client_cert", - "ca_cert": "/test/mtls/api_ca_cert", + "private_key": os.getenv("SSM_PARAM_KEY_FILE"), + "client_cert": os.getenv("SSM_PARAM_CLIENT_CERT"), + "ca_cert": os.getenv("SSM_PARAM_CA_CERT"), } self._ensure_certs_present() def _get_ssm_parameter(self, param_name: str, *, decrypt: bool = True) -> str: try: - client = self.session.client("ssm") + client = boto3.client("ssm") response = client.get_parameter(Name=param_name, WithDecryption=decrypt) return response["Parameter"]["Value"] except ClientError as e: diff --git a/utils/placeholder_utils.py b/utils/placeholder_utils.py index d9398e68..bdbb251d 100644 --- a/utils/placeholder_utils.py +++ b/utils/placeholder_utils.py @@ -9,23 +9,27 @@ def resolve_placeholders(value, context=None, file_name=None): - if not isinstance(value, str): - return value + """ + Replace placeholders of the form <> in a string with resolved values. + If resolution fails, the original placeholder text is left unchanged. + """ - match = re.search(r"<<(.*?)>>", value) - if not match: + if not isinstance(value, str): return value - placeholder = match.group(1) + def replacer(match): + placeholder = match.group(1) + try: + resolved = _resolve_placeholder_value(placeholder) + except Exception: + logger.exception("[ERROR] Could not resolve placeholder %s:", placeholder) + return match.group(0) # leave placeholder unchanged + else: + if context: + context.add(placeholder, resolved, file_name) + return resolved - try: - resolved = _resolve_placeholder_value(placeholder) - if context: - context.add(placeholder, resolved, file_name) - return value.replace(f"<<{placeholder}>>", resolved) - except Exception: - logger.exception("[ERROR] Could not resolve placeholder %s:", placeholder) - return value + return re.sub(r"<<(.*?)>>", replacer, value) def _resolve_placeholder_value(placeholder: str) -> str: @@ -84,5 +88,5 @@ def _resolve_age_placeholder(today: datetime, years_back: int, format_type: str) def _format_date(date: datetime, format_type: str) -> str: return ( - date.strftime("%Y%m%d") if format_type == "DATE" else date.strftime("%-d %B %Y") + date.strftime("%Y%m%d") if format_type == "DATE" else date.strftime("%d %B %Y") ) diff --git a/utils/s3_config_manager.py b/utils/s3_config_manager.py index a5abfcea..95cafd05 100644 --- a/utils/s3_config_manager.py +++ b/utils/s3_config_manager.py @@ -5,24 +5,23 @@ from pathlib import Path import boto3 -import botocore +import botocore.exceptions from dotenv import load_dotenv from utils.data_helper import resolve_placeholders_in_data from utils.placeholder_context import PlaceholderDTO -load_dotenv(dotenv_path=".env") +load_dotenv() logger = logging.getLogger(__name__) class S3ConfigManager: - def __init__(self, bucket_name: str, s3_prefix: str = "") -> None: + def __init__(self, bucket_name: str) -> None: self.bucket_name: str = bucket_name - self.s3_prefix: str = s3_prefix - self.s3_client = boto3.session.Session(profile_name="test").client("s3") + self.s3_client = boto3.client("s3") def _s3_key(self, filename: str) -> str: - return str(Path(self.s3_prefix) / filename) + return str(Path() / filename) def _calculate_file_hash(self, file_path: Path) -> str: """Return SHA256 hash of the given file.""" @@ -38,40 +37,31 @@ def upload_if_missing_or_changed(self, local_path: Path) -> None: try: if self.config_exists_and_matches(local_path, s3_key): - logger.info( + logger.debug( "\n🔍 Config '%s' already exists and matches in S3. Skipping upload.", filename, ) return - logger.info( - "\n🧹 A different config exists under '%s/'. Deleting all existing files...", - self.s3_prefix, - ) - self.delete_all_in_prefix() + logger.debug("🧹 A different config exists. Deleting all existing files...") + self.delete_all() except self.s3_client.exceptions.NoSuchKey: - logger.info( - "\n🆕 No config found under '%s/'. Proceeding to upload.", - self.s3_prefix, - ) + logger.debug("🆕 No config found. Proceeding to upload.") except botocore.exceptions.ClientError as error: if error.response.get("Error", {}).get("Code") == "NoSuchKey": - logger.info( - "\n🆕 No config found under '%s/'. Proceeding to upload.", - self.s3_prefix, - ) + logger.debug("🆕 No config found. Proceeding to upload.") else: raise - logger.info("⬆️ Uploading new config '%s' to S3...", filename) + logger.debug("⬆️ Uploading new config '%s' to S3...", filename) self.s3_client.upload_file(local_path, self.bucket_name, s3_key) - logger.info("📄 Uploaded to s3://%s/%s", self.bucket_name, s3_key) + logger.debug("📄 Uploaded to s3://%s/%s", self.bucket_name, s3_key) def config_exists_and_matches(self, local_path: Path, s3_key: str) -> bool: session = boto3.Session() credentials = session.get_credentials() - logger.info("AWS_ACCESS_KEY_ID = %s", credentials.access_key) - logger.info("AWS_SECRET_ACCESS_KEY = %s", credentials.secret_key) - logger.info("AWS_SESSION_TOKEN = %s", credentials.token) + assert credentials.access_key is not None, "aws_access_key_id not set" + assert credentials.secret_key is not None, "aws_secret_access_key not set" + assert credentials.token is not None, "aws_token not set" try: s3_obj = self.s3_client.get_object(Bucket=self.bucket_name, Key=s3_key) @@ -87,24 +77,18 @@ def config_exists_and_matches(self, local_path: Path, s3_key: str) -> bool: else: return s3_hash == local_hash - def delete_all_in_prefix(self) -> None: - """Delete all S3 objects under the current prefix.""" - response = self.s3_client.list_objects_v2( - Bucket=self.bucket_name, Prefix=self.s3_prefix - ) + def delete_all(self) -> None: + """Delete all S3 objects""" + response = self.s3_client.list_objects_v2(Bucket=self.bucket_name) if "Contents" in response: to_delete = [{"Key": obj["Key"]} for obj in response["Contents"]] self.s3_client.delete_objects( Bucket=self.bucket_name, Delete={"Objects": to_delete} ) - logger.info( - "🗑️ Deleted %d file(s) under prefix '%s/'.", - len(to_delete), - self.s3_prefix, - ) + logger.debug("🗑️ Deleted %d file(s).", len(to_delete)) else: - logger.info("📭 Nothing to delete under prefix '%s/'.", self.s3_prefix) + logger.warning("📭 Nothing to delete.") def upload_all_configs(self, local_paths: list[Path]) -> None: desired_filenames = [p.name for p in local_paths] @@ -121,7 +105,7 @@ def upload_all_configs(self, local_paths: list[Path]) -> None: filename = path.name s3_key = self._s3_key(filename) - logger.info("🔧 Resolving placeholders in config: %s", filename) + logger.debug("🔧 Resolving placeholders in config: %s", filename) with path.open() as f: raw_data = json.load(f) @@ -130,18 +114,18 @@ def upload_all_configs(self, local_paths: list[Path]) -> None: resolved_json_str = json.dumps(resolved, indent=2) if self.config_exists_and_matches_str(resolved_json_str, s3_key): - logger.info( + logger.warning( "✅ Config '%s' is unchanged in S3. Skipping upload.", filename ) else: - logger.info("⬆️ Uploading config '%s' to S3...", filename) + logger.debug("⬆️ Uploading config '%s' to S3...", filename) self.s3_client.put_object( Body=resolved_json_str.encode("utf-8"), Bucket=self.bucket_name, Key=s3_key, ContentType="application/json", ) - logger.info("📄 Uploaded to s3://%s/%s", self.bucket_name, s3_key) + logger.debug("📄 Uploaded to s3://%s/%s", self.bucket_name, s3_key) def config_exists_and_matches_str(self, local_json_str: str, s3_key: str) -> bool: try: @@ -152,10 +136,8 @@ def config_exists_and_matches_str(self, local_json_str: str, s3_key: str) -> boo return False def _list_existing_keys(self) -> list[str]: - """List all object keys under the current S3 prefix.""" - response = self.s3_client.list_objects_v2( - Bucket=self.bucket_name, Prefix=self.s3_prefix - ) + """List all object keys.""" + response = self.s3_client.list_objects_v2(Bucket=self.bucket_name) return [obj["Key"] for obj in response.get("Contents", [])] def _delete_keys(self, keys: list[str]) -> None: @@ -164,21 +146,21 @@ def _delete_keys(self, keys: list[str]) -> None: Bucket=self.bucket_name, Delete={"Objects": [{"Key": key} for key in keys]}, ) - logger.info("🗑️ Deleted %d obsolete file(s): %s", len(keys), keys) + logger.debug("🗑️ Deleted %d obsolete file(s): %s", len(keys), keys) def upload_config_to_s3(local_path: Path) -> None: - s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME"), os.getenv("S3_PREFIX")) + s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME")) s3_connection.upload_if_missing_or_changed(local_path) def upload_configs_to_s3(config_filenames: list[str], config_path: str | Path) -> None: config_path = Path(config_path) local_paths = [config_path / f for f in config_filenames] - s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME"), os.getenv("S3_PREFIX")) + s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME")) s3_connection.upload_all_configs(local_paths) def delete_all_configs_from_s3() -> None: - s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME"), os.getenv("S3_PREFIX")) - s3_connection.delete_all_in_prefix() + s3_connection = S3ConfigManager(os.getenv("S3_BUCKET_NAME")) + s3_connection.delete_all()