diff --git a/.gitignore b/.gitignore index b863bfb62..2f0da506e 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ sandbox/specification/* /specification/tmp/* /tests/e2e/data/out* /tests/e2e/reports/* +/tests/e2e/.temp/ +/tests/e2e/certs/ diff --git a/.tool-versions b/.tool-versions index 4ee8707ce..2bb2a6b76 100644 --- a/.tool-versions +++ b/.tool-versions @@ -3,8 +3,9 @@ terraform 1.12.1 pre-commit 4.2.0 vale 3.11.2 -poetry 2.1.3 +poetry 2.1.4 act 0.2.77 +nodejs 22.18.0 # ============================================================================== # The section below is reserved for Docker image versions. diff --git a/poetry.lock b/poetry.lock index b00cd166d..a133dd4c6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1343,6 +1343,24 @@ rpds-py = ">=0.7.1" format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] +[[package]] +name = "jsonschema-path" +version = "0.3.4" +description = "JSONSchema Spec with object-oriented paths" +optional = false +python-versions = "<4.0.0,>=3.8.0" +groups = ["dev"] +files = [ + {file = "jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8"}, + {file = "jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001"}, +] + +[package.dependencies] +pathable = ">=0.4.1,<0.5.0" +PyYAML = ">=5.1" +referencing = "<0.37.0" +requests = ">=2.31.0,<3.0.0" + [[package]] name = "jsonschema-specifications" version = "2025.4.1" @@ -1358,6 +1376,30 @@ files = [ [package.dependencies] referencing = ">=0.31.0" +[[package]] +name = "lazy-object-proxy" +version = "1.11.0" +description = "A fast and thorough lazy object proxy." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "lazy_object_proxy-1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:132bc8a34f2f2d662a851acfd1b93df769992ed1b81e2b1fda7db3e73b0d5a18"}, + {file = "lazy_object_proxy-1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:01261a3afd8621a1accb5682df2593dc7ec7d21d38f411011a5712dcd418fbed"}, + {file = "lazy_object_proxy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:090935756cc041e191f22f4f9c7fd4fe9a454717067adf5b1bbd2ce3046b556e"}, + {file = "lazy_object_proxy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:76ec715017f06410f57df442c1a8d66e6b5f7035077785b129817f5ae58810a4"}, + {file = "lazy_object_proxy-1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9a9f39098e93a63618a79eef2889ae3cf0605f676cd4797fdfd49fcd7ddc318b"}, + {file = "lazy_object_proxy-1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:ee13f67f4fcd044ef27bfccb1c93d39c100046fec1fad6e9a1fcdfd17492aeb3"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fd4c84eafd8dd15ea16f7d580758bc5c2ce1f752faec877bb2b1f9f827c329cd"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:d2503427bda552d3aefcac92f81d9e7ca631e680a2268cbe62cd6a58de6409b7"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0613116156801ab3fccb9e2b05ed83b08ea08c2517fdc6c6bc0d4697a1a376e3"}, + {file = "lazy_object_proxy-1.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:bb03c507d96b65f617a6337dedd604399d35face2cdf01526b913fb50c4cb6e8"}, + {file = "lazy_object_proxy-1.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28c174db37946f94b97a97b579932ff88f07b8d73a46b6b93322b9ac06794a3b"}, + {file = "lazy_object_proxy-1.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:d662f0669e27704495ff1f647070eb8816931231c44e583f4d0701b7adf6272f"}, + {file = "lazy_object_proxy-1.11.0-py3-none-any.whl", hash = "sha256:a56a5093d433341ff7da0e89f9b486031ccd222ec8e52ec84d0ec1cdc819674b"}, + {file = "lazy_object_proxy-1.11.0.tar.gz", hash = "sha256:18874411864c9fbbbaa47f9fc1dd7aea754c86cfde21278ef427639d1dd78e9c"}, +] + [[package]] name = "localstack" version = "4.6.0" @@ -1547,11 +1589,8 @@ files = [ {file = "lxml-5.4.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7ce1a171ec325192c6a636b64c94418e71a1964f56d002cc28122fceff0b6121"}, {file = "lxml-5.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:795f61bcaf8770e1b37eec24edf9771b307df3af74d1d6f27d812e15a9ff3872"}, {file = "lxml-5.4.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29f451a4b614a7b5b6c2e043d7b64a15bd8304d7e767055e8ab68387a8cacf4e"}, - {file = "lxml-5.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:891f7f991a68d20c75cb13c5c9142b2a3f9eb161f1f12a9489c82172d1f133c0"}, {file = "lxml-5.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa412a82e460571fad592d0f93ce9935a20090029ba08eca05c614f99b0cc92"}, - {file = "lxml-5.4.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:ac7ba71f9561cd7d7b55e1ea5511543c0282e2b6450f122672a2694621d63b7e"}, {file = "lxml-5.4.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:c5d32f5284012deaccd37da1e2cd42f081feaa76981f0eaa474351b68df813c5"}, - {file = "lxml-5.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:ce31158630a6ac85bddd6b830cffd46085ff90498b397bd0a259f59d27a12188"}, {file = "lxml-5.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:31e63621e073e04697c1b2d23fcb89991790eef370ec37ce4d5d469f40924ed6"}, {file = "lxml-5.4.0-cp37-cp37m-win32.whl", hash = "sha256:be2ba4c3c5b7900246a8f866580700ef0d538f2ca32535e991027bdaba944063"}, {file = "lxml-5.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:09846782b1ef650b321484ad429217f5154da4d6e786636c38e434fa32e94e49"}, @@ -1911,6 +1950,41 @@ files = [ {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] +[[package]] +name = "openapi-schema-validator" +version = "0.6.3" +description = "OpenAPI schema validation for Python" +optional = false +python-versions = "<4.0.0,>=3.8.0" +groups = ["dev"] +files = [ + {file = "openapi_schema_validator-0.6.3-py3-none-any.whl", hash = "sha256:f3b9870f4e556b5a62a1c39da72a6b4b16f3ad9c73dc80084b1b11e74ba148a3"}, + {file = "openapi_schema_validator-0.6.3.tar.gz", hash = "sha256:f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee"}, +] + +[package.dependencies] +jsonschema = ">=4.19.1,<5.0.0" +jsonschema-specifications = ">=2023.5.2" +rfc3339-validator = "*" + +[[package]] +name = "openapi-spec-validator" +version = "0.7.2" +description = "OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator" +optional = false +python-versions = "<4.0.0,>=3.8.0" +groups = ["dev"] +files = [ + {file = "openapi_spec_validator-0.7.2-py3-none-any.whl", hash = "sha256:4bbdc0894ec85f1d1bea1d6d9c8b2c3c8d7ccaa13577ef40da9c006c9fd0eb60"}, + {file = "openapi_spec_validator-0.7.2.tar.gz", hash = "sha256:cc029309b5c5dbc7859df0372d55e9d1ff43e96d678b9ba087f7c56fc586f734"}, +] + +[package.dependencies] +jsonschema = ">=4.18.0,<5.0.0" +jsonschema-path = ">=0.3.1,<0.4.0" +lazy-object-proxy = ">=1.7.1,<2.0.0" +openapi-schema-validator = ">=0.6.0,<0.7.0" + [[package]] name = "orderedmultidict" version = "1.0.1" @@ -1971,6 +2045,18 @@ develop = ["build (>=0.5.1)", "coverage (>=4.4)", "pylint", "pytest (<5.0) ; pyt docs = ["Sphinx (>=1.6)", "sphinx-bootstrap-theme (>=0.6.0)"] testing = ["pytest (<5.0) ; python_version < \"3.0\"", "pytest (>=5.0) ; python_version >= \"3.0\"", "pytest-html (>=1.19.0)"] +[[package]] +name = "pathable" +version = "0.4.4" +description = "Object-oriented paths" +optional = false +python-versions = "<4.0.0,>=3.7.0" +groups = ["dev"] +files = [ + {file = "pathable-0.4.4-py3-none-any.whl", hash = "sha256:5ae9e94793b6ef5a4cbe0a7ce9dbbefc1eec38df253763fd0aeeacf2762dbbc2"}, + {file = "pathable-0.4.4.tar.gz", hash = "sha256:6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2"}, +] + [[package]] name = "pluggy" version = "1.6.0" @@ -2797,6 +2883,21 @@ urllib3 = ">=1.25.10,<3.0" [package.extras] tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli ; python_version < \"3.11\"", "tomli-w", "types-PyYAML", "types-requests"] +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +description = "A pure python RFC3339 validator" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["dev"] +files = [ + {file = "rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa"}, + {file = "rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b"}, +] + +[package.dependencies] +six = "*" + [[package]] name = "rich" version = "14.0.0" @@ -3494,4 +3595,4 @@ propcache = ">=0.2.1" [metadata] lock-version = "2.1" python-versions = "^3.13" -content-hash = "bb28d2f45eb708ec5921e1e6c528344ef2251dea6f3becae5cc7d61c8f82e3c8" +content-hash = "8e6e98116871c55e44eddc6f7312d0e01b268dfdb0b410d55d9a30035ac98a07" diff --git a/pyproject.toml b/pyproject.toml index 15ec5c917..2de1b730d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,7 @@ jsonschema = "^4.24.0" behave = "^1.2.6" boto3 = "^1.38.42" python-dotenv = "^1.1.1" +openapi-spec-validator = "^0.7.2" [tool.poetry-plugin-lambda-build] docker-image = "public.ecr.aws/sam/build-python3.13:1.139-x86_64" # See https://gallery.ecr.aws/search?searchTerm=%22python%22&architecture=x86-64&popularRegistries=amazon&verified=verified&operatingSystems=Linux diff --git a/pytest.ini b/pytest.ini index 1a4189b55..fe523a190 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,9 @@ [pytest] python_files = *_tests.py test_*.py norecursedirs = .venv .eggs build dist utils -addopts = --strict-markers +#addopts = --strict-markers markers = e2e: end to end tests smoketest: suitable to run against all environments even production + functionale2eregression: functional regression tests + sandboxtests: tests to replicate example sandbox responses agreed with vita diff --git a/tests/e2e/.env.example b/tests/e2e/.env.example deleted file mode 100644 index 988f9081c..000000000 --- a/tests/e2e/.env.example +++ /dev/null @@ -1,27 +0,0 @@ -# API Configuration -BASE_URL=https://sandbox.api.service.nhs.uk/eligibility-signposting-api -API_KEY=your_api_key_here - -# Test Data -VALID_NHS_NUMBER=50000000004 -INVALID_NHS_NUMBER=9876543210 - -# AWS -# AWS -ABORT_ON_AWS_FAILURE=false -AWS_REGION=eu-west-2 -AWS_ACCESS_KEY_ID=aws_access_key_id_token_here -AWS_SECRET_ACCESS_KEY=aws_secret_access_ey_token_here -AWS_SESSION_TOKEN=aws_session_token_here - -# DynamoDB -DYNAMODB_TABLE_NAME=eligibilty_data_store -DYNAMO_JSON_SOURCE_DIR=./data/dynamoDB/test_data.json - -# S3 -S3_BUCKET_NAME=your-bucket-name -S3_UPLOAD_DIR=qa/json -S3_JSON_SOURCE_DIR=./data/s3 - -# Cleanup -KEEP_SEED=false diff --git a/tests/e2e/.gitignore b/tests/e2e/.gitignore index 9becdb2de..c9d29fc72 100644 --- a/tests/e2e/.gitignore +++ b/tests/e2e/.gitignore @@ -42,3 +42,5 @@ assets/ # Logs *.log /helpers/output/ +/.hypothesis/unicode_data/15.1.0/charmap.json.gz +/tests/.hypothesis/unicode_data/15.1.0/charmap.json.gz diff --git a/tests/e2e/.hypothesis/unicode_data/15.1.0/charmap.json.gz b/tests/e2e/.hypothesis/unicode_data/15.1.0/charmap.json.gz new file mode 100644 index 000000000..d9cff3e81 Binary files /dev/null and b/tests/e2e/.hypothesis/unicode_data/15.1.0/charmap.json.gz differ diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-01.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-01.json new file mode 100644 index 000000000..37a1a8814 --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-01.json @@ -0,0 +1,85 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 07:43:12.954767+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376001" + }, + "response": { + "responseId": "0300f1e8-6004-4229-a972-29220f08b8e9", + "lastUpdated": "2025-08-11 07:43:13.267973+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-01-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-01-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "actionable" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_0", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_10", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_20", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are a member of eli_376_cohort_group_other", + "cohortStatus": "actionable" + } + ], + "filterRules": null, + "suitabilityRules": null, + "actionRule": null, + "actions": [ + { + "internalActionCode": "TEST_ACTION", + "actionType": "ButtonWithAuthLink", + "actionCode": "TestAction", + "actionDescription": "TestAction Description", + "actionUrl": "http://www.nhs.uk/book-rsv", + "actionUrlLabel": "Continue to booking" + } + ] + } + ] + } +} diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-02.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-02.json new file mode 100644 index 000000000..955390d58 --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-02.json @@ -0,0 +1,90 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 07:43:11.974643+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376002" + }, + "response": { + "responseId": "f09917f7-9f73-472a-b0f3-6cc0c5c86858", + "lastUpdated": "2025-08-11 07:43:12.287543+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-02-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-02-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "not_eligible", + "statusText": "We do not believe you can have it", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "not_eligible" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_0", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_10", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_20", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are not a member of eli_376_cohort_group_other", + "cohortStatus": "not_eligible" + } + ], + "filterRules": [ + { + "rulePriority": "100", + "ruleName": "NotEligible Reason 1" + } + ], + "suitabilityRules": null, + "actionRule": null, + "actions": [ + { + "internalActionCode": "TEST_NOT_ELI", + "actionType": "", + "actionCode": "TestNotEli", + "actionDescription": "TestNotEli Description", + "actionUrl": null, + "actionUrlLabel": null + } + ] + } + ] + } +} diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-03.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-03.json new file mode 100644 index 000000000..7c91d2f68 --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-03.json @@ -0,0 +1,96 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 06:42:52.595081+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376003" + }, + "response": { + "responseId": "b3032aeb-fafd-48d0-8d32-1459140ea886", + "lastUpdated": "2025-08-11 06:42:52.942561+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-03-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-03-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "not_actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "not_eligible" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_0", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_10", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_20", + "cohortStatus": "not_actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are not a member of eli_376_cohort_group_other", + "cohortStatus": "not_eligible" + } + ], + "filterRules": [ + { + "rulePriority": "100", + "ruleName": "NotEligible Reason 1" + } + ], + "suitabilityRules": [ + { + "rulePriority": "200", + "ruleName": "NotActionable Reason 1", + "ruleMessage": "NotActionable Description 1" + } + ], + "actionRule": null, + "actions": [ + { + "internalActionCode": "BOOK_NBS", + "actionType": "ButtonWithAuthLink", + "actionCode": "BookNBS", + "actionDescription": null, + "actionUrl": "http://www.nhs.uk/book-rsv", + "actionUrlLabel": "Continue to booking" + } + ] + } + ] + } +} diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-04.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-04.json new file mode 100644 index 000000000..863f219e5 --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-04.json @@ -0,0 +1,85 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 07:13:25.069391+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376004" + }, + "response": { + "responseId": "f516123d-e985-45a0-bebe-67fe08328db8", + "lastUpdated": "2025-08-11 07:13:25.470782+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-04-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-04-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "not_eligible" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_0", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_10", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_20", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are not a member of eli_376_cohort_group_other", + "cohortStatus": "not_eligible" + } + ], + "filterRules": [ + { + "rulePriority": "100", + "ruleName": "NotEligible Reason 1" + }, + { + "rulePriority": "110", + "ruleName": "NotEligible Reason 2" + } + ], + "suitabilityRules": null, + "actionRule": null, + "actions": [] + } + ] + } +} diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-05.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-05.json new file mode 100644 index 000000000..ec271967e --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-05.json @@ -0,0 +1,102 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 20:46:10.268634+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376005" + }, + "response": { + "responseId": "762b5ad0-a4fb-4f29-8330-561c98dc60e8", + "lastUpdated": "2025-08-11 20:46:10.693486+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-05-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-05-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "not_eligible", + "statusText": "We do not believe you can have it", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "not_eligible" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_0", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_10", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_20", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are not a member of eli_376_cohort_group_other", + "cohortStatus": "not_eligible" + } + ], + "filterRules": [ + { + "rulePriority": "100", + "ruleName": "NotEligible Reason 1" + }, + { + "rulePriority": "110", + "ruleName": "NotEligible Reason 2" + }, + { + "rulePriority": "120", + "ruleName": "NotEligible Reason 3" + }, + { + "rulePriority": "130", + "ruleName": "NotEligible Reason 4" + } + ], + "suitabilityRules": null, + "actionRule": null, + "actions": [ + { + "internalActionCode": "TEST_NOT_ELI", + "actionType": "", + "actionCode": "TestNotEli", + "actionDescription": "TestNotEli Description", + "actionUrl": null, + "actionUrlLabel": null + } + ] + } + ] + } +} diff --git a/tests/e2e/data/audit/AUTO_RSV_ELI-376-10.json b/tests/e2e/data/audit/AUTO_RSV_ELI-376-10.json new file mode 100644 index 000000000..21b363c58 --- /dev/null +++ b/tests/e2e/data/audit/AUTO_RSV_ELI-376-10.json @@ -0,0 +1,76 @@ +{ + "request": { + "requestTimestamp": "2025-08-11 07:13:25.069391+00:00", + "headers": { + "xRequestId": null, + "xCorrelationId": null, + "nhsdEndUserOrganisationOds": null, + "nhsdApplicationId": null + }, + "queryParams": { + "category": null, + "conditions": null, + "includeActions": null + }, + "nhsNumber": "9900376004" + }, + "response": { + "responseId": "f516123d-e985-45a0-bebe-67fe08328db8", + "lastUpdated": "2025-08-11 07:13:25.470782+00:00", + "condition": [ + { + "campaignId": "AUTO_RSV_ELI-376-04-Campaign-ID", + "campaignVersion": 1, + "iterationId": "AUTO_RSV_ELI-376-04-Iteration-ID", + "iterationVersion": 1, + "conditionName": "RSV", + "status": "actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_1", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_2", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_3", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_4", + "cohortStatus": "not_eligible" + } + ], + "eligibilityCohortGroups": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are not a member of eli_376_cohort_group_0", + "cohortStatus": "not_eligible" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_10", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortText": "are a member of eli_376_cohort_group_20", + "cohortStatus": "actionable" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortText": "are not a member of eli_376_cohort_group_other", + "cohortStatus": "not_eligible" + } + ], + "filterRules": null, + "suitabilityRules": null, + "actionRule": null, + "actions": [] + } + ] + } +} diff --git a/tests/e2e/data/configs/global_config.json b/tests/e2e/data/configs/global_config.json deleted file mode 100644 index 1286e8e19..000000000 --- a/tests/e2e/data/configs/global_config.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "CampaignConfig": { - "ID": "<>", - "Version": 1, - "Name": "Automation RSV - Campaign 1", - "Type": "O", - "Target": "RSV", - "Manager": "adam.waller1@nhs.net", - "Approver": "adam.waller1@nhs.net", - "Reviewer": "adam.waller1@nhs.net", - "IterationFrequency": "X", - "IterationType": "A", - "IterationTime": "07:00:00", - "DefaultCommsRouting": "CONTACT_GP", - "StartDate": "20250601", - "EndDate": "20260601", - "ApprovalMinimum": 0, - "ApprovalMaximum": 0, - "Iterations": [ - { - "ID": ",<>", - "DefaultCommsRouting": "CONTACT_GP", - "Version": 1, - "Name": "Automation RSV - Campaign 1 Iteration 1", - "IterationDate": "20250601", - "IterationNumber": 1, - "CommsType": "I", - "ApprovalMinimum": 0, - "ApprovalMaximum": 0, - "Type": "A", - "IterationCohorts": [ - { - "CohortLabel": "rsv_75_rolling", - "CohortGroupCode": "rsv_age_range", - "CohortGroupDescriptionPositive": "You are currently aged 75 to 79", - "CohortGroupDescriptionNegative": "You are not currently aged 75 to 79", - "Priority": 0 - }, - { - "CohortLabel": "rsv_75to79_2024", - "CohortGroupCode": "rsv_catch_up_age_range", - "CohortGroupDescriptionPositive": "You turned 80 after 1 September 2024, so are eligible for the RSV vaccine until 31 August 2025", - "CohortGroupDescriptionNegative": "You did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", - "Priority": 10 - }, - { - "CohortLabel": "elid_all_people", - "CohortGroupCode": "elid_all_people", - "CohortGroupDescriptionPositive": "Our records do not say why you are eligible", - "CohortGroupDescriptionNegative": "", - "Priority": 10 - } - ], - "IterationRules": [ - { - "Type": "F", - "Name": "Assure only already vaccinated taken from magic cohort", - "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", - "Operator": "is_empty", - "AttributeTarget": "RSV", - "AttributeLevel": "TARGET", - "AttributeName": "LAST_SUCCESSFUL_DATE", - "CohortLabel": "elid_all_people", - "Priority": 100 - }, - { - "Type": "F", - "Name": "Assure only already vaccinated taken from magic cohort", - "Description": "Exclude anyone who has NOT been given a dose of RSV within the last 25 years from the magic cohort", - "Operator": "Y<=", - "Comparator": "-25[[NVL:18000101]]", - "AttributeTarget": "RSV", - "AttributeLevel": "TARGET", - "AttributeName": "LAST_SUCCESSFUL_DATE", - "CohortLabel": "elid_all_people", - "Priority": 110 - }, - { - "Type": "F", - "Name": "Under Age - Under 75 Years on day of execution", - "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", - "Priority": 120, - "AttributeLevel": "PERSON", - "AttributeName": "DATE_OF_BIRTH", - "Operator": "Y>", - "Comparator": "-75" - }, - { - "Type": "F", - "Name": "Exclude Too OLD", - "Description": "Exclude anyone over 80", - "Priority": 130, - "AttributeLevel": "PERSON", - "AttributeName": "DATE_OF_BIRTH", - "Operator": "<", - "Comparator": "-80" - }, - { - "Type": "S", - "Name": "Dose Interval - Make NotActionable everyone who has been given a dose of RSV Vaccination in the last 25 years", - "Description": "AlreadyVaccinated|##You've had your RSV vaccination\\nBased on our records, you recently had this vaccination. You do not need to do anything.", - "Priority": 200, - "AttributeLevel": "TARGET", - "AttributeTarget": "RSV", - "AttributeName": "LAST_SUCCESSFUL_DATE", - "Operator": "Y>=", - "Comparator": "-25", - "RuleStop": "Y" - }, - { - "Type": "S", - "Name": "Future Booking", - "Description": "AlreadyBooked|You are already Booked.", - "Priority": 200, - "AttributeLevel": "TARGET", - "AttributeTarget": "RSV", - "AttributeName": "BOOKED_DATE", - "Operator": "D>=", - "Comparator": "0" - }, - { - "Type": "R", - "Name": "Future Booking", - "Description": "AlreadyBooked|You are already Booked.", - "Priority": 1000, - "AttributeLevel": "TARGET", - "AttributeTarget": "RSV", - "AttributeName": "BOOKED_DATE", - "Operator": "D>=", - "Comparator": "0", - "CommsRouting": "AMEND_NBS" - } - ], - "ActionsMapper": { - "BOOK_NBS": { - "ExternalRoutingCode": "BookNBS", - "ActionDescription": "", - "ActionType": "ButtonAuthLink", - "UrlLink": "http://www.nhs.uk/book-rsv", - "UrlLabel": "Continue to booking" - }, - "AMEND_NBS": { - "ExternalRoutingCode": "AmendNBS", - "ActionDescription": "", - "ActionType": "ButtonAuthLink", - "UrlLink": "http://www.nhs.uk/book-rsv", - "UrlLabel": "Update or Cancel booking" - }, - "CONTACT_GP": { - "actionType": "InfoText", - "actionCode": "ContactGP", - "description": "Contact your GP surgery to get vaccinated", - "UrlLink": "", - "urlLabel": "" - } - } - } - ], - "AvailableActions": [ - { - "actionType": "ButtonAuthLink", - "actionCode": "BookNBS", - "description": "", - "urlLink": "http://www.nhs.uk/book-rsv", - "urlLabel": "Continue to booking" - }, - { - "actionType": "Link", - "actionCode": "FindWalkin", - "description": "Find a walk-in service for RSV vaccinations", - "urlLink": "www.england.nhs.uk/rsv-east", - "urlLabel": "" - }, - { - "actionType": "InfoText", - "actionCode": "ContactGP", - "description": "Contact your GP surgery to get vaccinated", - "urlLabel": "" - } - ] - } -} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/AUTO_RSV_ELI-406-01.json b/tests/e2e/data/configs/inProgressTestConfigs/AUTO_RSV_ELI-406-01.json new file mode 100644 index 000000000..c189d5350 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/AUTO_RSV_ELI-406-01.json @@ -0,0 +1,108 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-01-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-01-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-01-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 100 + } + ], + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-01.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-01.json new file mode 100644 index 000000000..f2d7de1dc --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-01.json @@ -0,0 +1,94 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-01-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-01-Iteration-Config", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_0", + "NegativeDescription": "are not a member of eli_220_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_220_cohort_1", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-02.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-02.json new file mode 100644 index 000000000..2f4049674 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-02.json @@ -0,0 +1,94 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-01-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-01-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "", + "NegativeDescription": "are not a member of eli_220_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_220_cohort_1", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-03.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-03.json new file mode 100644 index 000000000..23ce6e5f5 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-03.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-03-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-03-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_0", + "NegativeDescription": "are not a member of eli_220_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-04.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-04.json new file mode 100644 index 000000000..b2043bd7f --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-04.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-04-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-04-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "", + "NegativeDescription": "are not a member of eli_220_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-05.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-05.json new file mode 100644 index 000000000..b49084fac --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-05.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-05-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-04-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_0", + "NegativeDescription": "are not a member of eli_220_cohort_group_0", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-06.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-06.json new file mode 100644 index 000000000..71a6495c8 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-220-371/AUTO_RSV_ELI-220-06.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-220-06-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-220-04-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_220_cohort_1", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_10", + "NegativeDescription": "are not a member of eli_220_cohort_group_10", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_220_cohort_2", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_0", + "NegativeDescription": "", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_220_cohort_3", + "CohortGroup": "rsv_eli_220_cohort_group", + "PositiveDescription": "are a member of eli_220_cohort_group_40", + "NegativeDescription": "are not a member of eli_220_cohort_group_40", + "Priority": 40 + }, + { + "CohortLabel": "rsv_eli_220_cohort_4", + "CohortGroup": "rsv_eli_220_cohort_group_other", + "PositiveDescription": "are a member of eli_220_cohort_group_other", + "NegativeDescription": "are not a member of eli_220_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-01.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-01.json new file mode 100644 index 000000000..2334d3619 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-01.json @@ -0,0 +1,109 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-274-01-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-274-01-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_274_cohort_1", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_274_cohort_2", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_274_cohort_3", + "CohortGroup": "rsv_eli_274_cohort_group_other", + "PositiveDescription": "are a member of eli_274_cohort_group_other", + "NegativeDescription": "are not a member of eli_274_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_274_cohort_1", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason 2", + "Description": "Description 2", + "Operator": "=", + "Comparator": "AAA", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_274_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason 3", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZZ", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_274_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-05.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-05.json new file mode 100644 index 000000000..e7346fc51 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-05.json @@ -0,0 +1,109 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-274-05-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-274-05-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_274_cohort_1", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_274_cohort_2", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_274_cohort_3", + "CohortGroup": "rsv_eli_274_cohort_group_other", + "PositiveDescription": "are a member of eli_274_cohort_group_other", + "NegativeDescription": "are not a member of eli_274_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_274_cohort_1", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 2", + "Operator": "=", + "Comparator": "AAA", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_274_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason 3", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZZ", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_274_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-06.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-06.json new file mode 100644 index 000000000..43b686186 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-06.json @@ -0,0 +1,109 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-274-06-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-274-06-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_274_cohort_1", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_274_cohort_2", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_274_cohort_3", + "CohortGroup": "rsv_eli_274_cohort_group_other", + "PositiveDescription": "are a member of eli_274_cohort_group_other", + "NegativeDescription": "are not a member of eli_274_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_274_cohort_1", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 2", + "Operator": "=", + "Comparator": "AAA", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_274_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZZ", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_274_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-07.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-07.json new file mode 100644 index 000000000..9332b871a --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-274-371/AUTO_RSV_ELI-274-07.json @@ -0,0 +1,110 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-274-07-Iteration-Config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-274-07-Iteration-Config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_274_cohort_1", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_274_cohort_2", + "CohortGroup": "rsv_eli_274_cohort_group", + "PositiveDescription": "are a member of eli_274_cohort_group", + "NegativeDescription": "are not a member of eli_274_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_274_cohort_3", + "CohortGroup": "rsv_eli_274_cohort_group_other", + "PositiveDescription": "are a member of eli_274_cohort_group_other", + "NegativeDescription": "are not a member of eli_274_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_274_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAA", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_274_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZZ", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_274_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json new file mode 100644 index 000000000..d6516c203 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-01.json @@ -0,0 +1,119 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-01-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-01-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-01-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "NotActionable Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 200 + } + ], + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json new file mode 100644 index 000000000..a6ee1a28f --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-02.json @@ -0,0 +1,118 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-02-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-02-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-02-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "NotActionable Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 200 + } + ], + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json new file mode 100644 index 000000000..1b4aa219a --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-03.json @@ -0,0 +1,118 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-03-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-03-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-03-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_4", + "Priority": 100 + }, + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "NotActionable Description 1", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Priority": 200 + } + ], + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json new file mode 100644 index 000000000..99ed02797 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-04.json @@ -0,0 +1,119 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-04-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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": "", + "Iterations": [ + { + "ID": "AUTO_RSV_ELI-376-04-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-04-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 100 + }, + { + "Type": "F", + "Name": "NotEligible Reason 2", + "Description": "NotEligible Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_376_cohort_4", + "Priority": 110 + } + ], + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json new file mode 100644 index 000000000..cccccc457 --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-05.json @@ -0,0 +1,161 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-05-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-05-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-05-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Cohort_label": "rsv_eli_376_cohort_1", + "Priority": 100 + }, + { + "Type": "F", + "Name": "NotEligible Reason 2", + "Description": "NotEligible Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Cohort_label": "rsv_eli_376_cohort_1", + "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", + "Description": "NotActionable Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Priority": 200 + }, + { + "Type": "S", + "Name": "NotActionable Reason 2", + "Description": "NotActionable Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "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/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json new file mode 100644 index 000000000..c2f3b6d6f --- /dev/null +++ b/tests/e2e/data/configs/inProgressTestConfigs/ELI-376-405/AUTO_RSV_ELI-376-10.json @@ -0,0 +1,141 @@ +{ + "CampaignConfig": { + "ID": "AUTO_RSV_ELI-376-10-Campaign-ID", + "Version": 1, + "Name": "ELI-376-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-376-10-Iteration-ID", + "DefaultCommsRouting": "TEST_ACTION", + "DefaultNotActionableRouting": "TEST_NOT_ACTION", + "DefaultNotEligibleRouting": "TEST_NOT_ELI", + "Version": 1, + "Name": "ELI-376-05-Iteration-Config-Name", + "IterationDate": "20240808", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "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", + "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 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "NotEligible Reason 1", + "Description": "NotEligible Description 1", + "Operator": "Y<=", + "Comparator": "-80", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_376_cohort_1", + "Priority": 100 + }, + { + "Type": "F", + "Name": "NotEligible Reason 2", + "Description": "NotEligible Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_376_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_376_cohort_3", + "Priority": 200 + }, + { + "Type": "S", + "Name": "NotActionable Reason 2", + "Description": "NotActionable Description 2", + "Operator": "=", + "Comparator": "ABC", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_376_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/tests/e2e/data/configs/regressionTestConfigs/AUTO_RSV_REG_001.json b/tests/e2e/data/configs/regressionTestConfigs/AUTO_RSV_REG_001.json new file mode 100644 index 000000000..e8bc72ffa --- /dev/null +++ b/tests/e2e/data/configs/regressionTestConfigs/AUTO_RSV_REG_001.json @@ -0,0 +1,304 @@ +{ + "CampaignConfig": { + "ID": "Automation RSV - Regression Test Config - Camp ID", + "Version": 1, + "Name": "Automation RSV - Regression Test Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "Automation RSV - Regression Test Config - It ID", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "Automation RSV - Regression Test Config Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "M", + "IterationCohorts": [ + { + "CohortLabel": "rsv_cohort_1", + "CohortGroup": "rsv_age_group", + "PositiveDescription": "You are in an age group 1.", + "NegativeDescription": "You are not in an age group 1.", + "Priority": 10 + }, + { + "CohortLabel": "rsv_cohort_2", + "CohortGroup": "rsv_age_group", + "PositiveDescription": "You are in an age group 2.", + "NegativeDescription": "You are not in an age group 2.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_cohort_3", + "CohortGroup": "rsv_other_group", + "PositiveDescription": "You are in an another group.", + "NegativeDescription": "You are not in an other group.", + "Priority": 20 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 30 + }, + { + "CohortLabel": "no_group_description", + "CohortGroup": "", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 40 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 110, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_cohort_1" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 111, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80", + "CohortLabel": "rsv_cohort_1" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 112, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_cohort_2" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 113, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80", + "CohortLabel": "rsv_cohort_2" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 114, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_cohort_3" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 115, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80", + "CohortLabel": "rsv_cohort_3" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 116, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "no_group_description" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 117, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80", + "CohortLabel": "no_group_description" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "Priority": 500, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotAvailable", + "Description": "NotAvailable|Vaccinations are not currently available.", + "Priority": 510, + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Operator": "=", + "Comparator": "SUPPRESSED_ICB" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "=", + "Comparator": "LS2", + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_SECTOR", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1050, + "Operator": "!=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "MANAGE_LOCAL" + } + ], + "ActionsMapper": { + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultaction.com", + "UrlLabel": "DefaultLabel" + }, + "ANOTHER_ACTION": { + "ExternalRoutingCode": "AnotherAction", + "ActionDescription": "AnotherActionDescription", + "ActionType": "AnotherActionType", + "UrlLink": "https://www.anoteraction.com", + "UrlLabel": "AnotherLabel" + }, + "DEFAULT_X": { + "ExternalRoutingCode": "DefaultX", + "ActionDescription": "DefaultXDescription", + "ActionType": "DefaultXType", + "UrlLink": "https://www.defaultxaction.com", + "UrlLabel": "DefaultXLabel" + }, + "DEFAULT_Y": { + "ExternalRoutingCode": "DefaultY", + "ActionDescription": "DefaultYDescription", + "ActionType": "DefaultYType", + "UrlLink": "https://www.defaultyaction.com", + "UrlLabel": "DefaultYLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_001.json b/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_001.json new file mode 100644 index 000000000..efae1b3ee --- /dev/null +++ b/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_001.json @@ -0,0 +1,288 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "BOOK_LOCAL", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "BOOK_LOCAL", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "M", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75_rolling", + "CohortGroup": "rsv_age_rolling", + "PositiveDescription": "are aged 75 to 79 years old.", + "NegativeDescription": "are not aged 75 to 79 years old.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_75to79_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 between 2nd September 2024 and 31st August 2025", + "NegativeDescription": "did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + }, + { + "CohortLabel": "no_group_description", + "CohortGroup": "", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 30 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotAvailable", + "Description": "NotAvailable|Vaccinations are not currently available.", + "Priority": 510, + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Operator": "=", + "Comparator": "SUPPRESSED_ICB", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotYetDue", + "Description": "NotYetDue|Your next dose is not yet due.", + "Priority": 520, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "TooClose|Your previous vaccination was less than 91 days ago.", + "Priority": 530, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D>", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "TooClose|Your previous vaccination was less than 91 days ago.", + "Priority": 530, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D<", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "OtherSetting", + "Description": "OtherSetting|## Getting the vaccine\nOur record show you're living in a setting where care is provided.\nIf you think you should have the RSV vaccine, speak to a member of staff where you live.", + "Priority": 540, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "=", + "Comparator": "LS2", + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_SECTOR", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": "!=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "MANAGE_LOCAL" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + }, + "BOOK_LOCAL": { + "ExternalRoutingCode": "BookLocal", + "ActionDescription": "##Getting the vaccine\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.", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + }, + "MANAGE_LOCAL": { + "ExternalRoutingCode": "ManageLocal", + "ActionDescription": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText", + "UrlLink": "", + "UrlLabel": "" + }, + "CHECK_CORRECT": { + "ExternalRoutingCode": "CheckCorrect", + "ActionDescription": "##If you think this is incorrect\\nIf you have not had this vaccination and you think you should, speak to your healthcare professional.", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_008.json b/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_008.json new file mode 100644 index 000000000..7a896ab08 --- /dev/null +++ b/tests/e2e/data/configs/smokeTestConfigs/.temp/AUTO_RSV_SB_008.json @@ -0,0 +1,128 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "BOOK_LOCAL", + "StartDate": "20260601", + "EndDate": "20270601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "BOOK_LOCAL", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "M", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75_rolling", + "CohortGroup": "rsv_age_rolling", + "PositiveDescription": "are aged 75 to 79 years old.", + "NegativeDescription": "are not aged 75 to 79 years old.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_75to79_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 between 2nd September 2024 and 31st August 2025", + "NegativeDescription": "did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + }, + { + "CohortLabel": "no_group_description", + "CohortGroup": "", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 30 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + }, + "BOOK_LOCAL": { + "ExternalRoutingCode": "BookLocal", + "ActionDescription": "##Getting the vaccine\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.", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + }, + "MANAGE_LOCAL": { + "ExternalRoutingCode": "ManageLocal", + "ActionDescription": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText", + "UrlLink": "", + "UrlLabel": "" + }, + "CHECK_CORRECT": { + "ExternalRoutingCode": "CheckCorrect", + "ActionDescription": "##If you think this is incorrect\\nIf you have not had this vaccination and you think you should, speak to your healthcare professional.", + "ActionType": "InfoText", + "UrlLink": "", + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_001.json b/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_001.json new file mode 100644 index 000000000..99db5bd94 --- /dev/null +++ b/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_001.json @@ -0,0 +1,281 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "BOOK_LOCAL", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "BOOK_LOCAL", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75_rolling", + "CohortGroup": "rsv_age_rolling", + "PositiveDescription": "are aged 75 to 79 years old.", + "NegativeDescription": "are not aged 75 to 79 years old.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_75to79_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 between 2nd September 2024 and 31st August 2025", + "NegativeDescription": "did not turn 80 between 2nd September 2024 and 31st August 2025", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + }, + { + "CohortLabel": "no_group_description", + "CohortGroup": "", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 30 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79_2024" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 125, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75_rolling" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotAvailable", + "Description": "NotAvailable|Vaccinations are not currently available.", + "Priority": 510, + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Operator": "=", + "Comparator": "SUPPRESSED_ICB" + }, + { + "Type": "S", + "Name": "NotYetDue", + "Description": "NotYetDue|Your next dose is not yet due.", + "Priority": 520, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "=", + "Comparator": "20250326", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "TooClose|Your previous vaccination was less than 91 days ago.", + "Priority": 530, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "=", + "Comparator": "20250327", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "OtherSetting", + "Description": "OtherSetting|## Getting the vaccine\n\nOur record show you're living in a setting where care is provided.\n\nIf you think you should have the RSV vaccine, speak to a member of staff where you live.", + "Priority": 540, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "=", + "Comparator": "LS2", + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_SECTOR", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": "!=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "MANAGE_LOCAL" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "ActionType": "InfoText" + }, + "BOOK_LOCAL": { + "ExternalRoutingCode": "BookLocal", + "ActionDescription": "##Getting the vaccine\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.", + "ActionType": "InfoText" + }, + "MANAGE_LOCAL": { + "ExternalRoutingCode": "ManageLocal", + "ActionDescription": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText" + }, + "CHECK_CORRECT": { + "ExternalRoutingCode": "CheckCorrect", + "ActionDescription": "##If you think this is incorrect\nIf you have not had this vaccination and you think you should, speak to your healthcare professional.", + "ActionType": "InfoText" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_008.json b/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_008.json new file mode 100644 index 000000000..73e672d14 --- /dev/null +++ b/tests/e2e/data/configs/smokeTestConfigs/AUTO_RSV_SB_008.json @@ -0,0 +1,243 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "BOOK_LOCAL", + "StartDate": "20260601", + "EndDate": "20270601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "BOOK_LOCAL", + "Version": 1, + "Name": "Automation RSV - Smoke Test Config Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75_rolling", + "CohortGroup": "rsv_age_rolling", + "PositiveDescription": "are aged 75 to 79 years old.", + "NegativeDescription": "are not aged 75 to 79 years old.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_75to79_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 between 2nd September 2024 and 31st August 2025", + "NegativeDescription": "did not turn 80 after 1 September 2024 and get vaccinated by 31 August 2025", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "elid_all_people", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + }, + { + "CohortLabel": "no_group_description", + "CohortGroup": "", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 30 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated taken from magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone over 80", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "-80" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "Priority": 500, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotAvailable", + "Description": "NotAvailable|Vaccinations are not currently available.", + "Priority": 510, + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "Operator": "=", + "Comparator": "SUPPRESSED_ICB" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Not Vaccinated", + "Description": "Book An Appointment", + "Priority": 1010, + "Operator": "=", + "Comparator": "LS2", + "AttributeLevel": "PERSON", + "AttributeName": "POSTCODE_SECTOR", + "CommsRouting": "BOOK_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1020, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": "!=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "MANAGE_LOCAL" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "BOOK_LOCAL": { + "ExternalRoutingCode": "BookLocal", + "ActionDescription": "##Getting the vaccine\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.", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "MANAGE_LOCAL": { + "ExternalRoutingCode": "ManageLocal", + "ActionDescription": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "CHECK_CORRECT": { + "ExternalRoutingCode": "CheckCorrect", + "ActionDescription": "##If you think this is incorrect\\nIf you have not had this vaccination and you think you should, speak to your healthcare professional.", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-155.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-155.json new file mode 100644 index 000000000..83223a5e7 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-155.json @@ -0,0 +1,82 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-155 - cohort_label is not supported in R rules", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-155 - cohort_label is not supported in R rules", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_155_in", + "CohortGroup": "eli_155_in_group", + "PositiveDescription": "You are currently in eli_155_in", + "NegativeDescription": "You are not currently in eli_155_in", + "Priority": 0 + }, + { + "CohortLabel": "eli_155_out", + "CohortGroup": "eli_155_out_group", + "PositiveDescription": "You are currently in eli_155_out", + "NegativeDescription": "You are not currently in eli_155_out", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS", + "CohortLabel": "eli_155_out" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-216.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-216.json new file mode 100644 index 000000000..0fb07fd7b --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-216.json @@ -0,0 +1,100 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-216 - NHS Number check (NHS login) - 9000000006", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-155 - Support Actions R Rules", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_216_cohort", + "CohortGroup": "eli_216_cohort_group", + "PositiveDescription": "You are currently in eli_216_cohort", + "NegativeDescription": "You are not in eli_216_cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "ACTION_ONE" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_null", + "Comparator": "", + "CommsRouting": "ACTION_ONE" + } + ], + "ActionsMapper": { + "ACTION_ONE": { + "ExternalRoutingCode": "ActionOneRoutingCode", + "ActionDescription": "ActionOneDescription", + "ActionType": "ActionOneActionType", + "UrlLink": "http://www.actiononeurl.com/", + "UrlLabel": "ActionOneUrlLabel" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com/", + "UrlLabel": "ActionTwoUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "http://www.defaultActionUrl.com/", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-1.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-1.json new file mode 100644 index 000000000..c487c6a4c --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-1.json @@ -0,0 +1,110 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-219 - Support Actions R Rules - 9000000002", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-155 - Support Actions R Rules", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_291_cohort_1", + "CohortGroup": "eli_291_cohort_1_group", + "PositiveDescription": "You are currently in eli_291_cohort_1", + "NegativeDescription": "You are not in eli_291_cohort_1", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "ACTION_ONE" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_null", + "Comparator": "", + "CommsRouting": "ACTION_ONE" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "COHORT", + "Operator": "in", + "Comparator": "eli_291_cohort_2", + "CommsRouting": "ACTION_ONE" + } + ], + "ActionsMapper": { + "ACTION_ONE": { + "ExternalRoutingCode": "ActionOneRoutingCode", + "ActionDescription": "ActionOneDescription", + "ActionType": "ActionOneActionType", + "UrlLink": "http://www.actiononeurl.com", + "UrlLabel": "ActionOneUrlLabel" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com/", + "UrlLabel": "DefaultActionLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-2.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-2.json new file mode 100644 index 000000000..a693246e8 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-2.json @@ -0,0 +1,117 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-219 - Support Actions R Rules - 9000000003", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-155 - Support Actions R Rules", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_291_cohort_2", + "CohortGroup": "eli_291_cohort_2_group", + "PositiveDescription": "You are currently in eli_291_cohort_2", + "NegativeDescription": "You are not in eli_291_cohort_2", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<=", + "Comparator": "0", + "CommsRouting": "ACTION_ONE" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1030, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_null", + "Comparator": "", + "CommsRouting": "ACTION_THREE" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked with ACC", + "Description": "Book An Appointment", + "Priority": 1020, + "AttributeLevel": "COHORT", + "Operator": "=", + "Comparator": "eli_291_cohort_2", + "CommsRouting": "ACTION_TWO" + } + ], + "ActionsMapper": { + "ACTION_ONE": { + "ExternalRoutingCode": "ActionOneRoutingCode", + "ActionDescription": "ActionOneDescription", + "ActionType": "ActionOneActionType", + "UrlLink": "http://www.actiononeurl.com", + "UrlLabel": "ActionOneUrlLabel" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-3.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-3.json new file mode 100644 index 000000000..1700f134c --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-219-3.json @@ -0,0 +1,107 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-219 - Support Actions R Rules - 9000000004", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-219 - Support Actions R Rules - 9000000004", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_291_cohort_3", + "CohortGroup": "eli_291_cohort_3_group", + "PositiveDescription": "You are currently in eli_291_cohort_3", + "NegativeDescription": "You are not in eli_291_cohort_3", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "ACTION_ONE" + }, + { + "Type": "R", + "Name": "Actionable if Vaccinated", + "Description": "You are Vaccinated", + "Priority": 1010, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "is_not_null", + "Comparator": "", + "CommsRouting": "ACTION_TWO" + } + ], + "ActionsMapper": { + "ACTION_ONE": { + "ExternalRoutingCode": "ActionOneRoutingCode", + "ActionDescription": "ActionOneDescription", + "ActionType": "ActionOneActionType", + "UrlLink": "http://www.actiononeurl.com", + "UrlLabel": "ActionOneUrlLabel" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-01.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-01.json new file mode 100644 index 000000000..2dc45815d --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-01.json @@ -0,0 +1,94 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on 2nd rule", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on Vaccinated", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_221_cohort", + "CohortGroup": "eli_221_group", + "PositiveDescription": "You are currently in eli_221_cohort", + "NegativeDescription": "You are not currently in eli_221_cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "Already Vaccinated|We believe that you Are Already Vaccinated", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D<", + "Comparator": "0" + }, + { + "Type": "S", + "Name": "Other Setting Care", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1001, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting DE", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1002, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-02.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-02.json new file mode 100644 index 000000000..ff612086f --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-02.json @@ -0,0 +1,95 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on Vaccinated - Rule Stop: N", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on Vaccinated - No Rule Stop", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_221_cohort", + "CohortGroup": "eli_221_group", + "PositiveDescription": "You are currently in eli_221_cohort", + "NegativeDescription": "You are not currently in eli_221_cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "Already Vaccinated|We believe that you Are Already Vaccinated", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D<", + "Comparator": "0", + "RuleStop": "N" + }, + { + "Type": "S", + "Name": "Other Setting Care", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1001, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "RuleStop": "N" + }, + { + "Type": "S", + "Name": "Other Setting DE", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1002, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-03.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-03.json new file mode 100644 index 000000000..a4a6b7645 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-221-03.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on Vaccinated - No Rule Stop", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-221 - Create Rule Stop function - Rule Stop on Vaccinated - No Rule Stop", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_221_cohort", + "CohortGroup": "eli_221_group", + "PositiveDescription": "You are currently in eli_221_cohort", + "NegativeDescription": "You are not currently in eli_221_cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "Already Vaccinated|We believe that you Are Already Vaccinated", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D<", + "Comparator": "0" + }, + { + "Type": "S", + "Name": "Other Setting Care", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1001, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y" + }, + { + "Type": "S", + "Name": "Other Setting DE", + "Description": "Other Setting|We believe that you will get the vaccination where you are located", + "Priority": 1002, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json new file mode 100644 index 000000000..7a9f6b9dc --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json @@ -0,0 +1,202 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-222 - Implement magic cohort", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-222 - Implement magic cohort", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old.", + "NegativeDescription": "are not aged 75 to 79 years old.", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Assure only already vaccinated or those with a future booking are included in magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Assure only already vaccinated or those with a future booking are included in magic cohort", + "Description": "Exclude anyone from the magic cohort who does not have a future booking", + "Operator": "D<", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Assure only already vaccinated or those with a future booking are included in magic cohort", + "Description": "Exclude anyone from the magic cohort who does not have a future booking", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 110 + }, + { + "Type": "F", + "Name": "Assure only already vaccinated or those with a future booking are included in magic cohort", + "Description": "Exclude anyone who has NOT been given a dose of RSV Vaccination from the magic cohort", + "Operator": "is_empty", + "Comparator": "", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 110 + }, + { + "Type": "F", + "Name": "Filter those with incorrect age from rsv_75to79 cohort", + "Description": "Filter those with incorrect age from rsv_75to79 cohort", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_75to79", + "Priority": 120 + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "##You've had your RSV vaccination\nWe believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1030, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1040, + "Operator": ">=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1040, + "Operator": "!=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "MANAGE_LOCAL" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "MANAGE_LOCAL": { + "ExternalRoutingCode": "ManageLocal", + "ActionDescription": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-236.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-236.json new file mode 100644 index 000000000..c1c28aff2 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-236.json @@ -0,0 +1,155 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-236 - NVL Functionality", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "", + "Version": 1, + "Name": "ELI-236 - NVL Functionality", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "M", + "IterationCohorts": [ + { + "CohortLabel": "eli_236_cohort", + "CohortGroup": "eli_236_group", + "PositiveDescription": "You are currently in eli_236", + "NegativeDescription": "You are not currently in eli_236", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "13Q Flag NVL equal Test", + "Description": "13Q Flag NVL Test|13Q Flag NVL Test", + "Priority": 1000, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y[[NVL:Y]]" + }, + { + "Type": "S", + "Name": "CARE_HOME_FLAG not equal NVL Test", + "Description": "CARE_HOME_FLAG not equal NVL Test", + "Priority": 1001, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "!=", + "Comparator": "N[[NVL:Y]]" + }, + { + "Type": "S", + "Name": "COMMISSIONING_REGION greater than NVL Test", + "Description": "COMMISSIONING_REGION greater than NVL Test", + "Priority": 1002, + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "Operator": ">", + "Comparator": "0[[NVL:1]]" + }, + { + "Type": "S", + "Name": "DATE_OF_BIRTH less than NVL Test", + "Description": "DATE_OF_BIRTH less than NVL Test", + "Priority": 1003, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19801116[[NVL:19801115]]" + }, + { + "Type": "S", + "Name": "GENDER greater than or equal to NVL Test", + "Description": "GENDER greater than or equal to NVL Test", + "Priority": 1004, + "AttributeLevel": "PERSON", + "AttributeName": "GENDER", + "Operator": ">=", + "Comparator": "1[[NVL:1]]" + }, + { + "Type": "S", + "Name": "GP_PRACTICE_CODE less or equal to NVL Test", + "Description": "GP_PRACTICE_CODE less than or equal to NVL Test", + "Priority": 1005, + "AttributeLevel": "PERSON", + "AttributeName": "GP_PRACTICE_CODE", + "Operator": "<=", + "Comparator": "10563[[NVL:10563]]" + }, + { + "Type": "S", + "Name": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "Description": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "Priority": 1006, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<=", + "Comparator": "-10[[NVL:<>]]" + }, + { + "Type": "S", + "Name": "LAST_INVITE_DATE W> NVL Test", + "Description": "LAST_INVITE_DATE W> NVL Test", + "Priority": 1007, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_INVITE_DATE", + "Operator": "W>", + "Comparator": "10[[NVL:<>]]" + }, + { + "Type": "S", + "Name": "LAST_VALID_DOSE_DATE Y< NVL Test", + "Description": "LAST_VALID_DOSE_DATE Y< NVL Test", + "Priority": 1008, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_VALID_DOSE_DATE", + "Operator": "Y<", + "Comparator": "-5[[NVL:<>]]" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-1.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-1.json new file mode 100644 index 000000000..6b386935b --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-1.json @@ -0,0 +1,129 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-295 - include generic text for Not Eligible (X/Y Rules)", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_A", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "Version": 1, + "Name": "ELI-295 - Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_295_cohort", + "CohortGroup": "eli_295_group", + "PositiveDescription": "You are currently in eli_295", + "NegativeDescription": "You are not currently in eli_295", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Test F Rule", + "Description": "Test F Rule", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "S", + "Name": "Test S Rule", + "Description": "Test S Rule", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "=", + "Comparator": "9900029502" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "DEFAULT_A": { + "ExternalRoutingCode": "DefaultA", + "ActionDescription": "DefaultADescription", + "ActionType": "DefaultAType", + "UrlLink": "https://www.defaultaaction.com", + "UrlLabel": "DefaultALabel" + }, + "DEFAULT_X": { + "ExternalRoutingCode": "DefaultX", + "ActionDescription": "DefaultXDescription", + "ActionType": "DefaultXType", + "UrlLink": "https://www.defaultxaction.com", + "UrlLabel": "DefaultXLabel" + }, + "OTHER_X": { + "ExternalRoutingCode": "OtherX", + "ActionDescription": "OtherXDescription", + "ActionType": "OtherXType", + "UrlLink": "https://www.otherxaction.com", + "UrlLabel": "OtherXLabel" + }, + "OTHER_Y": { + "ExternalRoutingCode": "OtherY", + "ActionDescription": "OtherYDescription", + "ActionType": "OtherYType", + "UrlLink": "https://www.otheryaction.com", + "UrlLabel": "OtherYLabel" + }, + "DEFAULT_Y": { + "ExternalRoutingCode": "DefaultY", + "ActionDescription": "DefaultYDescription", + "ActionType": "DefaultYType", + "UrlLink": "https://www.defaultyaction.com", + "UrlLabel": "DefaultYLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-2.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-2.json new file mode 100644 index 000000000..dfea9b20b --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-2.json @@ -0,0 +1,151 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": "2", + "Name": "ELI-295 - include generic text for Not Eligible (X/Y Rules)", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "", + "DefaultNotEligibleRouting": "DEFAULT_X", + "DefaultNotActionableRouting": "DEFAULT_Y", + "Version": 1, + "Name": "ELI-295 - Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_295_cohort", + "CohortGroup": "eli_295_group", + "PositiveDescription": "You are currently in eli_295", + "NegativeDescription": "You are not currently in eli_295", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Test F Rule", + "Description": "Test F Rule", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "S", + "Name": "Test S Rule", + "Description": "Test S Rule", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "in", + "Comparator": "9900029502,9900029505,9900029508,9900029511" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "X", + "Name": "Test X Rule", + "Description": "Test X Rule", + "Priority": 2000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CommsRouting": "OTHER_X" + }, + { + "Type": "Y", + "Name": "Test Y Rule", + "Description": "Test Y Rule", + "Priority": 3000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-79", + "CommsRouting": "OTHER_Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "DEFAULT_A": { + "ExternalRoutingCode": "DefaultA", + "ActionDescription": "DefaultADescription", + "ActionType": "DefaultAType", + "UrlLink": "https://www.defaultaaction.com", + "UrlLabel": "DefaultALabel" + }, + "DEFAULT_X": { + "ExternalRoutingCode": "DefaultX", + "ActionDescription": "DefaultXDescription", + "ActionType": "DefaultXType", + "UrlLink": "https://www.defaultxaction.com", + "UrlLabel": "DefaultXLabel" + }, + "OTHER_X": { + "ExternalRoutingCode": "OtherX", + "ActionDescription": "OtherXDescription", + "ActionType": "OtherXType", + "UrlLink": "https://www.otherxaction.com", + "UrlLabel": "OtherXLabel" + }, + "OTHER_Y": { + "ExternalRoutingCode": "OtherY", + "ActionDescription": "OtherYDescription", + "ActionType": "OtherYType", + "UrlLink": "https://www.otheryaction.com", + "UrlLabel": "OtherYLabel" + }, + "DEFAULT_Y": { + "ExternalRoutingCode": "DefaultY", + "ActionDescription": "DefaultYDescription", + "ActionType": "DefaultYType", + "UrlLink": "https://www.defaultyaction.com", + "UrlLabel": "DefaultYLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-3.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-3.json new file mode 100644 index 000000000..0517bf379 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-3.json @@ -0,0 +1,151 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-295 - include generic text for Not Eligible (X/Y Rules)", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "", + "DefaultNotEligibleRouting": "DEFAULT_X", + "DefaultNotActionableRouting": "DEFAULT_Y", + "Version": 1, + "Name": "ELI-295 - Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_295_cohort", + "CohortGroup": "eli_295_group", + "PositiveDescription": "You are currently in eli_295", + "NegativeDescription": "You are not currently in eli_295", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Test F Rule", + "Description": "Test F Rule", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "S", + "Name": "Test S Rule", + "Description": "Test S Rule", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "in", + "Comparator": "9900029502,9900029505,9900029508,9900029511,9900029514" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS|DEFAULT_A" + }, + { + "Type": "X", + "Name": "Test X Rule", + "Description": "Test X Rule", + "Priority": 2000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CommsRouting": "DEFAULT_X|OTHER_X" + }, + { + "Type": "Y", + "Name": "Test Y Rule", + "Description": "Test Y Rule", + "Priority": 3000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-79", + "CommsRouting": "DEFAULT_Y|OTHER_Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "DEFAULT_A": { + "ExternalRoutingCode": "DefaultA", + "ActionDescription": "DefaultADescription", + "ActionType": "DefaultAType", + "UrlLink": "https://www.defaultaaction.com", + "UrlLabel": "DefaultALabel" + }, + "DEFAULT_X": { + "ExternalRoutingCode": "DefaultX", + "ActionDescription": "DefaultXDescription", + "ActionType": "DefaultXType", + "UrlLink": "https://www.defaultxaction.com", + "UrlLabel": "DefaultXLabel" + }, + "OTHER_X": { + "ExternalRoutingCode": "OtherX", + "ActionDescription": "OtherXDescription", + "ActionType": "OtherXType", + "UrlLink": "https://www.otherxaction.com", + "UrlLabel": "OtherXLabel" + }, + "OTHER_Y": { + "ExternalRoutingCode": "OtherY", + "ActionDescription": "OtherYDescription", + "ActionType": "OtherYType", + "UrlLink": "https://www.otheryaction.com", + "UrlLabel": "OtherYLabel" + }, + "DEFAULT_Y": { + "ExternalRoutingCode": "DefaultY", + "ActionDescription": "DefaultYDescription", + "ActionType": "DefaultYType", + "UrlLink": "https://www.defaultyaction.com", + "UrlLabel": "DefaultYLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-4.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-4.json new file mode 100644 index 000000000..598c6ecb9 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-295-4.json @@ -0,0 +1,173 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-295 - include generic text for Not Eligible (X/Y Rules)", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "", + "DefaultNotEligibleRouting": "DEFAULT_X", + "DefaultNotActionableRouting": "DEFAULT_Y", + "Version": 1, + "Name": "ELI-295 - Iteration", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_295_cohort", + "CohortGroup": "eli_295_group", + "PositiveDescription": "You are currently in eli_295", + "NegativeDescription": "You are not currently in eli_295", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Test F Rule", + "Description": "Test F Rule", + "Priority": 100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75" + }, + { + "Type": "S", + "Name": "Test S Rule", + "Description": "Test S Rule", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "in", + "Comparator": "9900029517" + }, + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "X", + "Name": "Test X Rule", + "Description": "Test X Rule", + "Priority": 2000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CommsRouting": "LOWER_X" + }, + { + "Type": "X", + "Name": "Test X Rule", + "Description": "Test X Rule", + "Priority": 1999, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CommsRouting": "HIGHER_X" + }, + { + "Type": "Y", + "Name": "Test Y Rule", + "Description": "Test Y Rule", + "Priority": 3000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-79", + "CommsRouting": "LOWER_Y" + }, + { + "Type": "Y", + "Name": "Test Y Rule", + "Description": "Test Y Rule", + "Priority": 2999, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<", + "Comparator": "-79", + "CommsRouting": "HIGHER_Y" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "DEFAULT_A": { + "ExternalRoutingCode": "DefaultA", + "ActionDescription": "DefaultADescription", + "ActionType": "DefaultAType", + "UrlLink": "https://www.defaultaaction.com", + "UrlLabel": "DefaultALabel" + }, + "HIGHER_X": { + "ExternalRoutingCode": "HigherX", + "ActionDescription": "HigherXDescription", + "ActionType": "HigherXType", + "UrlLink": "https://www.higherxaction.com", + "UrlLabel": "HigherXLabel" + }, + "LOWER_X": { + "ExternalRoutingCode": "LowerX", + "ActionDescription": "LowerXDescription", + "ActionType": "LowerXType", + "UrlLink": "https://www.lowerxaction.com", + "UrlLabel": "LowerXLabel" + }, + "LOWER_Y": { + "ExternalRoutingCode": "LowerY", + "ActionDescription": "LowerYDescription", + "ActionType": "LowerYType", + "UrlLink": "https://www.loweryaction.com", + "UrlLabel": "LowerYLabel" + }, + "HIGHER_Y": { + "ExternalRoutingCode": "HigherY", + "ActionDescription": "HigherYDescription", + "ActionType": "HigherYType", + "UrlLink": "https://www.higheryaction.com", + "UrlLabel": "HigherYLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-1.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-1.json new file mode 100644 index 000000000..68bbfdb79 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-1.json @@ -0,0 +1,93 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-317-1 - Empty Actions - 9000000005", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-317 - Empty Actions - 9000000005", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_317_cohort_1", + "CohortGroup": "eli_317_cohort_1_group", + "PositiveDescription": "You are currently in eli_317_cohort_1", + "NegativeDescription": "You are not in eli_317_cohort_1", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "EMPTY_ACTION" + } + ], + "ActionsMapper": { + "EMPTY_ACTION": { + "ExternalRoutingCode": "", + "ActionDescription": "", + "ActionType": "" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-2.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-2.json new file mode 100644 index 000000000..b3e4374fc --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-2.json @@ -0,0 +1,95 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-317 - Empty Actions - 9000000006", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-317 - Empty Actions - 9000000006", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_317_cohort_2", + "CohortGroup": "eli_317_cohort_2_group", + "PositiveDescription": "You are currently in eli_317_cohort_2", + "NegativeDescription": "You are not in eli_317_cohort_2", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "EMPTY_ACTION" + } + ], + "ActionsMapper": { + "EMPTY_ACTION": { + "ExternalRoutingCode": "", + "ActionDescription": "", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-3.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-3.json new file mode 100644 index 000000000..a50ee43e1 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-3.json @@ -0,0 +1,95 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-317 - includeActions=N - 9000000008", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-317 - Empty Actions - 9000000006", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_317_cohort_3", + "CohortGroup": "eli_317_cohort_3_group", + "PositiveDescription": "You are currently in eli_317_cohort_3", + "NegativeDescription": "You are not in eli_317_cohort_3", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "ACTION_TWO" + } + ], + "ActionsMapper": { + "EMPTY_ACTION": { + "ExternalRoutingCode": "", + "ActionDescription": "", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-4.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-4.json new file mode 100644 index 000000000..c76268245 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-4.json @@ -0,0 +1,95 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-317 - includeActions=N - 9000000009", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "", + "Version": 1, + "Name": "ELI-317 - Empty Actions - 9000000006", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_317_cohort_4", + "CohortGroup": "eli_317_cohort_4_group", + "PositiveDescription": "You are currently in eli_317_cohort_4", + "NegativeDescription": "You are not in eli_317_cohort_4", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "ACTION_TWO" + } + ], + "ActionsMapper": { + "EMPTY_ACTION": { + "ExternalRoutingCode": "", + "ActionDescription": "", + "ActionType": "", + "UrlLink": null, + "UrlLabel": "" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-5.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-5.json new file mode 100644 index 000000000..8f3423553 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-317-5.json @@ -0,0 +1,94 @@ +{ + "CampaignConfig": { + "ID": "<>", + "Version": 1, + "Name": "ELI-317 - Multiple Actions - 9000000010", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "DEFAULT_ACTION", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": ",<>", + "DefaultCommsRouting": "DEFAULT_ACTION", + "Version": 1, + "Name": "ELI-317 - Multiple Actions - 9000000010", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "eli_317_cohort_5", + "CohortGroup": "eli_317_cohort_5_group", + "PositiveDescription": "You are currently in eli_317_cohort_5", + "NegativeDescription": "You are not in eli_317_cohort_5", + "Priority": 1 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "ACTION_ONE|ACTION_TWO|ACTION_THREE" + } + ], + "ActionsMapper": { + "ACTION_ONE": { + "ExternalRoutingCode": "ActionOneRoutingCode", + "ActionDescription": "ActionOneDescription", + "ActionType": "ActionOneActionType", + "UrlLink": "http://www.actiononeurl.com", + "UrlLabel": "ActiononeUrlLabel" + }, + "ACTION_TWO": { + "ExternalRoutingCode": "ActionTwoRoutingCode", + "ActionDescription": "ActionTwoDescription", + "ActionType": "ActionTwoActionType", + "UrlLink": "http://www.actiontwourl.com", + "UrlLabel": "ActionTwoUrlLabel" + }, + "ACTION_THREE": { + "ExternalRoutingCode": "ActionThreeRoutingCode", + "ActionDescription": "ActionThreeDescription", + "ActionType": "ActionThreeActionType", + "UrlLink": "http://www.actionthreeurl.com", + "UrlLabel": "ActionThreeUrlLabel" + }, + "DEFAULT_ACTION": { + "ExternalRoutingCode": "DefaultAction", + "ActionDescription": "DefaultActionDescription", + "ActionType": "DefaultActionType", + "UrlLink": "https://www.defaultactionurl.com", + "UrlLabel": "DefaultLabel" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-COVID.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-COVID.json new file mode 100644 index 000000000..b31ff7883 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-COVID.json @@ -0,0 +1,73 @@ +{ + "CampaignConfig": { + "ID": "CC1234", + "Version": 1, + "Name": "ELI-320 - COVID Config", + "Type": "V", + "Target": "COVID", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250601", + "EndDate": "20260601", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "IC1234", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-320 - COVID Iteration Config", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "covid_cohort", + "CohortGroup": "covid_cohort_group", + "PositiveDescription": "You are currently in a covid cohort", + "NegativeDescription": "You are not currently in a covid cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "COVID", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D<=", + "Comparator": "0" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an COVID vaccination appointment\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-covid", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-MMR.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-MMR.json new file mode 100644 index 000000000..27b8282f3 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-MMR.json @@ -0,0 +1,74 @@ +{ + "CampaignConfig": { + "ID": "CC8901", + "Version": 1, + "Name": "ELI-320 - MMR Config", + "Type": "V", + "Target": "MMR", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "CONTACT_GP", + "StartDate": "20250612", + "EndDate": "20260713", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "IC8901", + "DefaultCommsRouting": "CONTACT_GP", + "Version": 1, + "Name": "ELI-320 - MMR Iteration Config", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "mmr_cohort", + "CohortGroup": "mmr_cohort_group", + "PositiveDescription": "You are currently in a mmr cohort", + "NegativeDescription": "You are not currently in an mmr cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable if future appointment is booked", + "Description": "Book An Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "MMR", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an MMR vaccination appointment\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/amend-mmr", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-RSV.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-RSV.json new file mode 100644 index 000000000..5576a951e --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-RSV.json @@ -0,0 +1,74 @@ +{ + "CampaignConfig": { + "ID": "CC5678", + "Version": 1, + "Name": "ELI-320 - RSV Config", + "Type": "V", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "AmendNBS", + "StartDate": "20250612", + "EndDate": "20260713", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "IC5678", + "DefaultCommsRouting": "AmendNBS", + "Version": 1, + "Name": "ELI-320 - RSV Iteration Config", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_cohort", + "CohortGroup": "rsv_cohort_group", + "PositiveDescription": "You are currently in an RSV cohort", + "NegativeDescription": "You are not currently in an RSV cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-1.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-1.json new file mode 100644 index 000000000..2ee8ba910 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-1.json @@ -0,0 +1,74 @@ +{ + "CampaignConfig": { + "ID": "CC56789", + "Version": 1, + "Name": "ELI-320 - FLU SCREENING Config", + "Type": "S", + "Target": "FLU", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "AmendNBS", + "StartDate": "20250612", + "EndDate": "20260713", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "IC56789", + "DefaultCommsRouting": "AmendNBS", + "Version": 1, + "Name": "ELI-320 - FLU Screening Iteration Config", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "FLU_screening_cohort", + "CohortGroup": "FLU_screening_cohort_group", + "PositiveDescription": "You are currently in an flu SCREENING cohort", + "NegativeDescription": "You are not currently in an flu SCREENING cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an flu screening appointment\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-bs", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-2.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-2.json new file mode 100644 index 000000000..8502bedc6 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-320-SCREENING-2.json @@ -0,0 +1,74 @@ +{ + "CampaignConfig": { + "ID": "CC567891", + "Version": 1, + "Name": "ELI-320 - RSV SCREENING Config", + "Type": "S", + "Target": "RSV", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "DefaultCommsRouting": "AmendNBS", + "StartDate": "20250612", + "EndDate": "20260713", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Iterations": [ + { + "ID": "IC567891", + "DefaultCommsRouting": "AmendNBS", + "Version": 1, + "Name": "ELI-320 - RSV SCREENING Iteration Config", + "IterationDate": "20250601", + "IterationNumber": 1, + "CommsType": "I", + "DefaultNotEligibleRouting": "", + "DefaultNotActionableRouting": "", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_screening_cohort", + "CohortGroup": "rsv_screening_cohort_group", + "PositiveDescription": "You are currently in an RSV SCREENING cohort", + "NegativeDescription": "You are not currently in an RSV SCREENING cohort", + "Priority": 0 + } + ], + "IterationRules": [ + { + "Type": "R", + "Name": "Actionable Future Booked Appointment", + "Description": "Actionable Future Booked Appointment", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "AMEND_NBS" + } + ], + "ActionsMapper": { + "AMEND_NBS": { + "ExternalRoutingCode": "AmendNBS", + "ActionDescription": "##You have an bowel screening appointment\nYou can view, change or cancel your appointment below.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-bs", + "UrlLabel": "Manage your appointment" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json new file mode 100644 index 000000000..8b7148750 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json @@ -0,0 +1,457 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "EliD RSV example config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "CHECK_CORRECT_X", + "Version": 1, + "Name": "EliD RSV example config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old", + "NegativeDescription": "are not aged 75 to 79 years old", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone without a future booking from magic cohort", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "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.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "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.", + "Priority": 140, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 150, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 80 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 160 + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 80 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 170 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 75-79 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 180 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 75-79 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 190 + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Local Appointment", + "Description": "Amend local future booking", + "Priority": 1100, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB", + "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" + }, + { + "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": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + }, + { + "Type": "R", + "Name": "Within CP Expansion Local Authority", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "Operator": "in", + "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" + }, + { + "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": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated default text", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "CommsRouting": "CHECK_CORRECT_ALREADY_VACCINATED" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3200, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3300, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "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.", + "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.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "HELP_SUPPORT": { + "ExternalRoutingCode": "HelpSupportInfo", + "ActionDescription": "## CONTENT TBC\n\nBlah blah blah.", + "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)", + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365v0.5.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365v0.5.json new file mode 100644 index 000000000..e0deed583 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365v0.5.json @@ -0,0 +1,457 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "EliD RSV example config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "CHECK_CORRECT_X", + "Version": 1, + "Name": "EliD RSV example config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old", + "NegativeDescription": "are not aged 75 to 79 years old", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone without a future booking from magic cohort", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "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.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "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.", + "Priority": 140, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 150, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 80 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 160 + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 80 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 170 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 75-79 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 180 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 75-79 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 190 + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\n\n We believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 510, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 520, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 530, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 540, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting with no future booking", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 550, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "Description": "## Getting the vaccine\n\n We believe you're living in a setting where care is provided.\n\n Speak to a member of staff where you live about getting the RSV vaccine.", + "Priority": 560, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Local Appointment", + "Description": "Amend local future booking", + "Priority": 1100, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "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" + }, + { + "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": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + }, + { + "Type": "R", + "Name": "Within CP Expansion Local Authority", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "Operator": "in", + "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" + }, + { + "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": "BOOK_LOCAL|BOOK_NBS|HELP_SUPPORT" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated default text", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "CommsRouting": "CHECK_CORRECT_ALREADY_VACCINATED" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3200, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3300, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + }, + "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" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "BOOK_LOCAL": { + "ExternalRoutingCode": "BookLocal", + "ActionDescription": "## Getting the vaccine\n\n You can get an RSV vaccination at your GP surgery.\n Your 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\n Contact your healthcare provider to change or cancel your appointment.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "HELP_SUPPORT": { + "ExternalRoutingCode": "HelpSupportInfo", + "ActionDescription": "## If you think this is incorrect\n\n If you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://digital.nhs.uk/services/eligibility-data-product-elid).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "CHECK_CORRECT_X": { + "ExternalRoutingCode": "HealthcareProInfo", + "ActionDescription": "## If you think this is incorrect\n\n Speak to your healthcare professional if you think you should be offered this vaccine.\n\nFor anything else, visit our [help and support page](https://digital.nhs.uk/services/eligibility-data-product-elid).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "CHECK_CORRECT_ALREADY_VACCINATED": { + "ExternalRoutingCode": "AlreadyVaccinatedInfo", + "ActionDescription": "## If you think this is incorrect\n\n If 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://digital.nhs.uk/services/eligibility-data-product-elid).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "CHECK_CORRECT_OTHER_SETTING": { + "ExternalRoutingCode": "ManagedSettingInfo", + "ActionDescription": "## If you think this is incorrect\n\n If you have already had this vaccination or your personal details are wrong, visit our [help and support page](https://digital.nhs.uk/services/eligibility-data-product-elid).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-01.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-01.json new file mode 100644 index 000000000..a0d7e8835 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-01.json @@ -0,0 +1,459 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "EliD RSV example config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "CHECK_CORRECT_X", + "Version": 1, + "Name": "EliD RSV example config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old", + "NegativeDescription": "are not aged 75 to 79 years old", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Description": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove anyone without a future booking from magic cohort", + "Description": "Remove anyone without a future booking from magic cohort", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 140, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 150, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Care Home) with no future booking", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Care Home) with no future booking", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Detained Estates) with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Detained Estates) with no future booking", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (13Q) with no future booking", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (13Q) with no future booking - 2", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Care Home) with no future booking", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Care Home) with no future booking", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Detained Estates) with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Detained Estates) with no future booking", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (13Q) with no future booking", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (13Q) with no future booking - 2", + "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, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment - 2", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Local Appointment", + "Description": "Amend local future booking", + "Priority": 1100, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB", + "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" + }, + { + "Type": "R", + "Name": "Within CP Expansion Local Authority", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "Operator": "in", + "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" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated default text", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "CommsRouting": "CHECK_CORRECT_ALREADY_VACCINATED" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3200, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3300, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "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.", + "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.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "HELP_SUPPORT": { + "ExternalRoutingCode": "HelpSupportInfo", + "ActionDescription": "## CONTENT TBC\n\nBlah blah blah.", + "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)", + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-02.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-02.json new file mode 100644 index 000000000..4c546d253 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-373-02.json @@ -0,0 +1,453 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "EliD RSV example config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "CHECK_CORRECT_X", + "Version": 1, + "Name": "EliD RSV example config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old", + "NegativeDescription": "are not aged 75 to 79 years old", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Description": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove anyone without a future booking from magic cohort", + "Description": "Remove anyone without a future booking from magic cohort", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Under Age - Under 75 Years on day of execution", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 75 years is filtered out.", + "Priority": 140, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Exclude Too OLD", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 150, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Care Home) with no future booking", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "N" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Care Home) with no future booking", + "Description": "", + "Priority": 510, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Detained Estates) with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (Detained Estates) with no future booking", + "Description": "", + "Priority": 520, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (13Q) with no future booking", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "80 plus - Other Setting (13Q) with no future booking", + "Description": "", + "Priority": 530, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Care Home) with no future booking", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Care Home) with no future booking", + "Description": "", + "Priority": 540, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Detained Estates) with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (Detained Estates) with no future booking", + "Description": "", + "Priority": 550, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (13Q) with no future booking", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "75 to 79 - Other Setting (13Q) with no future booking - 2", + "Description": "", + "Priority": 560, + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment - 2", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Local Appointment", + "Description": "Amend local future booking", + "Priority": 1100, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB", + "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" + }, + { + "Type": "R", + "Name": "Within CP Expansion Local Authority", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "Operator": "in", + "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" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated default text", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "CommsRouting": "CHECK_CORRECT_ALREADY_VACCINATED" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3200, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3300, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "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.", + "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.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "HELP_SUPPORT": { + "ExternalRoutingCode": "HelpSupportInfo", + "ActionDescription": "## CONTENT TBC\n\nBlah blah blah.", + "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)", + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-01.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-01.json new file mode 100644 index 000000000..b16724007 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-01.json @@ -0,0 +1,73 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-01-Iteration-Config", + "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": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-399-01-Iteration-Config", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_cohort_1", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group_10", + "NegativeDescription": "are not a member of eli_399_cohort_group_10", + "Priority": 10 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_cohort_1", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-02.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-02.json new file mode 100644 index 000000000..32761d36c --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-02.json @@ -0,0 +1,192 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-02-Iteration-Config", + "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": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "inactive-future-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "inactive-future-iteration", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "CohortGroup": "rsv_eli_399_inactive_cohort_group_other", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + }, + { + "ID": "active-current-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "active-current-iteration", + "IterationDate": "<>", + "IterationNumber": 2, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_active_cohort_1", + "CohortGroup": "rsv_eli_399_active_cohort_group", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_2", + "CohortGroup": "rsv_eli_399_active_cohort_group", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_3", + "CohortGroup": "rsv_eli_399_active_cohort_group_other", + "PositiveDescription": "are a member of eli_399_active_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_active_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_active_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_active_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_active_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-03.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-03.json new file mode 100644 index 000000000..c6e5c25c3 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-03.json @@ -0,0 +1,192 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-03-Iteration-Config", + "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": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "older-past-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "older-past-iteration", + "IterationDate": "<>", + "IterationNumber": 2, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "CohortGroup": "rsv_eli_399_inactive_cohort_group_other", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + }, + { + "ID": "active-current-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "active-current-iteration", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_active_cohort_1", + "CohortGroup": "rsv_eli_399_active_cohort_group", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_2", + "CohortGroup": "rsv_eli_399_active_cohort_group", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_3", + "CohortGroup": "rsv_eli_399_active_cohort_group_other", + "PositiveDescription": "are a member of eli_399_active_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_active_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_active_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_active_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_active_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-04.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-04.json new file mode 100644 index 000000000..301a57279 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-04.json @@ -0,0 +1,192 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-04-Iteration-Config", + "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": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "future-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "future-iteration-iteration", + "IterationDate": "<>", + "IterationNumber": 2, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "CohortGroup": "rsv_eli_399_inactive_cohort_group", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "CohortGroup": "rsv_eli_399_inactive_cohort_group_other", + "PositiveDescription": "are a member of eli_399_inactive_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_inactive_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_inactive_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_inactive_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_inactive_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + }, + { + "ID": "more-future-iteration-id", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "more-future-iteration", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_active_cohort_1", + "CohortGroup": "rsv_eli_399_active_cohort_group", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_2", + "CohortGroup": "rsv_eli_399_active_cohort_group_2", + "PositiveDescription": "are a member of eli_399_active_cohort_group", + "NegativeDescription": "are not a member of eli_399_active_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_active_cohort_3", + "CohortGroup": "rsv_eli_399_active_cohort_group_other", + "PositiveDescription": "are a member of eli_399_active_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_active_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_active_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_active_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_active_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-05.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-05.json new file mode 100644 index 000000000..f17eb2053 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-05.json @@ -0,0 +1,110 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-05-Iteration-Config", + "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": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-399-05-Iteration", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_cohort_1", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group", + "NegativeDescription": "are not a member of eli_399_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_cohort_2", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group", + "NegativeDescription": "are not a member of eli_399_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_cohort_3", + "CohortGroup": "rsv_eli_399_cohort_group_other", + "PositiveDescription": "are a member of eli_399_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-06.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-06.json new file mode 100644 index 000000000..5c57bb551 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-06.json @@ -0,0 +1,110 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-06-Iteration-Config", + "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": "20300801", + "EndDate": "20350807", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "ELI-399-06-Iteration", + "IterationDate": "20300805", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_cohort_1", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group", + "NegativeDescription": "are not a member of eli_399_cohort_group", + "Priority": 0 + }, + { + "CohortLabel": "rsv_eli_399_cohort_2", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group", + "NegativeDescription": "are not a member of eli_399_cohort_group", + "Priority": 10 + }, + { + "CohortLabel": "rsv_eli_399_cohort_3", + "CohortGroup": "rsv_eli_399_cohort_group_other", + "PositiveDescription": "are a member of eli_399_cohort_group_other", + "NegativeDescription": "are not a member of eli_399_cohort_group_other", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_cohort_1", + "Priority": 100, + "RuleStop:": "Y" + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 4", + "Operator": "=", + "Comparator": "AAB", + "AttributeLevel": "PERSON", + "AttributeName": "ICB", + "CohortLabel": "rsv_eli_399_cohort_2", + "Priority": 110 + }, + { + "Type": "S", + "Name": "NotActionable Reason", + "Description": "Description 3", + "Operator": "=", + "Comparator": "ZZY", + "AttributeLevel": "PERSON", + "AttributeName": "COMMISSIONING_REGION", + "CohortLabel": "rsv_eli_399_cohort_3", + "Priority": 120 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-07.json b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-07.json new file mode 100644 index 000000000..4e901dce6 --- /dev/null +++ b/tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-399-07.json @@ -0,0 +1,73 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "ELI-399-07-Iteration-Config", + "Type": "V", + "Target": "COVID", + "Manager": [ + "person1@nhs.net" + ], + "Approver": [ + "person1@nhs.net" + ], + "Reviewer": [ + "person1@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "<>", + "EndDate": "<>", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "Active Covid Iteration", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_eli_399_cohort_1", + "CohortGroup": "rsv_eli_399_cohort_group", + "PositiveDescription": "are a member of eli_399_cohort_group_10", + "NegativeDescription": "are not a member of eli_399_cohort_group_10", + "Priority": 10 + } + ], + "IterationRules": [ + { + "Type": "S", + "Name": "NotActionable Reason 1", + "Description": "Description 1", + "Operator": "Y>", + "Comparator": "-75", + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "CohortLabel": "rsv_eli_399_cohort_1", + "Priority": 100 + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Continue to booking" + } + } + } + ] + } +} diff --git a/tests/e2e/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json b/tests/e2e/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json new file mode 100644 index 000000000..f92afbfed --- /dev/null +++ b/tests/e2e/data/configs/vitaIntegrationTestConfigs/vita_integration_test_config.json @@ -0,0 +1,479 @@ +{ + "CampaignConfig": { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0", + "Version": 1, + "Name": "EliD RSV example config", + "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": "PLACEHOLDER_COMMS_ROUTING", + "Iterations": [ + { + "ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1", + "DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "CHECK_CORRECT_X", + "Version": 1, + "Name": "EliD RSV example config", + "IterationDate": "20250717", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "IterationCohorts": [ + { + "CohortLabel": "rsv_75to79", + "CohortGroup": "rsv_age", + "PositiveDescription": "are aged 75 to 79 years old", + "NegativeDescription": "are not aged 75 to 79 years old", + "Priority": 0 + }, + { + "CohortLabel": "rsv_80_since_02_Sept_2024", + "CohortGroup": "rsv_age_catchup", + "PositiveDescription": "turned 80 after 1st September 2024", + "NegativeDescription": "did not turn 80 after 1 September 2024", + "Priority": 10 + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 20 + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone NOT already vaccinated within the last 25 years and do not have a future booking from the magic cohort", + "Operator": "Y<=", + "Comparator": "-25[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone without a future booking from magic cohort", + "Operator": "D<", + "Comparator": "0[[NVL:18000101]]", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "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.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_75to79" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 130, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "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.", + "Priority": 140, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-75", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove over 80 on day of execution", + "Description": "Exclude anyone who turned 80 before 2nd September 2024", + "Priority": 150, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "<", + "Comparator": "19440902", + "CohortLabel": "rsv_80_since_02_Sept_2024" + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 80 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 160 + }, + { + "Type": "F", + "Name": "Remove from rsv 80 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 80 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "Priority": 170 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if already vaccinated", + "Description": "Remove anyone already vaccinated from 75-79 cohort", + "Operator": "Y>=", + "Comparator": "-25", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 180 + }, + { + "Type": "F", + "Name": "Remove from rsv 75-79 cohort if future booking", + "Description": "Remove anyone with a future booking from RSV 75-79 cohort", + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "rsv_75to79", + "Priority": 190 + }, + { + "Type": "S", + "Name": "Not Available", + "Description": "##RSV vaccinations are not currently available\n\nPlease try again soon.", + "Priority": 195, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "=", + "Comparator": "9658218997", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "NotYetDue", + "Description": "##Your RSV vaccination is not yet due\\n\\nYour next dose will be due in 3 months.", + "Priority": 196, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "=", + "Comparator": "9658219012", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "##You have recently have the RSV vaccination\n\nYou must leave 90 days between doses of the RSV vaccine. Please try again soon.", + "Priority": 197, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "=", + "Comparator": "9658220142", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Empty Suggestion", + "Description": "", + "Priority": 198, + "AttributeLevel": "PERSON", + "AttributeName": "NHS_NUMBER", + "Operator": "=", + "Comparator": "9658219004", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Already Vaccinated", + "Description": "## You've had your RSV vaccination\n\nWe believe you had your vaccination.", + "Priority": 200, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_80_since_02_Sept_2024", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting with no future booking", + "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", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "Other Setting", + "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", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CohortLabel": "rsv_75to79", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked NBS Appointment", + "Description": "Amend NBS future booking", + "Priority": 1000, + "Operator": "=", + "Comparator": "NBS", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "CommsRouting": "AMEND_NBS" + }, + { + "Type": "R", + "Name": "Actionable Future Booked Local Appointment", + "Description": "Amend local future booking", + "Priority": 1100, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "RSV", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CommsRouting": "MANAGE_LOCAL" + }, + { + "Type": "R", + "Name": "Within CP Expansion ICB", + "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" + }, + { + "Type": "R", + "Name": "Within CP Expansion Local Authority", + "Description": "Book an appointment on NBS as within CP expansion", + "Priority": 1300, + "Operator": "in", + "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" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated default text", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "RSV", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "Y>=", + "Comparator": "-25", + "CommsRouting": "CHECK_CORRECT_ALREADY_VACCINATED" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "CARE_HOME_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3200, + "AttributeLevel": "PERSON", + "AttributeName": "DE_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + }, + { + "Type": "Y", + "Name": "Other setting default text", + "Description": "Other setting default text", + "Priority": 3300, + "AttributeLevel": "PERSON", + "AttributeName": "13Q_FLAG", + "Operator": "=", + "Comparator": "Y", + "CommsRouting": "CHECK_CORRECT_OTHER_SETTING" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-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.", + "ActionType": "ButtonWithAuthLink", + "UrlLink": "http://www.nhs.uk/book-rsv", + "UrlLabel": "Manage your appointment" + }, + "CONTACT_GP": { + "ExternalRoutingCode": "ContactGP", + "ActionDescription": "Contact your GP", + "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.", + "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.", + "ActionType": "CardWithText", + "UrlLink": null, + "UrlLabel": "" + }, + "HELP_SUPPORT": { + "ExternalRoutingCode": "HelpSupportInfo", + "ActionDescription": "## CONTENT TBC\n\nBlah blah blah.", + "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)", + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "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).", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_001.json b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_001.json new file mode 100644 index 000000000..9fb6c6e64 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_001.json @@ -0,0 +1,41 @@ +{ + "scenario_name": "ELI-406 - Missing Person Attribute, Cohort and Target Present", + "request_headers": { + "nhs-login-nhs-number": "9900406001" + }, + "expected_response_code": 404, + "config_filenames": [ + "AUTO_RSV_ELI-406-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900406001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_406_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900406001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_002.json b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_002.json new file mode 100644 index 000000000..16e3ef457 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_002.json @@ -0,0 +1,19 @@ +{ + "scenario_name": "ELI-406 - Missing Person Attribute, Target Present", + "request_headers": { + "nhs-login-nhs-number": "9900406002" + }, + "expected_response_code": 404, + "config_filenames": [ + "AUTO_RSV_ELI-406-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900406002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_003.json b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_003.json new file mode 100644 index 000000000..49f89d482 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/AUTO_RSV_ELI-406_003.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "ELI-406 - Missing Person Attribute, Cohort Present", + "request_headers": { + "nhs-login-nhs-number": "9900406003" + }, + "expected_response_code": 404, + "config_filenames": [ + "AUTO_RSV_ELI-406-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900406003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_406_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_406_cohort_4", + "DATE_JOINED": "20231020" + } + ] + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_001.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_001.json new file mode 100644 index 000000000..0bd1dab97 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_001.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - Actionable Cohort Grouping Text - all have descriptions", + "request_headers": { + "nhs-login-nhs-number": "9900220001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220001", + "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": "9900220001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_002.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_002.json new file mode 100644 index 000000000..e648620f6 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_002.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - Actionable Cohort Grouping Text - highest prio no description", + "request_headers": { + "nhs-login-nhs-number": "9900220002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220002", + "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": "9900220002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_003.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_003.json new file mode 100644 index 000000000..c4f0b32c1 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_003.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - NotActionable Cohort Grouping Text - all have descriptions", + "request_headers": { + "nhs-login-nhs-number": "9900220003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-03.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220003", + "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": "2209900220003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_004.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_004.json new file mode 100644 index 000000000..fec870ce3 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_004.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - NotActionable Cohort Grouping Text - highest prio has no description", + "request_headers": { + "nhs-login-nhs-number": "9900220004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-04.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220004", + "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": "2209900220004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_005.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_005.json new file mode 100644 index 000000000..d76c98660 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_005.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - NotEligible Cohort Grouping - all have descriptions", + "request_headers": { + "nhs-login-nhs-number": "9900220005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-05.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220005", + "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": "2209900220005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_006.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_006.json new file mode 100644 index 000000000..473a82191 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-220-371/AUTO_RSV_ELI-220_006.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-220 - NotEligible Cohort Grouping - highest prio has no description", + "request_headers": { + "nhs-login-nhs-number": "9900220006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-220-06.json" + ], + "data": [ + { + "NHS_NUMBER": "9900220006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_220_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_3", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_220_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900220006", + "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": "2209900220006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_001.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_001.json new file mode 100644 index 000000000..e27daa61a --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_001.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger No Suitability Rules - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900247001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247001", + "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": "9900247001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_002.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_002.json new file mode 100644 index 000000000..aadf9602c --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_002.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 1 Suitability Rule - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900247002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247002", + "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": "9900247002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_003.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_003.json new file mode 100644 index 000000000..1c4184309 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_003.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 2 Suitability Rules - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900247003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247003", + "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": "AAA", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900247003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_004.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_004.json new file mode 100644 index 000000000..472e91fc0 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_004.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 3 Suitability Rules with Different Names - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900247004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247004", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900247004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_005.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_005.json new file mode 100644 index 000000000..b07b7a3ad --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_005.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 3 Suitability Rules 2 with same name 1 with different Name - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900247005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-05.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247005", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900247005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_006.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_006.json new file mode 100644 index 000000000..92f7668e9 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_006.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 3 Suitability Rules all with same names - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900247006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-06.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247006", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900247006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_007.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_007.json new file mode 100644 index 000000000..615a82e60 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-274-371/AUTO_RSV_ELI-274_007.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-274 - Create/return Not Actionable reasons - Trigger 3 Suitability Rules all with same names - 1st No description - NotActionable", + "request_headers": { + "nhs-login-nhs-number": "9900247007" + }, + "config_filenames": [ + "AUTO_RSV_ELI-274-07.json" + ], + "data": [ + { + "NHS_NUMBER": "9900247007", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900247007", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900247007", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json new file mode 100644 index 000000000..1f085096c --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_001.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - No F no S - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900376001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376001", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376001", + "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": "9900376001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json new file mode 100644 index 000000000..492ad0cde --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_002.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - Single F Rule - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900376002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376002", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376002", + "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": "9900376002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json new file mode 100644 index 000000000..17c1f6de3 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_003.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - One F Rule One S Rule", + "request_headers": { + "nhs-login-nhs-number": "9900376003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-03.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376003", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376003", + "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": "9900376003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json new file mode 100644 index 000000000..46fd8abfa --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_004.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - Multiple F Rules - Actionable", + "request_headers": { + "nhs-login-nhs-number": "9900376004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-04.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376004", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376004", + "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": "9900376004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json new file mode 100644 index 000000000..e52ce68d4 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_005.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - Multiple F Rules - NotEligible", + "request_headers": { + "nhs-login-nhs-number": "9900376005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-05.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376005", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376005", + "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": "9900376005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json new file mode 100644 index 000000000..85579eb04 --- /dev/null +++ b/tests/e2e/data/dynamoDB/inProgressTestData/ELI-376-405/AUTO_RSV_ELI-376_010.json @@ -0,0 +1,58 @@ +{ + "scenario_name": "ELI-376 - Audit Records - Multiple F & S Rules", + "request_headers": { + "nhs-login-nhs-number": "9900376010" + }, + "config_filenames": [ + "AUTO_RSV_ELI-376-10.json" + ], + "data": [ + { + "NHS_NUMBER": "9900376010", + "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", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900376010", + "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": "9900376010", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_001.json b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_001.json new file mode 100644 index 000000000..45f2c6690 --- /dev/null +++ b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_001.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - Integration - Actionable due to membership of an Age Cohort including suggested national booking action (actions requested)", + "request_headers": { + "nhs-login-nhs-number": "9735548844" + }, + "config_filename": "AUTO_RSV_INT_001.json", + "data": [ + { + "NHS_NUMBER": "9735548844", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20250604" + } + } + } + } + } + } + }, + { + "NHS_NUMBER": "9735548844", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_002.json b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_002.json new file mode 100644 index 000000000..fa1bee067 --- /dev/null +++ b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_002.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - Integration - Actionable due to membership of an Age Cohort including suggested action (not national booking)", + "request_headers": { + "nhs-login-nhs-number": "9735548852" + }, + "config_filename": "AUTO_RSV_INT_001.json", + "data": [ + { + "NHS_NUMBER": "9735548852", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75_rolling": { + "M": { + "dateJoined": { + "S": "20250604" + } + } + } + } + } + } + }, + { + "NHS_NUMBER": "9735548852", + "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/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_003.json b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_003.json new file mode 100644 index 000000000..ed8db868c --- /dev/null +++ b/tests/e2e/data/dynamoDB/integrationTestData/AUTO_RSV_INT_003.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - Integration - Actionable due to membership of an alternative Age Cohort including suggested action (not national booking)", + "request_headers": { + "nhs-login-nhs-number": "9735548860" + }, + "config_filename": "AUTO_RSV_INT_001.json", + "data": [ + { + "NHS_NUMBER": "9735548860", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MAP": { + "cohorts": { + "M": { + "rsv_75to79_2024": { + "M": { + "dateJoined": { + "S": "20250604" + } + } + } + } + } + } + }, + { + "NHS_NUMBER": "9735548860", + "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/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_001.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_001.json new file mode 100644 index 000000000..dc4879b1a --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_001.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Regression - Actionable, Single Eligible Cohort", + "request_headers": { + "nhs-login-nhs-number": "1000000001" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_2", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "1000000001", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_002.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_002.json new file mode 100644 index 000000000..8a649222e --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_002.json @@ -0,0 +1,43 @@ +{ + "scenario_name": "RSV - Regression - Actionable, Two Eligible Cohorts, Different Groups", + "request_headers": { + "nhs-login-nhs-number": "1000000002" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "1000000002", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_003.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_003.json new file mode 100644 index 000000000..360107070 --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_003.json @@ -0,0 +1,43 @@ +{ + "scenario_name": "RSV - Regression - Actionable, Two Eligible Cohorts, Same Group", + "request_headers": { + "nhs-login-nhs-number": "1000000003" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "1000000003", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010-1.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010-1.json new file mode 100644 index 000000000..542c97dfc --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010-1.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Regression - Not Eligible, In Cohort - Future Date", + "request_headers": { + "nhs-login-nhs-number": "1100000010" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1100000010", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_2", + "DATE_JOINED": "<>" + } + ] + }, + { + "NHS_NUMBER": "1100000010", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010.json new file mode 100644 index 000000000..ecf3c2fc7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_010.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Regression - Not Eligible, Not in Cohort", + "request_headers": { + "nhs-login-nhs-number": "1000000010" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000010", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_22", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "1000000010", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_011.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_011.json new file mode 100644 index 000000000..196f37f9f --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_011.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Regression - Not Eligible, In Cohort, Filter Rule", + "request_headers": { + "nhs-login-nhs-number": "1000000011" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000011", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "1000000011", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_012.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_012.json new file mode 100644 index 000000000..8fdd7062c --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_012.json @@ -0,0 +1,29 @@ +{ + "scenario_name": "RSV - Regression - Not Eligible, In Magic Cohort, Filtered out Rule", + "request_headers": { + "nhs-login-nhs-number": "1000000012" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000012", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_013.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_013.json new file mode 100644 index 000000000..e0abd3e5f --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_013.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "RSV - Regression - Eligible, In Magic Cohort", + "request_headers": { + "nhs-login-nhs-number": "1000000013" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000013", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "1000000013", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_050.json b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_050.json new file mode 100644 index 000000000..940fd5c71 --- /dev/null +++ b/tests/e2e/data/dynamoDB/regressionTestData/AUTO_RSV_REG_050.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "RSV - Regression - NotActionable, Rule Stop Suppression", + "request_headers": { + "nhs-login-nhs-number": "1000000050" + }, + "config_filenames": [ + "AUTO_RSV_REG_001.json" + ], + "data": [ + { + "NHS_NUMBER": "1000000050", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS2", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "1000000050", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_001.json similarity index 70% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_001.json index 457437429..48e951bbe 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_001.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_001.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Actionable due to membership of an Age Cohort incl. suggested actions (with booking)", + "request_headers": { + "nhs-login-nhs-number": "5000000001" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000001", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000001", @@ -24,7 +23,7 @@ "DATE_OF_BIRTH": "<>", "GENDER": "0", "POSTCODE": "LS1 1AB", - "POSTCODE_SECTOR": "LS1", + "POSTCODE_SECTOR": "LS2", "POSTCODE_OUTCODE": "1AB", "MSOA": "E02001111", "LSOA": "E01005348", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_002.json similarity index 73% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_002.json index 78026a684..aab28ffe8 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_002.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_002.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Actionable due to membership of an Age Cohort incl. suggested action (not booking)", + "request_headers": { + "nhs-login-nhs-number": "5000000002" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000002", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000002", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_003.json similarity index 73% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_003.json index df7ceced6..2ad4133a7 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_003.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_003.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Actionable due to membership of an alternative Age Cohort incl. suggested action", + "request_headers": { + "nhs-login-nhs-number": "5000000003" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000003", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75to79_2024": { - "M": { - "dateJoined": { - "S": "20221120" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79_2024", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000003", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_004.json similarity index 77% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_004.json index ed6764ede..bff06eff0 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_004.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_004.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Actionable due to membership of an Age Cohort incl. suggested action (existing national booking)", + "request_headers": { + "nhs-login-nhs-number": "5000000004" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000004", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "no_group_description", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000004", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_005.json similarity index 77% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_005.json index 1892dd217..fab88f8be 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_005.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_005.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Actionable due to membership of an Age Cohort incl. suggested actions (with local booking)", + "request_headers": { + "nhs-login-nhs-number": "5000000005" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000005", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "no_group_description", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000005", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_006.json similarity index 67% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_006.json index f1101ccc4..7f5071755 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_006.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_006.json @@ -1,22 +1,22 @@ { "scenario_name": "RSV - Not Actionable despite membership of an Age Cohort, already vaccinated", + "request_headers": { + "nhs-login-nhs-number": "5000000006" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], + "notes": "actions need updating in the response when the functionality is delivered to provide actions for not_actionable responses", "data": [ { "NHS_NUMBER": "5000000006", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "no_group_description", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000006", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_007.json similarity index 52% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_007.json index 3c9c46c5e..20516426e 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_007.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_007.json @@ -1,22 +1,21 @@ { - "scenario_name": "RSV - Not Actionable, membership of Age Cohort, no available vaccinations (not available type 1)", + "scenario_name": "RSV - Not Actionable despite to membership of an Age Cohort with reasoning of no available vaccinations (not available type 1)", + "request_headers": { + "nhs-login-nhs-number": "5000000007" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000007", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000007", @@ -30,16 +29,11 @@ "LSOA": "E01005348", "GP_PRACTICE_CODE": "B87008", "PCN": "U43084", - "ICB": "<>", + "ICB": "SUPPRESSED_ICB", "COMMISSIONING_REGION": "Y63", "13Q_FLAG": "N", "CARE_HOME_FLAG": "N", "DE_FLAG": "N" - }, - { - "NHS_NUMBER": "5000000007", - "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": "<>" } ] } diff --git a/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_008.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_008.json new file mode 100644 index 000000000..cc1f9289a --- /dev/null +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_008.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - No RSV response as no active campaign (not available type 2)", + "request_headers": { + "nhs-login-nhs-number": "5000000008" + }, + "config_filenames": [ + "AUTO_RSV_SB_008.json" + ], + "data": [ + { + "NHS_NUMBER": "5000000008", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "5000000008", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "5000000008", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_009.json similarity index 61% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_009.json index 753398d0a..288e76542 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_009.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_009.json @@ -1,22 +1,21 @@ { - "scenario_name": "RSV - Not Actionable, membership of Age Cohort, dose not yet due", + "scenario_name": "RSV - Not Actionable despite to membership of an Age Cohort with reasoning of dose not yet due", + "request_headers": { + "nhs-login-nhs-number": "5000000009" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000009", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000009", @@ -39,7 +38,7 @@ { "NHS_NUMBER": "5000000009", "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": "2023-07-01" + "LAST_SUCCESSFUL_DATE": "20250326" } ] } diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_010.json similarity index 61% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_010.json index 7eb7d0488..aee9d565f 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_010.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_010.json @@ -1,22 +1,21 @@ { - "scenario_name": "RSV - Not Actionable, membership of Age Cohort, dose not far enough apart", + "scenario_name": "RSV - Not Actionable despite to membership of an Age Cohort with reasoning of dose not far enough apart", + "request_headers": { + "nhs-login-nhs-number": "5000000010" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000010", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000010", @@ -39,7 +38,7 @@ { "NHS_NUMBER": "5000000010", "ATTRIBUTE_TYPE": "RSV", - "LAST_SUCCESSFUL_DATE": "2023-07-01" + "LAST_SUCCESSFUL_DATE": "20250327" } ] } diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_011.json similarity index 74% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_011.json index 9626840b3..e19d0428e 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_011.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_011.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Not Actionable despite to membership of an Age Cohort with reasoning of vaccination given in other setting (e.g. care home)", + "request_headers": { + "nhs-login-nhs-number": "5000000011" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000011", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "rsv_75_rolling": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75_rolling", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000011", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_012.json similarity index 85% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_012.json index b7ff528f2..533899dff 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_012.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_012.json @@ -1,13 +1,12 @@ { "scenario_name": "RSV - Not Actionable despite no cohort membership with reasoning of already vaccinated (type 1 includes unknown cohort)", + "request_headers": { + "nhs-login-nhs-number": "5000000012" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ - { - "NHS_NUMBER": "5000000012", - "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": {} - } - }, { "NHS_NUMBER": "5000000012", "ATTRIBUTE_TYPE": "PERSON", diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_013.json similarity index 73% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_013.json index c0f69b5dc..c32b47340 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_013.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_013.json @@ -1,22 +1,21 @@ { "scenario_name": "RSV - Not Actionable despite no cohort membership with reasoning of already vaccinated (type 2 includes no cohorts)", + "request_headers": { + "nhs-login-nhs-number": "5000000013" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000013", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "covid_16+_immunosuppression": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_16+_immunosuppression", + "DATE_JOINED": "20231020" } - } + ] }, { "NHS_NUMBER": "5000000013", @@ -37,7 +36,7 @@ "DE_FLAG": "N" }, { - "NHS_NUMBER": "50000000014", + "NHS_NUMBER": "5000000013", "ATTRIBUTE_TYPE": "RSV", "LAST_SUCCESSFUL_DATE": "<>" } diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_014.json similarity index 66% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json rename to tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_014.json index 5cd1e21d7..5e9d8f40a 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_014.json +++ b/tests/e2e/data/dynamoDB/smokeTestData/AUTO_RSV_SB_014.json @@ -1,25 +1,24 @@ { "scenario_name": "RSV - Not Eligible", + "request_headers": { + "nhs-login-nhs-number": "5000000014" + }, + "config_filenames": [ + "AUTO_RSV_SB_001.json" + ], "data": [ { "NHS_NUMBER": "5000000014", "ATTRIBUTE_TYPE": "COHORTS", - "COHORT_MAP": { - "cohorts": { - "M": { - "covid_16+_immunosuppression": { - "M": { - "dateJoined": { - "S": "20230515" - } - } - } - } + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_16+_immunosuppression", + "DATE_JOINED": "20231020" } - } + ] }, { - "NHS_NUMBER": "50000000014", + "NHS_NUMBER": "5000000014", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", diff --git a/tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-2.json b/tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-2.json new file mode 100644 index 000000000..ce3de9e8b --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-2.json @@ -0,0 +1,51 @@ +{ + "scenario_name": "ELI-216 - NHS Number check (NHS login) - Incorrect NHS_number", + "config_filename": "AUTO_RSV_ELI-216.json", + "request_headers": { + "nhs-login-nhs-number": "9000000001" + }, + "expected_response_code": 403, + "data": [ + { + "NHS_NUMBER": "9000000006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MAP": { + "cohorts": { + "M": { + "eli_216_cohort": { + "M": { + "dateJoined": { + "S": "20230515" + } + } + } + } + } + } + }, + { + "NHS_NUMBER": "9000000006", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9000000006", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json b/tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-3.json similarity index 74% rename from tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json rename to tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-3.json index 25f7e19fa..15e70cdc5 100644 --- a/tests/e2e/data/dynamoDB/AUTO_RSV_SB_008.json +++ b/tests/e2e/data/dynamoDB/storyTestData/.ignore_folder/AUTO_RSV_ELI-216-3.json @@ -1,13 +1,16 @@ { - "scenario_name": "RSV - No RSV response as no active campaign (not available type 2)", + "scenario_name": "ELI-216 - NHS Number check (NHS login) - No Header", + "config_filename": "AUTO_RSV_ELI-216.json", + "request_headers": {}, + "expected_response_code": 403, "data": [ { - "NHS_NUMBER": "5000000008", + "NHS_NUMBER": "9000000006", "ATTRIBUTE_TYPE": "COHORTS", "COHORT_MAP": { "cohorts": { "M": { - "rsv_75_rolling": { + "eli_216_cohort": { "M": { "dateJoined": { "S": "20230515" @@ -19,7 +22,7 @@ } }, { - "NHS_NUMBER": "5000000008", + "NHS_NUMBER": "9000000006", "ATTRIBUTE_TYPE": "PERSON", "DATE_OF_BIRTH": "<>", "GENDER": "0", @@ -37,9 +40,10 @@ "DE_FLAG": "N" }, { - "NHS_NUMBER": "5000000008", + "NHS_NUMBER": "9000000006", "ATTRIBUTE_TYPE": "RSV", - "BOOKED_APPOINTMENT_DATE": "2024-07-01" + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" } ] } diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-155.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-155.json new file mode 100644 index 000000000..5ee21f2ec --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-155.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - Actionable due to membership of an Age Cohort incl. suggested actions (with booking)", + "config_filenames": [ + "AUTO_RSV_ELI-155.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9000015501" + }, + "data": [ + { + "NHS_NUMBER": "9000015501", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_155_in", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9000015501", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9000015501", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-216-1.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-216-1.json new file mode 100644 index 000000000..bb6f90337 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-216-1.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "ELI-216 - NHS Number check (NHS login) - Correct NHS_number", + "config_filenames": [ + "AUTO_RSV_ELI-216.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900021601" + }, + "data": [ + { + "NHS_NUMBER": "9900021601", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_216_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900021601", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900021601", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-1.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-1.json new file mode 100644 index 000000000..e2123faa6 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-1.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "ELI-219 - 1 - Fails and Rules and Returns Default", + "config_filenames": [ + "AUTO_RSV_ELI-219-1.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900021901" + }, + "data": [ + { + "NHS_NUMBER": "9900021901", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_291_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900021901", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900021901", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-2.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-2.json new file mode 100644 index 000000000..d7fb26134 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-2.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "ELI-219 - Returns the highest Priority Action", + "config_filenames": [ + "AUTO_RSV_ELI-219-2.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900021902" + }, + "data": [ + { + "NHS_NUMBER": "9900021902", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_291_cohort_2", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900021902", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900021902", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-3.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-3.json new file mode 100644 index 000000000..ab3094335 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-219-3.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "ELI-219 - Returns the highest Priority Action", + "config_filenames": [ + "AUTO_RSV_ELI-219-3.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900021903" + }, + "data": [ + { + "NHS_NUMBER": "9900021903", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_291_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900021903", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900021903", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-01.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-01.json new file mode 100644 index 000000000..711c81c38 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-01.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - RuleStop: Y", + "request_headers": { + "nhs-login-nhs-number": "9900022101" + }, + "config_filenames": [ + "AUTO_RSV_ELI-221-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022101", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_221_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022101", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "Y", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900022101", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-02.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-02.json new file mode 100644 index 000000000..390ed4621 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-02.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - RuleStop: N", + "request_headers": { + "nhs-login-nhs-number": "9900022102" + }, + "config_filenames": [ + "AUTO_RSV_ELI-221-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022102", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_221_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022102", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "Y", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900022102", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-03.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-03.json new file mode 100644 index 000000000..89b1eb68c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-221-03.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - RuleStop Not included in rules", + "request_headers": { + "nhs-login-nhs-number": "9900022103" + }, + "config_filenames": [ + "AUTO_RSV_ELI-221-03.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022103", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_221_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022103", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "Y", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900022103", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-1.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-1.json new file mode 100644 index 000000000..849c4cc94 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-1.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Magic Cohort Has Future booking No Vaccination", + "request_headers": { + "nhs-login-nhs-number": "9900022201" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022201", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022201", + "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": "N" + }, + { + "NHS_NUMBER": "9900022201", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS", + "LAST_SUCCESSFUL_DATE": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-2.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-2.json new file mode 100644 index 000000000..41c86b84c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-2.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Magic Cohort Has Past booking No Vaccination", + "request_headers": { + "nhs-login-nhs-number": "9900022202" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022202", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022202", + "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": "N" + }, + { + "NHS_NUMBER": "9900022202", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS", + "LAST_SUCCESSFUL_DATE": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-3.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-3.json new file mode 100644 index 000000000..0a64750b4 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-3.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "RSV - Magic Cohort Has a Past RSV Vaccination - Future Booking", + "request_headers": { + "nhs-login-nhs-number": "9900022203" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022203", + "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": "N" + }, + { + "NHS_NUMBER": "9900022203", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ACC" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-4.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-4.json new file mode 100644 index 000000000..d2c506c1e --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-4.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "RSV - Magic Cohort Has a Past RSV Vaccination - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900022204" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022204", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022204", + "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": "N" + }, + { + "NHS_NUMBER": "9900022204", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-5.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-5.json new file mode 100644 index 000000000..709043a33 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-5.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Magic Cohort Has a Past RSV Vaccination -Past Booking", + "request_headers": { + "nhs-login-nhs-number": "9900022205" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022205", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022205", + "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": "N" + }, + { + "NHS_NUMBER": "9900022205", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-6.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-6.json new file mode 100644 index 000000000..c3f8b6359 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-6.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV -Magic Cohort No Vaccination - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900022206" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900022206", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900022206", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-7.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-7.json new file mode 100644 index 000000000..507ab6c3c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-7.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Magic Cohort - NotEligible - In Eligible Cohort - Filtered by age rule", + "request_headers": { + "nhs-login-nhs-number": "9900002227" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900002227", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900002227", + "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": "N" + }, + { + "NHS_NUMBER": "9900002227", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-8.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-8.json new file mode 100644 index 000000000..0dbd77f5b --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-222-8.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - Magic Cohort - NotActionable - In Eligible Cohort - Filtered by age, but Vaccinated", + "request_headers": { + "nhs-login-nhs-number": "9900002228" + }, + "config_filenames": [ + "AUTO_RSV_ELI-222.json" + ], + "data": [ + { + "NHS_NUMBER": "9900002228", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900002228", + "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": "N" + }, + { + "NHS_NUMBER": "9900002228", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-01.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-01.json new file mode 100644 index 000000000..734a9ae50 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-01.json @@ -0,0 +1,52 @@ +{ + "scenario_name": "RSV - ELI-236 - Add NVL Default to Operators - All null", + "config_filenames": [ + "AUTO_RSV_ELI-236.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900023601" + }, + "data": [ + { + "NHS_NUMBER": "9900023601", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_236_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900023601", + "ATTRIBUTE_TYPE": "PERSON", + "13Q_FLAG": null, + "CARE_HOME_FLAG": null, + "COMMISSIONING_REGION": null, + "DATE_OF_BIRTH": null, + "DE_FLAG": null, + "GENDER": null, + "GP_PRACTICE_CODE": null, + "ICB": null, + "LOCAL_AUTHORITY": null, + "LSOA": null, + "MSOA": null, + "PCN": null, + "POSTCODE": null, + "POSTCODE_OUTCODE": null, + "POSTCODE_SECTOR": null + }, + { + "NHS_NUMBER": "9900023601", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null, + "INVALID_DOSES_COUNT": null, + "LAST_INVITE_DATE": null, + "LAST_INVITE_STATUS": null, + "LAST_SUCCESSFUL_DATE": null, + "LAST_VALID_DOSE_DATE": null, + "VALID_DOSES_COUNT": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-02.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-02.json new file mode 100644 index 000000000..a9180cde0 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-236-02.json @@ -0,0 +1,52 @@ +{ + "scenario_name": "RSV - ELI-236 - Add NVL Default to Operators - Nulls Filled", + "config_filenames": [ + "AUTO_RSV_ELI-236.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900023602" + }, + "data": [ + { + "NHS_NUMBER": "9900023602", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_236_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900023602", + "ATTRIBUTE_TYPE": "PERSON", + "13Q_FLAG": "Y", + "CARE_HOME_FLAG": "Y", + "COMMISSIONING_REGION": "1", + "DATE_OF_BIRTH": "19801115", + "DE_FLAG": null, + "GENDER": "1", + "GP_PRACTICE_CODE": "10563", + "ICB": null, + "LOCAL_AUTHORITY": null, + "LSOA": null, + "MSOA": null, + "PCN": null, + "POSTCODE": null, + "POSTCODE_OUTCODE": null, + "POSTCODE_SECTOR": null + }, + { + "NHS_NUMBER": "9900023602", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": null, + "INVALID_DOSES_COUNT": null, + "LAST_INVITE_DATE": "<>", + "LAST_INVITE_STATUS": null, + "LAST_SUCCESSFUL_DATE": null, + "LAST_VALID_DOSE_DATE": "<>", + "VALID_DOSES_COUNT": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-01.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-01.json new file mode 100644 index 000000000..30d6495e7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-01.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - Not Eligible - Blank (\"\") Default X Rule - No Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029501" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-1.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029501", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029501", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-02.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-02.json new file mode 100644 index 000000000..0fd8fb4b5 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-02.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - Not Actionable - Blank (\"\") Default Y Rule - No Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029502" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-1.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029502", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029502", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-03.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-03.json new file mode 100644 index 000000000..418e0d19c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-03.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - Actionable - Blank (\"\") Default R Rule - No Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029503" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029503", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029503", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-04.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-04.json new file mode 100644 index 000000000..a049d6a19 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-04.json @@ -0,0 +1,40 @@ +{ + "scenario_name": "ELI-295 - Not Eligible -Trigger the Default X Rule", + "note": "triggers the default due to being 75", + "request_headers": { + "nhs-login-nhs-number": "9900029504" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029504", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029504", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-05.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-05.json new file mode 100644 index 000000000..0de52991d --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-05.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - Not Actionable -Trigger the Default Y Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029505" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029505", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029505", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-06.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-06.json new file mode 100644 index 000000000..7c91ff9ee --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-06.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - Actionable -Trigger the Default R Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029506" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-1.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029506", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029506", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-07.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-07.json new file mode 100644 index 000000000..14fdd0b20 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-07.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotEligible -Trigger an X Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029507" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029507", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029507", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-08.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-08.json new file mode 100644 index 000000000..cf57ec142 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-08.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotActionable -Trigger the Y Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029508" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029508", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029508", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-09.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-09.json new file mode 100644 index 000000000..06bb1f9e4 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-09.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "ELI-295 - Actionable -Trigger the R Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029509" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029509", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029509", + "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": "N" + }, + { + "NHS_NUMBER": "9900029509", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-10.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-10.json new file mode 100644 index 000000000..1228230ad --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-10.json @@ -0,0 +1,42 @@ +{ + "scenario_name": "ELI-295 - NotEligible -Trigger an X Rule - includeActions N", + "request_headers": { + "nhs-login-nhs-number": "9900029510" + }, + "query_params": { + "includeActions": "N" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029510", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029510", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-11.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-11.json new file mode 100644 index 000000000..8ef6cdfc9 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-11.json @@ -0,0 +1,42 @@ +{ + "scenario_name": "ELI-295 - NotActionable -Trigger the Y Rule - includeActions N", + "request_headers": { + "nhs-login-nhs-number": "9900029511" + }, + "query_params": { + "includeActions": "N" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029511", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029511", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-12.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-12.json new file mode 100644 index 000000000..0672281d5 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-12.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "ELI-295 - Actionable -Trigger the R Rule - includeActions N", + "request_headers": { + "nhs-login-nhs-number": "9900029512" + }, + "query_params": { + "includeActions": "N" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029512", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029512", + "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": "N" + }, + { + "NHS_NUMBER": "9900029512", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-13.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-13.json new file mode 100644 index 000000000..ff2d8fde6 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-13.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotEligible -Trigger an X Rule - Mulitple Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029513" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029513", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029513", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-14.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-14.json new file mode 100644 index 000000000..524d8ea13 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-14.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotActionable -Trigger the Y Rule - Mulitple Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029514" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029514", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029514", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-15.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-15.json new file mode 100644 index 000000000..a5119e63c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-15.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "ELI-295 - Actionable -Trigger the R Rule - Mulitple Actions", + "request_headers": { + "nhs-login-nhs-number": "9900029515" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-3.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029515", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029515", + "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": "N" + }, + { + "NHS_NUMBER": "9900029515", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-16.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-16.json new file mode 100644 index 000000000..b308eed7b --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-16.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotEligible -Trigger an highest prio X Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029516" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-4.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029516", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029516", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-17.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-17.json new file mode 100644 index 000000000..b08c5a223 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-295-17.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "ELI-295 - NotActionable -Trigger the highest prio Y Rule", + "request_headers": { + "nhs-login-nhs-number": "9900029517" + }, + "config_filenames": [ + "AUTO_RSV_ELI-295-4.json" + ], + "data": [ + { + "NHS_NUMBER": "9900029517", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_295_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900029517", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-1.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-1.json new file mode 100644 index 000000000..0c33dfd70 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-1.json @@ -0,0 +1,48 @@ +{ + "scenario_name": "ELI-317 - Testing the new requirement from Vita around empty actions ", + "config_filenames": [ + "AUTO_RSV_ELI-317-1.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900031701" + }, + "query_params": { + "includeActions": "Y" + }, + "data": [ + { + "NHS_NUMBER": "9900031701", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_317_cohort_1", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900031701", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900031701", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-2.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-2.json new file mode 100644 index 000000000..299340742 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-2.json @@ -0,0 +1,48 @@ +{ + "scenario_name": "ELI-317 - Testing the new requirement from Vita around empty actions ", + "config_filenames": [ + "AUTO_RSV_ELI-317-2.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900031702" + }, + "query_params": { + "includeActions": "Y" + }, + "data": [ + { + "NHS_NUMBER": "9900031702", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_317_cohort_2", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900031702", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900031702", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-3.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-3.json new file mode 100644 index 000000000..e9ce9df25 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-3.json @@ -0,0 +1,48 @@ +{ + "scenario_name": "ELI-317 - includeActions=N ", + "config_filenames": [ + "AUTO_RSV_ELI-317-3.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900031703" + }, + "query_params": { + "includeActions": "N" + }, + "data": [ + { + "NHS_NUMBER": "9900031703", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_317_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900031703", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900031703", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-4.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-4.json new file mode 100644 index 000000000..ce14e995d --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-4.json @@ -0,0 +1,42 @@ +{ + "scenario_name": "ELI-317 - includeActions=Y, but no actions in response ", + "config_filenames": [ + "AUTO_RSV_ELI-317-4.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900031704" + }, + "query_params": { + "includeActions": "Y" + }, + "data": [ + { + "NHS_NUMBER": "9900031704", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_317_cohort_4", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900031704", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-5.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-5.json new file mode 100644 index 000000000..28f0efa7a --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-317-5.json @@ -0,0 +1,42 @@ +{ + "scenario_name": "ELI-317 - Multiple actions", + "config_filenames": [ + "AUTO_RSV_ELI-317-5.json" + ], + "request_headers": { + "nhs-login-nhs-number": "9900031705" + }, + "query_params": { + "includeActions": "Y" + }, + "data": [ + { + "NHS_NUMBER": "9900031705", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "eli_317_cohort_5", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900031705", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "LS1 1AB", + "POSTCODE_SECTOR": "LS1", + "POSTCODE_OUTCODE": "1AB", + "MSOA": "E02001111", + "LSOA": "E01005348", + "GP_PRACTICE_CODE": "B87008", + "PCN": "U43084", + "ICB": "QWO", + "COMMISSIONING_REGION": "Y63", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-1.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-1.json new file mode 100644 index 000000000..40fef6018 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-1.json @@ -0,0 +1,57 @@ +{ + "scenario_name": "ELI-320 - Multiple Condition Campaigns - Condition Query - None", + "request_headers": { + "nhs-login-nhs-number": "9990032010" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-RSV.json", + "AUTO_RSV_ELI-320-MMR.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032010", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032010", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032010", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032010", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-10.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-10.json new file mode 100644 index 000000000..458d220f7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-10.json @@ -0,0 +1,66 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Category=VACCINATIONS Condition=covid", + "request_headers": { + "nhs-login-nhs-number": "9900032010" + }, + "query_params": { + "category": "VACCINATIONS", + "conditions": "covid" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900032010", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900032010", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9900032010", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9900032010", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-11.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-11.json new file mode 100644 index 000000000..770ba1830 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-11.json @@ -0,0 +1,66 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Condition not active", + "request_headers": { + "nhs-login-nhs-number": "9900032011" + }, + "query_params": { + "category": "VACCINATIONS", + "conditions": "HPV" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900032011", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900032011", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9900032011", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9900032011", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-2.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-2.json new file mode 100644 index 000000000..a852a6fb8 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-2.json @@ -0,0 +1,60 @@ +{ + "scenario_name": "ELI-320 - Multiple Condition Campaigns - Condition Query - ALL", + "request_headers": { + "nhs-login-nhs-number": "9990032020" + }, + "query_params": { + "conditions": "ALL" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-RSV.json", + "AUTO_RSV_ELI-320-MMR.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032020", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032020", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032020", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032020", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-3.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-3.json new file mode 100644 index 000000000..beb538c32 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-3.json @@ -0,0 +1,60 @@ +{ + "scenario_name": "ELI-320 - Multiple Condition Campaigns - Condition Query - Covid", + "request_headers": { + "nhs-login-nhs-number": "9990032030" + }, + "query_params": { + "conditions": "covid" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-RSV.json", + "AUTO_RSV_ELI-320-MMR.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032030", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032030", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032030", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032030", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-4.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-4.json new file mode 100644 index 000000000..26dcebca6 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-4.json @@ -0,0 +1,60 @@ +{ + "scenario_name": "ELI-320 - Multiple Condition Campaigns - Condition Query - MMR", + "request_headers": { + "nhs-login-nhs-number": "9990032040" + }, + "query_params": { + "conditions": "MMR" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-RSV.json", + "AUTO_RSV_ELI-320-MMR.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032040", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032040", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032040", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032040", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-5.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-5.json new file mode 100644 index 000000000..55e37ebe4 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-5.json @@ -0,0 +1,60 @@ +{ + "scenario_name": "ELI-320 - Multiple Condition Campaigns - Condition Query - RSV, MMR", + "request_headers": { + "nhs-login-nhs-number": "9990032050" + }, + "query_params": { + "conditions": "RSV,MMR" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-RSV.json", + "AUTO_RSV_ELI-320-MMR.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032050", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032050", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032050", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032050", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-6.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-6.json new file mode 100644 index 000000000..dfeba54b7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-6.json @@ -0,0 +1,65 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Category missing", + "request_headers": { + "nhs-login-nhs-number": "9990032060" + }, + "query_params": { + "category": null + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032060", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032060", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032060", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032060", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-7.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-7.json new file mode 100644 index 000000000..4c4b88da9 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-7.json @@ -0,0 +1,65 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Category=ALL", + "request_headers": { + "nhs-login-nhs-number": "9990032070" + }, + "query_params": { + "category": "all" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032070", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032070", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032070", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032070", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-8.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-8.json new file mode 100644 index 000000000..ed17315b7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-8.json @@ -0,0 +1,65 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Category=screening", + "request_headers": { + "nhs-login-nhs-number": "9990032080" + }, + "query_params": { + "category": "screening" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9990032080", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990032080", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9990032080", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9990032080", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-9.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-9.json new file mode 100644 index 000000000..64be5dfd3 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-320-9.json @@ -0,0 +1,65 @@ +{ + "scenario_name": "ELI-320 - Multiple Category Campaigns - Category=VACCINATIONS", + "request_headers": { + "nhs-login-nhs-number": "9900032090" + }, + "query_params": { + "category": "VACCINATIONS" + }, + "config_filenames": [ + "AUTO_RSV_ELI-320-COVID.json", + "AUTO_RSV_ELI-320-MMR.json", + "AUTO_RSV_ELI-320-SCREENING-1.json", + "AUTO_RSV_ELI-320-SCREENING-2.json" + ], + "data": [ + { + "NHS_NUMBER": "9900032090", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "covid_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_cohort", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "FLU_screening_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900032090", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19500601", + "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": "N" + }, + { + "NHS_NUMBER": "9900032090", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9900032090", + "ATTRIBUTE_TYPE": "COVID", + "BOOKED_APPOINTMENT_DATE": "<>", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_001.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_001.json new file mode 100644 index 000000000..0b08b65d5 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_001.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "RSV - Actionable - Magic Cohort Has Future booking No Vaccination", + "request_headers": { + "nhs-login-nhs-number": "9900036501" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036501", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036501", + "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": "N" + }, + { + "NHS_NUMBER": "9900036501", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_002.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_002.json new file mode 100644 index 000000000..0fff27492 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_002.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible -Magic Cohort Has Past booking No Vaccination", + "request_headers": { + "nhs-login-nhs-number": "9900036502" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036502", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036502", + "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": "N" + }, + { + "NHS_NUMBER": "9900036502", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS", + "LAST_SUCCESSFUL_DATE": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_003.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_003.json new file mode 100644 index 000000000..51b29ed9c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_003.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "RSV - NotActionable - Magic Cohort Has a Past RSV Vaccination - Future Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036503" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036503", + "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": "N" + }, + { + "NHS_NUMBER": "9900036503", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ACC" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_004.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_004.json new file mode 100644 index 000000000..999c96cac --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_004.json @@ -0,0 +1,45 @@ +{ + "scenario_name": "RSV - NotActionable - Magic Cohort Has a Past RSV Vaccination - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036504" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036504", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036504", + "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": "N" + }, + { + "NHS_NUMBER": "9900036504", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_005.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_005.json new file mode 100644 index 000000000..57b9d2ed6 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_005.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotActionable - Magic Cohort Has a Past RSV Vaccination - Past Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036505" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036505", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036505", + "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": "N" + }, + { + "NHS_NUMBER": "9900036505", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_006.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_006.json new file mode 100644 index 000000000..f4a3c24a2 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_006.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - NotEligible -Magic Cohort No Vaccination - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036506" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036506", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "other_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036506", + "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": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_007.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_007.json new file mode 100644 index 000000000..62812795e --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_007.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible - Magic Cohort - In Eligible Cohort - Filtered by age rule", + "request_headers": { + "nhs-login-nhs-number": "9900036507" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036507", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036507", + "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": "N" + }, + { + "NHS_NUMBER": "9900036507", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATES": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_008.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_008.json new file mode 100644 index 000000000..669b8b55e --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_008.json @@ -0,0 +1,44 @@ +{ + "scenario_name": "RSV - NotActionable - Magic Cohort - In Eligible Cohort - Filtered by age, but Vaccinated", + "request_headers": { + "nhs-login-nhs-number": "9900036508" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036508", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036508", + "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": "N" + }, + { + "NHS_NUMBER": "9900036508", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_009.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_009.json new file mode 100644 index 000000000..2201d5b31 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_009.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible - Under Age F Rule - rsv_75to79", + "request_headers": { + "nhs-login-nhs-number": "9900036509" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036509", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036509", + "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": "N" + }, + { + "NHS_NUMBER": "9900036509", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_010.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_010.json new file mode 100644 index 000000000..96f1a407a --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_010.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible - Over Age F Rule - rsv_75to79", + "request_headers": { + "nhs-login-nhs-number": "9900036510" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036510", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036510", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19440901", + "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": "N" + }, + { + "NHS_NUMBER": "9900036510", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_011.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_011.json new file mode 100644 index 000000000..fe6b07b59 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_011.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible - Under Age F Rule - rsv_80_since_02_Sept_2024", + "request_headers": { + "nhs-login-nhs-number": "9900036511" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036511", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036511", + "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": "N" + }, + { + "NHS_NUMBER": "9900036511", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_012.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_012.json new file mode 100644 index 000000000..a37e23ee7 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_012.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotEligible - Over Age F Rule - rsv_80_since_02_Sept_2024", + "request_headers": { + "nhs-login-nhs-number": "9900036512" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036512", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036512", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "19440901", + "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": "N" + }, + { + "NHS_NUMBER": "9900036512", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_013.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_013.json new file mode 100644 index 000000000..ca0510b12 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_013.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotActionable - In Eligible Cohort - Already Vaccinated", + "request_headers": { + "nhs-login-nhs-number": "9900036513" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036513", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036513", + "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": "N" + }, + { + "NHS_NUMBER": "9900036513", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>", + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_014.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_014.json new file mode 100644 index 000000000..ca394208c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_014.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotActionable - In rsv_80_since_02_Sept_2024 Cohort - Carehome - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036514" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036514", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036514", + "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": "Y", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036514", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_015.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_015.json new file mode 100644 index 000000000..405635d1c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_015.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - NotActionable - In rsv_75to79 Cohort - Detained Estates - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036515" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036515", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036515", + "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": "9900036515", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_016.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_016.json new file mode 100644 index 000000000..0a84624d8 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_016.json @@ -0,0 +1,53 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_75to79 Cohort - 13Q - No Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036516" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036516", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036516", + "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": "Y", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036516", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + }, + { + "NHS_NUMBER": "9900036516", + "ATTRIBUTE_TYPE": "COVID", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_017.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_017.json new file mode 100644 index 000000000..901917b13 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_017.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_75to79 Cohort - Carehome - With Local Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036517" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036517", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036517", + "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": "Y", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036517", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ACC" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_018.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_018.json new file mode 100644 index 000000000..dc5de3881 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_018.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 Cohort - Detained Estates - NBS Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036518" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036518", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036518", + "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": "9900036518", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_019.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_019.json new file mode 100644 index 000000000..6f38bac43 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_019.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 Cohort - 13Q - NBS Booking", + "request_headers": { + "nhs-login-nhs-number": "9900036519" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036519", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036519", + "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": "Y", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036519", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_020.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_020.json new file mode 100644 index 000000000..6b8c81428 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_020.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 Cohort - CP Expansion Area - ICB", + "request_headers": { + "nhs-login-nhs-number": "9900036520" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036520", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036520", + "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": "QJG", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036520", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_021.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_021.json new file mode 100644 index 000000000..33696fc63 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_021.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 Cohort - CP Expansion Area - Local Authority", + "request_headers": { + "nhs-login-nhs-number": "9900036521" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036521", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036521", + "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", + "LOCAL_AUTHORITY": "E08000011", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036521", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_022.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_022.json new file mode 100644 index 000000000..a4286be82 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_022.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 Cohort - Not in CP Expansion Area", + "request_headers": { + "nhs-login-nhs-number": "9900036522" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036522", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036522", + "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", + "LOCAL_AUTHORITY": "ZZ8000011", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036522", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_023.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_023.json new file mode 100644 index 000000000..a8d19465a --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_023.json @@ -0,0 +1,51 @@ +{ + "scenario_name": "RSV - Actionable - In rsv_80_since_02_Sept_2024 and rsv_75to79 Cohorts - Not in CP Expansion Area", + "request_headers": { + "nhs-login-nhs-number": "9900036523" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036523", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036523", + "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", + "LOCAL_AUTHORITY": "ZZ8000011", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036523", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_024.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_024.json new file mode 100644 index 000000000..13b4135b9 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_024.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - In 3 actions - under 80 - Local Authority", + "request_headers": { + "nhs-login-nhs-number": "9900036526" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036526", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036526", + "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": "zz1", + "LOCAL_AUTHORITY": "E08000014", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036526", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_025.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_025.json new file mode 100644 index 000000000..80a5ec4e2 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_025.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - In 3 actions - under 80 - ICB", + "request_headers": { + "nhs-login-nhs-number": "9900036527" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036527", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036527", + "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": "QH8", + "LOCAL_AUTHORITY": "ZZ8000014", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036527", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_026.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_026.json new file mode 100644 index 000000000..892196765 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_026.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - 2 actions - 80 or over - ICB", + "request_headers": { + "nhs-login-nhs-number": "9900036524" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036524", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036524", + "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": "QH8", + "LOCAL_AUTHORITY": "ZZ8000011", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036524", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_027.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_027.json new file mode 100644 index 000000000..0c90eab68 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_027.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - 2 actions - 80 or over - Local Authority", + "request_headers": { + "nhs-login-nhs-number": "9900036525" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036525", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036525", + "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": "zz1", + "LOCAL_AUTHORITY": "E08000014", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036525", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_028.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_028.json new file mode 100644 index 000000000..083693b2c --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-365_028.json @@ -0,0 +1,47 @@ +{ + "scenario_name": "RSV - Actionable - 2 actions - 80 or over - No ICB or Local Authority", + "request_headers": { + "nhs-login-nhs-number": "9900036528" + }, + "config_filenames": [ + "AUTO_RSV_ELI-365.json" + ], + "data": [ + { + "NHS_NUMBER": "9900036528", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900036528", + "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": "zz1", + "LOCAL_AUTHORITY": "ZZ8000014", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900036528", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_001.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_001.json new file mode 100644 index 000000000..a591223c8 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_001.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-373 - Past Booking - Not in Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373001", + "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": "N" + }, + { + "NHS_NUMBER": "9900373001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_002.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_002.json new file mode 100644 index 000000000..4a16cd1ef --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_002.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-373 - No Booking - Not in Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373002" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373002", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373002", + "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": "N" + }, + { + "NHS_NUMBER": "9900373002", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_003.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_003.json new file mode 100644 index 000000000..ff099b84a --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_003.json @@ -0,0 +1,50 @@ +{ + "scenario_name": "ELI-373 - Future Booking - Not in Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373003" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373003", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373003", + "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": "N" + }, + { + "NHS_NUMBER": "9900373003", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_004.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_004.json new file mode 100644 index 000000000..480b4d2a2 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_004.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-373 - Past Booking - In Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373004" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373004", + "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": "Y", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900373004", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_005.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_005.json new file mode 100644 index 000000000..39c5b2be8 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_005.json @@ -0,0 +1,46 @@ +{ + "scenario_name": "ELI-373 - No Booking - In Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373005" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373005", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373005", + "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": "Y", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900373005", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_006.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_006.json new file mode 100644 index 000000000..c2fc463d5 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_006.json @@ -0,0 +1,50 @@ +{ + "scenario_name": "ELI-373 - Future Booking - In Care Home ", + "request_headers": { + "nhs-login-nhs-number": "9900373006" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373006", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373006", + "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": "Y", + "DE_FLAG": "N" + }, + { + "NHS_NUMBER": "9900373006", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_007.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_007.json new file mode 100644 index 000000000..713d3525e --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_007.json @@ -0,0 +1,50 @@ +{ + "scenario_name": "ELI-373 - No Booking - Not in DE", + "request_headers": { + "nhs-login-nhs-number": "9900373007" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373007", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373007", + "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": "N" + }, + { + "NHS_NUMBER": "9900373007", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_008.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_008.json new file mode 100644 index 000000000..9271ad755 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-373_008.json @@ -0,0 +1,50 @@ +{ + "scenario_name": "ELI-373 - No Booking - In Carehome, DE and 13Q", + "request_headers": { + "nhs-login-nhs-number": "9900373008" + }, + "config_filenames": [ + "AUTO_RSV_ELI-373-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9900373008", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900373008", + "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": "Y", + "CARE_HOME_FLAG": "Y", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900373008", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": null, + "BOOKED_APPOINTMENT_PROVIDER": null + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_001.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_001.json new file mode 100644 index 000000000..bb63f3ec2 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_001.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - Inactive Iteration - 1 Iteration - Future Iteration Date", + "request_headers": { + "nhs-login-nhs-number": "9900339001" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-01.json" + ], + "data": [ + { + "NHS_NUMBER": "9900339001", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9900339001", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9900339001", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_002.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_002.json new file mode 100644 index 000000000..42beeecfb --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_002.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - 1 Active Iteration 1 Inactive Future Iteration", + "request_headers": { + "nhs-login-nhs-number": "9990039902" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-02.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039902", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039902", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039902", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_003.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_003.json new file mode 100644 index 000000000..86a3f5530 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_003.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - 2 iterations in past - most recent iteration chosen", + "request_headers": { + "nhs-login-nhs-number": "9990039903" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-03.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039903", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039903", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039903", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_004.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_004.json new file mode 100644 index 000000000..7051a7011 --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_004.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - 2 iterations in future - empty processedsuggestions", + "request_headers": { + "nhs-login-nhs-number": "9990039904" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-04.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039904", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039904", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039904", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_005.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_005.json new file mode 100644 index 000000000..3e343141b --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_005.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - past campaign boundaries processedsuggestions", + "request_headers": { + "nhs-login-nhs-number": "9990039905" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-05.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039905", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039905", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039905", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_006.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_006.json new file mode 100644 index 000000000..1443aedde --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_006.json @@ -0,0 +1,54 @@ +{ + "scenario_name": "ELI-339 - future campaign boundaries processedsuggestions", + "request_headers": { + "nhs-login-nhs-number": "9990039906" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-06.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039906", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039906", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039906", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_007.json b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_007.json new file mode 100644 index 000000000..5e9c9c4fd --- /dev/null +++ b/tests/e2e/data/dynamoDB/storyTestData/AUTO_RSV_ELI-399_007.json @@ -0,0 +1,55 @@ +{ + "scenario_name": "ELI-339 - Inactive RSV, Active Covid", + "request_headers": { + "nhs-login-nhs-number": "9990039906" + }, + "config_filenames": [ + "AUTO_RSV_ELI-399-01.json", + "AUTO_RSV_ELI-399-07.json" + ], + "data": [ + { + "NHS_NUMBER": "9990039906", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_eli_274_cohort_1", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_2", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "rsv_eli_274_cohort_3", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9990039906", + "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": "AAA", + "COMMISSIONING_REGION": "ZZZ", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "Y" + }, + { + "NHS_NUMBER": "9990039906", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": null, + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/test_data.json b/tests/e2e/data/dynamoDB/test_data.json deleted file mode 100644 index f5c80e4b5..000000000 --- a/tests/e2e/data/dynamoDB/test_data.json +++ /dev/null @@ -1,220 +0,0 @@ -[ - { - "NHS_NUMBER": "0000000001", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19960302", - "GENDER": 1, - "POSTCODE": "S18 C1X", - "POSTCODE_SECTOR": "S181", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U69384", - "PCN": "QJ2" - }, - { - "NHS_NUMBER": "0000000001", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000001", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000002", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19890518", - "GENDER": 1, - "POSTCODE": "S18 B1X", - "POSTCODE_SECTOR": "S181", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U33827", - "PCN": "RJ3" - }, - { - "NHS_NUMBER": "0000000002", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000002", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "NotActionable" - }, - { - "NHS_NUMBER": "0000000003", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19780323", - "GENDER": 1, - "POSTCODE": "S18 X9X", - "POSTCODE_SECTOR": "S189", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U90732", - "PCN": "QJ2" - }, - { - "NHS_NUMBER": "0000000003", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000004", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19570120", - "GENDER": 0, - "POSTCODE": "S18 B6X", - "POSTCODE_SECTOR": "S186", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U52353", - "PCN": "LM8" - }, - { - "NHS_NUMBER": "0000000004", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000004", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000005", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19910411", - "GENDER": 1, - "POSTCODE": "S18 B5X", - "POSTCODE_SECTOR": "S185", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U54464", - "PCN": "LM8" - }, - { - "NHS_NUMBER": "0000000005", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "NotActionable" - }, - { - "NHS_NUMBER": "0000000005", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Covid", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000006", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19450206", - "GENDER": 1, - "POSTCODE": "S18 B9X", - "POSTCODE_SECTOR": "S189", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U97038", - "PCN": "RJ3" - }, - { - "NHS_NUMBER": "0000000006", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000006", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000007", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19590705", - "GENDER": 0, - "POSTCODE": "S18 B3X", - "POSTCODE_SECTOR": "S183", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U56174", - "PCN": "TK9" - }, - { - "NHS_NUMBER": "0000000007", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Covid", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000007", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Covid", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000008", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19990716", - "GENDER": 0, - "POSTCODE": "S18 A5X", - "POSTCODE_SECTOR": "S185", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U33386", - "PCN": "QJ2" - }, - { - "NHS_NUMBER": "0000000008", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "NotActionable" - }, - { - "NHS_NUMBER": "0000000009", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "20100426", - "GENDER": 0, - "POSTCODE": "S18 X4X", - "POSTCODE_SECTOR": "S184", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U94864", - "PCN": "LM8" - }, - { - "NHS_NUMBER": "0000000009", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "Actionable" - }, - { - "NHS_NUMBER": "0000000009", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "NotActionable" - }, - { - "NHS_NUMBER": "0000000010", - "ATTRIBUTE_TYPE": "PERSON", - "DATE_OF_BIRTH": "19931007", - "GENDER": 1, - "POSTCODE": "S18 B5X", - "POSTCODE_SECTOR": "S185", - "POSTCODE_OUTCODE": "S18", - "GP_PRACTICE_CODE": "U74914", - "PCN": "LM8" - }, - { - "NHS_NUMBER": "0000000010", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "RSV", - "STATUS": "NotEligible" - }, - { - "NHS_NUMBER": "0000000010", - "ATTRIBUTE_TYPE": "ELIGIBILITY", - "CONDITION": "Flu", - "STATUS": "NotEligible" - } -] diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_001.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_001.json new file mode 100644 index 000000000..c744f8e5b --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_001.json @@ -0,0 +1,40 @@ +{ + "scenario_name": "RSV - Vita Integration - Actionable - You should have the RSV vaccine ( in CP area ) - age rolling - BookNBS", + "request_headers": { + "nhs-login-nhs-number": "9686368973" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9686368973", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9686368973", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "GENDER": "0", + "POSTCODE": "SG8 6EG", + "POSTCODE_SECTOR": "SG86", + "POSTCODE_OUTCODE": "SG8", + "MSOA": "E02003792", + "LSOA": "E01018267", + "LOCAL_AUTHORITY": "E08000011", + "GP_PRACTICE_CODE": "D81046", + "PCN": "U75549", + "ICB": "QUE", + "COMMISSIONING_REGION": "Y61", + "13Q_FLAG": "N", + "CARE_HOME_FLAG": "N", + "DE_FLAG": "N" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json new file mode 100644 index 000000000..35bcb3efc --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_002.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - Actionable - You should have the RSV vaccine ( out CP area ) - age rolling - age rolling - BookLocal", + "request_headers": { + "nhs-login-nhs-number": "9686368906" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9686368906", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9686368906", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json new file mode 100644 index 000000000..0e8cdd257 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_003.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - Actionable - You should have the RSV vaccine ( out CP area ) - age catchup - BookLocal", + "request_headers": { + "nhs-login-nhs-number": "9658218873" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658218873", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_80_since_02_Sept_2024", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9658218873", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json new file mode 100644 index 000000000..ed20d7d35 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_004.json @@ -0,0 +1,35 @@ +{ + "scenario_name": "RSV - Vita Integration - Actionable - You should have the RSV vaccine ( existing NBS booking ) - empty cohorts - AmendNBS", + "request_headers": { + "nhs-login-nhs-number": "9658218881" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658218881", + "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" + }, + { + "NHS_NUMBER": "9658218881", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "NBS" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json new file mode 100644 index 000000000..2ef47a620 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_005.json @@ -0,0 +1,35 @@ +{ + "scenario_name": "RSV - Vita Integration - Actionable - You should have the RSV vaccine ( existing non-NBS booking ) - empty cohorts - ManageLocal", + "request_headers": { + "nhs-login-nhs-number": "9658218903" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658218903", + "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" + }, + { + "NHS_NUMBER": "9658218903", + "ATTRIBUTE_TYPE": "RSV", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ACC" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json new file mode 100644 index 000000000..9cda11395 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_006.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccd) - AlreadyVaccinated", + "request_headers": { + "nhs-login-nhs-number": "9658218989" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658218989", + "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" + }, + { + "NHS_NUMBER": "9658218989", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json new file mode 100644 index 000000000..e7b4d9a30 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_007.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine ( not available ) - age rolling - NotAvailable", + "request_headers": { + "nhs-login-nhs-number": "9658218997" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658218997", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9658218997", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json new file mode 100644 index 000000000..1ff7adb41 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_008.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - empty suggestions - fallback to static", + "request_headers": { + "nhs-login-nhs-number": "9658219004" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658219004", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json new file mode 100644 index 000000000..f0c0971a2 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_009.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine - age rolling - NotYetDue", + "request_headers": { + "nhs-login-nhs-number": "9658219012" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658219012", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9658219012", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json new file mode 100644 index 000000000..6ebd3beb1 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_011.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine - age rolling - TooClose", + "request_headers": { + "nhs-login-nhs-number": "9658220142" + }, + "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", + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json new file mode 100644 index 000000000..a91993317 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_012.json @@ -0,0 +1,39 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine ( managed setting ) - age rolling - OtherSetting", + "request_headers": { + "nhs-login-nhs-number": "9658220150" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9658220150", + "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": "9658220150", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json new file mode 100644 index 000000000..77057e50b --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_013.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - unknown membership - AlreadyVaccinated", + "request_headers": { + "nhs-login-nhs-number": "9450114080" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9450114080", + "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": "9450114080", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json new file mode 100644 index 000000000..7ec5f92d9 --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_014.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "RSV - Vita Integration - NotActionable - You should have the RSV vaccine (already vaccinated) - empty cohorts - AlreadyVaccinated", + "request_headers": { + "nhs-login-nhs-number": "9466447939" + }, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9466447939", + "ATTRIBUTE_TYPE": "RSV", + "LAST_SUCCESSFUL_DATE": "<>" + }, + { + "NHS_NUMBER": "9466447939", + "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" + } + ] +} diff --git a/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json new file mode 100644 index 000000000..2f663767e --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_015.json @@ -0,0 +1,35 @@ +{ + "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/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json new file mode 100644 index 000000000..79aff5d5e --- /dev/null +++ b/tests/e2e/data/dynamoDB/vitaIntegrationTestData/AUTO_RSV_VITA_INT_500.json @@ -0,0 +1,40 @@ +{ + "scenario_name": "RSV - Vita Integration - 500", + "request_headers": { + "nhs-login-nhs-number": "9436793375" + }, + "expected_response_code": 500, + "config_filenames": [ + "vita_integration_test_config.json" + ], + "data": [ + { + "NHS_NUMBER": "9436793375", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "rsv_75to79", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9436793375", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": 19500601, + "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": "N" + } + ] +} diff --git a/tests/e2e/data/generate_dynamo_data.py b/tests/e2e/data/generate_dynamo_data.py deleted file mode 100644 index ea4e8f599..000000000 --- a/tests/e2e/data/generate_dynamo_data.py +++ /dev/null @@ -1,116 +0,0 @@ -import json -import logging -import os -import re -from datetime import datetime, timedelta, timezone -from pathlib import Path -from typing import Any - -OUTPUT_ROOT = "out" -DATE_FORMAT = "%Y%m%d" -VAR_PATTERN = re.compile(r"<<([^<>]+)>>") -REQUIRED_TOKEN_PARTS = 3 - -logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s") - - -class DateVariableResolver: - def __init__(self, today: datetime | None = None): - self.today = today or datetime.now(tz=timezone.UTC) - - def resolve(self, token: str) -> str: - logger.debug("Resolving variable: %s", token) - parts = token.split("_") - if len(parts) < REQUIRED_TOKEN_PARTS or parts[0].upper() != "DATE": - msg = f"Unsupported variable format: {token}" - raise ValueError(msg) - _, unit, value = parts[0], parts[1].lower(), parts[2] - try: - offset = int(value) - except ValueError as err: - msg = f"Invalid offset value: {value}" - raise ValueError(msg) from err - if unit == "day": - return (self.today + timedelta(days=offset)).strftime(DATE_FORMAT) - if unit == "week": - return (self.today + timedelta(weeks=offset)).strftime(DATE_FORMAT) - if unit == "year": - return (self.today.replace(year=self.today.year + offset)).strftime(DATE_FORMAT) - if unit == "age": - try: - birth_date = self.today.replace(year=self.today.year - offset) - except ValueError: - birth_date = self.today.replace(month=2, day=28, year=self.today.year - offset) - return birth_date.strftime(DATE_FORMAT) - msg = f"Unsupported calculation unit: {unit}" - raise ValueError(msg) - - -class JsonTestDataProcessor: - def __init__(self, input_dir: Path, output_dir: Path, resolver: DateVariableResolver): - self.input_dir = input_dir - self.output_dir = output_dir - self.resolver = resolver - - def resolve_placeholders(self, obj: Any) -> Any: - if isinstance(obj, dict): - return {k: self.resolve_placeholders(v) for k, v in obj.items()} - if isinstance(obj, list): - return [self.resolve_placeholders(item) for item in obj] - if isinstance(obj, str): - return VAR_PATTERN.sub(self._replace_token, obj) - return obj - - def _replace_token(self, match: re.Match) -> str: - token = match.group(1) - try: - return self.resolver.resolve(token) - except ValueError: - logger.warning("Failed to resolve variable: %s", token) - return match.group(0) - - def process_file(self, file_path: Path): - logger.info("Processing file: %s", file_path) - try: - with file_path.open() as f: - content = json.load(f) - except Exception: - logger.exception("Failed to read file: %s", file_path) - return - try: - resolved = self.resolve_placeholders(content) - except Exception: - logger.exception("Failed to resolve placeholders in file: %s", file_path) - return - if "data" not in resolved: - logger.error("Missing 'data' key in file: %s", file_path) - return - relative_path = file_path.relative_to(self.input_dir) - output_path = self.output_dir / relative_path - output_path.parent.mkdir(parents=True, exist_ok=True) - try: - with output_path.open("w") as f: - json.dump(resolved["data"], f, indent=2) - logger.info("Written resolved file: %s", output_path) - except Exception: - logger.exception("Failed to write output to: %s", output_path) - - -def main(): - input_dir = Path() - output_dir = Path(OUTPUT_ROOT) - resolver = DateVariableResolver() - processor = JsonTestDataProcessor(input_dir, output_dir, resolver) - logger.info("Scanning for JSON files in directory: %s", input_dir) - for root, _, files in os.walk(input_dir): - for file in files: - file_path = Path(root) / file - if file.endswith(".json"): - processor.process_file(file_path) - else: - logger.debug("Skipping non-JSON file: %s", file) - - -if __name__ == "__main__": - main() diff --git a/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_001.json b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_001.json new file mode 100644 index 000000000..390a9f4af --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_001.json @@ -0,0 +1,26 @@ +{ + "resourceType": "OperationOutcome", + "id": "e158b107-4283-43ee-8a4e-8e68cd15d26f", + "meta": { + "lastUpdated": "2025-08-12T08:09:01.662728Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. This could be because the number is incorrect or some other reason we cannot process that number." + } + ] + }, + "diagnostics": "NHS Number '9900406001' was not recognised by the Eligibility Signposting API", + "location": [ + "parameters/id" + ] + } + ] +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_002.json b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_002.json new file mode 100644 index 000000000..fc3bdba0e --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_002.json @@ -0,0 +1,26 @@ +{ + "resourceType": "OperationOutcome", + "id": "e158b107-4283-43ee-8a4e-8e68cd15d26f", + "meta": { + "lastUpdated": "2025-08-12T08:09:01.662728Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. This could be because the number is incorrect or some other reason we cannot process that number." + } + ] + }, + "diagnostics": "NHS Number '9900406002' was not recognised by the Eligibility Signposting API", + "location": [ + "parameters/id" + ] + } + ] +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_003.json b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_003.json new file mode 100644 index 000000000..761c1327b --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/AUTO_RSV_ELI-406_003.json @@ -0,0 +1,26 @@ +{ + "resourceType": "OperationOutcome", + "id": "e158b107-4283-43ee-8a4e-8e68cd15d26f", + "meta": { + "lastUpdated": "2025-08-12T08:09:01.662728Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. This could be because the number is incorrect or some other reason we cannot process that number." + } + ] + }, + "diagnostics": "NHS Number '9900406003' was not recognised by the Eligibility Signposting API", + "location": [ + "parameters/id" + ] + } + ] +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_001.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_001.json new file mode 100644 index 000000000..230b4da39 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_001.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T14:44:56.294924+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_220_cohort_group_0" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_220_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "6e7d0d6a-1a1f-4238-a7ae-2911414c1536" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_002.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_002.json new file mode 100644 index 000000000..944211f08 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_002.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T14:44:56.294924+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_220_cohort_group_10" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_220_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "6e7d0d6a-1a1f-4238-a7ae-2911414c1536" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_003.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_003.json new file mode 100644 index 000000000..cf4a88e42 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_003.json @@ -0,0 +1,33 @@ +{ + "meta": { + "lastUpdated": "2025-08-08T06:57:31.196189+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_220_cohort_group_0" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_220_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason 1", + "ruleText": "Description 1", + "ruleType": "S" + } + ] + } + ], + "responseId": "331c56ff-9c97-47be-8781-34cea44d400b" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_004.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_004.json new file mode 100644 index 000000000..a19d23777 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_004.json @@ -0,0 +1,33 @@ +{ + "meta": { + "lastUpdated": "2025-08-08T06:56:33.768243+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_220_cohort_group_10" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_220_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason 1", + "ruleText": "Description 1", + "ruleType": "S" + } + ] + } + ], + "responseId": "ec8a1a74-5505-4391-a2ca-093499377d34" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_005.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_005.json new file mode 100644 index 000000000..9e0d07f0a --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_005.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-08T06:57:31.196189+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_220_cohort_group_0" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_220_cohort_group_other" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "331c56ff-9c97-47be-8781-34cea44d400b" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_006.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_006.json new file mode 100644 index 000000000..8fb9c4a89 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-220-371/AUTO_RSV_ELI-220_006.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-08T06:57:31.196189+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_220_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_220_cohort_group_10" + }, + { + "cohortCode": "rsv_eli_220_cohort_group_other", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_220_cohort_group_other" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "331c56ff-9c97-47be-8781-34cea44d400b" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_001.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_001.json new file mode 100644 index 000000000..b04d907a4 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_001.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T14:44:56.294924+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "6e7d0d6a-1a1f-4238-a7ae-2911414c1536" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_002.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_002.json new file mode 100644 index 000000000..b04d907a4 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_002.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T14:44:56.294924+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "6e7d0d6a-1a1f-4238-a7ae-2911414c1536" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_003.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_003.json new file mode 100644 index 000000000..134a01f3d --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_003.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:07:37.517048+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "d07cf694-db14-4289-bd10-3ca365b943d7" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_004.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_004.json new file mode 100644 index 000000000..b2b2e610b --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_004.json @@ -0,0 +1,43 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason 1", + "ruleText": "Description 1", + "ruleType": "S" + }, + { + "ruleCode": "NotActionable Reason 2", + "ruleText": "Description 2", + "ruleType": "S" + }, + { + "ruleCode": "NotActionable Reason 3", + "ruleText": "Description 3", + "ruleType": "S" + } + ] + } + ], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_005.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_005.json new file mode 100644 index 000000000..67020a81d --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_005.json @@ -0,0 +1,38 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason", + "ruleText": "Description 1", + "ruleType": "S" + }, + { + "ruleCode": "NotActionable Reason 3", + "ruleText": "Description 3", + "ruleType": "S" + } + ] + } + ], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_006.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_006.json new file mode 100644 index 000000000..03672f8fd --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_006.json @@ -0,0 +1,33 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason", + "ruleText": "Description 1", + "ruleType": "S" + } + ] + } + ], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_007.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_007.json new file mode 100644 index 000000000..3605be341 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-274-371/AUTO_RSV_ELI-274_007.json @@ -0,0 +1,33 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_274_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group" + }, + { + "cohortCode": "rsv_eli_274_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_274_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason", + "ruleText": "Description 2", + "ruleType": "S" + } + ] + } + ], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json new file mode 100644 index 000000000..d611ab02e --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_001.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-08-10T19:50:31.729537+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_376_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_376_cohort_group_0" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_376_cohort_group_other" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "5e24d72c-04cb-4672-94c6-ce3a2d28671c" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json new file mode 100644 index 000000000..508175962 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_002.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-08-10T20:01:50.163464+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEli", + "actionType": "", + "description": "TestNotEli Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_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" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "8251a4cd-3d39-4b46-8c32-03597c834c51" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json new file mode 100644 index 000000000..c8108df45 --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_003.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-08-10T20:50:17.917074+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_376_cohort_group_0" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason 1", + "ruleText": "NotActionable Description 1", + "ruleType": "S" + } + ] + } + ], + "responseId": "3726dc78-c69e-491a-8cbc-90e059ba2d49" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json new file mode 100644 index 000000000..cce80a66f --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_004.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T06:55:30.261123+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_376_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "are a member of eli_376_cohort_group_10" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "48d5721e-7c0e-4cc5-9d7a-e7448724340a" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json new file mode 100644 index 000000000..d49216aad --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_005.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T20:39:19.034500+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotEli", + "actionType": "", + "description": "TestNotEli Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_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" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "9d6c58d5-b36d-4f93-be8b-e5ed5e9da570" +} diff --git a/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json new file mode 100644 index 000000000..d10737c7c --- /dev/null +++ b/tests/e2e/data/responses/inProgressTestResponses/ELI-376-405/AUTO_RSV_ELI-376_010.json @@ -0,0 +1,46 @@ +{ + "meta": { + "lastUpdated": "2025-08-10T20:51:37.488101+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "TestNotAction", + "actionType": "ButtonWithAuthLink", + "description": "TestNotAction Description", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_376_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_376_cohort_group_20" + }, + { + "cohortCode": "rsv_eli_376_cohort_group_other", + "cohortStatus": "NotActionable", + "cohortText": "are a member of eli_376_cohort_group_other" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotActionable Reason 1", + "ruleText": "NotActionable Description 1", + "ruleType": "S" + }, + { + "ruleCode": "NotActionable Reason 2", + "ruleText": "NotActionable Description 2", + "ruleType": "S" + } + ] + } + ], + "responseId": "7518efc4-1606-43e2-a56e-0a4daefdd229" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_001.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_001.json new file mode 100644 index 000000000..e3a66ecda --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_001.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T19:52:24.529127+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultAction", + "description": "DefaultActionDescription", + "actionType": "DefaultActionType", + "urlLabel": "DefaultLabel", + "urlLink": "https://www.defaultaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "Actionable", + "cohortText": "You are in an age group 2." + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "a53d2e37-7e25-4edd-99c1-9f487c95b347" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_002.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_002.json new file mode 100644 index 000000000..331ba4e36 --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_002.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T19:57:39.626808+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultAction", + "description": "DefaultActionDescription", + "actionType": "DefaultActionType", + "urlLabel": "DefaultLabel", + "urlLink": "https://www.defaultaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "Actionable", + "cohortText": "You are in an age group 2." + }, + { + "cohortCode": "rsv_other_group", + "cohortStatus": "Actionable", + "cohortText": "You are in an another group." + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "c01bcba2-7ae3-4346-bb03-416dd1e307f8" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_003.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_003.json new file mode 100644 index 000000000..e1b80269b --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_003.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T19:57:39.626808+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultAction", + "description": "DefaultActionDescription", + "actionType": "DefaultActionType", + "urlLabel": "DefaultLabel", + "urlLink": "https://www.defaultaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "Actionable", + "cohortText": "You are in an age group 2." + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "c01bcba2-7ae3-4346-bb03-416dd1e307f8" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010-1.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010-1.json new file mode 100644 index 000000000..0fdf41d8f --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010-1.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T20:20:47.764973+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an age group 2." + }, + { + "cohortCode": "rsv_other_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an other group." + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "49db2d41-326f-45d4-afaf-0dd6897413af" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010.json new file mode 100644 index 000000000..0fdf41d8f --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_010.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T20:20:47.764973+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an age group 2." + }, + { + "cohortCode": "rsv_other_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an other group." + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "49db2d41-326f-45d4-afaf-0dd6897413af" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_011.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_011.json new file mode 100644 index 000000000..0fdf41d8f --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_011.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T20:20:47.764973+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an age group 2." + }, + { + "cohortCode": "rsv_other_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an other group." + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "49db2d41-326f-45d4-afaf-0dd6897413af" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_012.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_012.json new file mode 100644 index 000000000..0fdf41d8f --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_012.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-01T20:20:47.764973+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an age group 2." + }, + { + "cohortCode": "rsv_other_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not in an other group." + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "49db2d41-326f-45d4-afaf-0dd6897413af" +} diff --git a/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_013.json b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_013.json new file mode 100644 index 000000000..0f2cac110 --- /dev/null +++ b/tests/e2e/data/responses/regressionTestResponses/AUTO_RSV_REG_013.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-09T15:16:43.877615+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "ruleType": "S" + } + ] + } + ], + "responseId": "c064aa23-730c-454a-831e-e7299007307d" +} diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_001.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_001.json similarity index 80% rename from tests/e2e/data/responses/AUTO_RSV_SB_001.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_001.json index fc1326c0a..4a6253f15 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_001.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_001.json @@ -11,14 +11,14 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", - "cohortStatus": "Actionable" + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old." } ], "suitabilityRules": [], "actions": [ { - "actionType": "ButtonAuthLink", + "actionType": "ButtonWithAuthLink", "actionCode": "BookNBS", "description": "", "urlLink": "http://www.nhs.uk/book-rsv", diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_002.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_002.json similarity index 79% rename from tests/e2e/data/responses/AUTO_RSV_SB_002.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_002.json index e45a371df..53b88e29c 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_002.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_002.json @@ -11,16 +11,18 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", + "cohortText": "are aged 75 to 79 years old.", "cohortStatus": "Actionable" } ], "suitabilityRules": [], "actions": [ { - "actionType": "CareCardWithText", + "actionType": "InfoText", "actionCode": "BookLocal", - "description": "##Getting the vaccine\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": "##Getting the vaccine\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.", + "urlLink": "", + "urlLabel": "" } ] } diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_003.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_003.json similarity index 77% rename from tests/e2e/data/responses/AUTO_RSV_SB_003.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_003.json index e814e90b3..c02961ada 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_003.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_003.json @@ -11,16 +11,18 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_catchup", - "cohortText": "You turned 80 between 2nd September 2024 and 31st August 2025", + "cohortText": "turned 80 between 2nd September 2024 and 31st August 2025", "cohortStatus": "Actionable" } ], "suitabilityRules": [], "actions": [ { - "actionType": "CareCardWithText", + "actionType": "InfoText", "actionCode": "BookLocal", - "description": "##Getting the vaccine\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": "##Getting the vaccine\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.", + "urlLink": "", + "urlLabel": "" } ] } diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_004.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_004.json similarity index 93% rename from tests/e2e/data/responses/AUTO_RSV_SB_004.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_004.json index ed4663779..9f1a7ba65 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_004.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_004.json @@ -12,7 +12,7 @@ "suitabilityRules": [], "actions": [ { - "actionType": "CardWithAuthButton", + "actionType": "ButtonWithAuthLink", "actionCode": "AmendNBS", "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", "urlLink": "http://www.nhs.uk/book-rsv", diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_005.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_005.json similarity index 89% rename from tests/e2e/data/responses/AUTO_RSV_SB_005.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_005.json index 687b05405..7522fb0f2 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_005.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_005.json @@ -14,7 +14,9 @@ { "actionType": "CardWithText", "actionCode": "ManageLocal", - "description": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment." + "description": "##You have an RSV vaccination appointment\nContact your healthcare provider to change or cancel your appointment.", + "urlLink": "", + "urlLabel": "" } ] } diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_006.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_006.json similarity index 72% rename from tests/e2e/data/responses/AUTO_RSV_SB_006.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_006.json index 3413b999b..b52ea12f7 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_006.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_006.json @@ -13,7 +13,9 @@ { "ruleType": "S", "ruleCode": "AlreadyVaccinated", - "ruleText": "##You've had your RSV vaccination\nBased on our records, you recently had this vaccination. You do not need to do anything." + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination on <>.", + "urlLink": "", + "urlLabel": "" } ], "actions": [] diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_007.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_007.json similarity index 69% rename from tests/e2e/data/responses/AUTO_RSV_SB_007.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_007.json index e292c3719..df94725a6 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_007.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_007.json @@ -11,15 +11,15 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", - "cohortStatus": "NotActionable" + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old." } ], "suitabilityRules": [ { - "ruleType": "S", "ruleCode": "NotAvailable", - "ruleText": "Vaccinations are not currently available" + "ruleText": "NotAvailable|Vaccinations are not currently available.", + "ruleType": "S" } ], "actions": [] diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_008.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_008.json similarity index 100% rename from tests/e2e/data/responses/AUTO_RSV_SB_008.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_008.json diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_009.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_009.json similarity index 81% rename from tests/e2e/data/responses/AUTO_RSV_SB_009.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_009.json index 65ecaf7a5..f3821a053 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_009.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_009.json @@ -11,7 +11,7 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", + "cohortText": "are aged 75 to 79 years old.", "cohortStatus": "NotActionable" } ], @@ -19,7 +19,7 @@ { "ruleType": "S", "ruleCode": "NotYetDue", - "ruleText": "Your next dose is not yet due." + "ruleText": "NotYetDue|Your next dose is not yet due." } ], "actions": [] diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_010.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_010.json similarity index 79% rename from tests/e2e/data/responses/AUTO_RSV_SB_010.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_010.json index 0b9dc7258..8993f41d8 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_010.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_010.json @@ -11,7 +11,7 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", + "cohortText": "are aged 75 to 79 years old.", "cohortStatus": "NotActionable" } ], @@ -19,7 +19,7 @@ { "ruleType": "S", "ruleCode": "TooClose", - "ruleText": "Your previous vaccination was less than 91 days ago." + "ruleText": "TooClose|Your previous vaccination was less than 91 days ago." } ], "actions": [] diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_011.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_011.json similarity index 66% rename from tests/e2e/data/responses/AUTO_RSV_SB_011.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_011.json index 3070205d0..509cd71b7 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_011.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_011.json @@ -11,7 +11,7 @@ "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are aged 75 to 79 years old.", + "cohortText": "are aged 75 to 79 years old.", "cohortStatus": "NotActionable" } ], @@ -19,7 +19,7 @@ { "ruleType": "S", "ruleCode": "OtherSetting", - "ruleText": "##Getting the vaccine\nOur record show you're living in a setting where care is provided.\nIf you think you should have the RSV vaccine, speak to a member of staff where you live." + "ruleText": "OtherSetting|## Getting the vaccine\n\nOur record show you're living in a setting where care is provided.\n\nIf you think you should have the RSV vaccine, speak to a member of staff where you live." } ], "actions": [] diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_012.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_012.json similarity index 100% rename from tests/e2e/data/responses/AUTO_RSV_SB_012.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_012.json diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_013.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_013.json similarity index 100% rename from tests/e2e/data/responses/AUTO_RSV_SB_013.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_013.json diff --git a/tests/e2e/data/responses/AUTO_RSV_SB_014.json b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_014.json similarity index 76% rename from tests/e2e/data/responses/AUTO_RSV_SB_014.json rename to tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_014.json index 3858968e4..29ba244d7 100644 --- a/tests/e2e/data/responses/AUTO_RSV_SB_014.json +++ b/tests/e2e/data/responses/smokeTestResponses/AUTO_RSV_SB_014.json @@ -7,16 +7,16 @@ { "condition": "RSV", "status": "NotEligible", - "statusText": "We do not believe you should have this vaccine", + "statusText": "We do not believe you can have it", "eligibilityCohorts": [ { "cohortCode": "rsv_age_rolling", - "cohortText": "You are not aged 75 to 79 years old.", + "cohortText": "are not aged 75 to 79 years old.", "cohortStatus": "NotEligible" }, { "cohortCode": "rsv_age_catchup", - "cohortText": "You did not turn 80 between 2nd September 2024 and 31st August 2025", + "cohortText": "did not turn 80 between 2nd September 2024 and 31st August 2025", "cohortStatus": "NotEligible" } ], diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-155.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-155.json new file mode 100644 index 000000000..6cb46fb63 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-155.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_155_in_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_155_in" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionCode": "AmendNBS", + "description": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "actionType": "ButtonWithAuthLink", + "urlLink": "http://www.nhs.uk/book-rsv", + "urlLabel": "Manage your appointment" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-1.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-1.json new file mode 100644 index 000000000..b1c43974f --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-1.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_216_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_216_cohort" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionCode": "ActionOneRoutingCode", + "description": "ActionOneDescription", + "actionType": "ActionOneActionType", + "urlLabel": "ActionOneUrlLabel", + "urlLink": "http://www.actiononeurl.com/" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-2.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-2.json new file mode 100644 index 000000000..4f3339882 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-2.json @@ -0,0 +1,26 @@ +{ + "resourceType": "OperationOutcome", + "id": "e158b107-4283-43ee-8a4e-8e68cd15d26f", + "meta": { + "lastUpdated": "2025-08-12T08:09:01.662728Z" + }, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. This could be because the number is incorrect or some other reason we cannot process that number." + } + ] + }, + "diagnostics": "NHS Number '9686368' was not recognised by the Eligibility Signposting API", + "location": [ + "parameters/id" + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-3.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-3.json new file mode 100644 index 000000000..d959499f3 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-216-3.json @@ -0,0 +1,3 @@ +{ + "response_items": "NHS number mismatch" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-1.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-1.json new file mode 100644 index 000000000..754b65de9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-1.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_291_cohort_1_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_291_cohort_1" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionType": "DefaultActionType", + "actionCode": "DefaultAction", + "description": "DefaultActionDescription", + "urlLabel": "DefaultActionLabel", + "urlLink": "https://www.defaultactionurl.com/" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-2.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-2.json new file mode 100644 index 000000000..8d29be962 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-2.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_291_cohort_2_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_291_cohort_2" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionType": "ActionTwoActionType", + "actionCode": "ActionTwoRoutingCode", + "description": "ActionTwoDescription", + "urlLink": "http://www.actiontwourl.com/", + "urlLabel": "ActionTwoUrlLabel" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-3.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-3.json new file mode 100644 index 000000000..5657c9940 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-219-3.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_291_cohort_3_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_291_cohort_3" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionCode": "ActionOneRoutingCode", + "description": "ActionOneDescription", + "actionType": "ActionOneActionType", + "urlLabel": "ActionOneUrlLabel", + "urlLink": "http://www.actiononeurl.com/" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-01.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-01.json new file mode 100644 index 000000000..3dc537ca7 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-01.json @@ -0,0 +1,33 @@ +{ + "meta": { + "lastUpdated": "2025-07-22T07:29:26.220684+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_221_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_221_cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "Already Vaccinated|We believe that you Are Already Vaccinated", + "ruleType": "S" + }, + { + "ruleCode": "Other Setting Care", + "ruleText": "Other Setting|We believe that you will get the vaccination where you are located", + "ruleType": "S" + } + ] + } + ], + "responseId": "47a0b0cb-a5b4-457c-966f-294321f5c1c7" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-02.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-02.json new file mode 100644 index 000000000..4f3234878 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-02.json @@ -0,0 +1,38 @@ +{ + "meta": { + "lastUpdated": "2025-07-22T07:35:17.550067+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_221_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_221_cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "Already Vaccinated|We believe that you Are Already Vaccinated", + "ruleType": "S" + }, + { + "ruleCode": "Other Setting Care", + "ruleText": "Other Setting|We believe that you will get the vaccination where you are located", + "ruleType": "S" + }, + { + "ruleCode": "Other Setting DE", + "ruleText": "Other Setting|We believe that you will get the vaccination where you are located", + "ruleType": "S" + } + ] + } + ], + "responseId": "ae6577f5-ddd5-4199-b387-35b9fdb15172" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-03.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-03.json new file mode 100644 index 000000000..4f3234878 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-221-03.json @@ -0,0 +1,38 @@ +{ + "meta": { + "lastUpdated": "2025-07-22T07:35:17.550067+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_221_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_221_cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "Already Vaccinated|We believe that you Are Already Vaccinated", + "ruleType": "S" + }, + { + "ruleCode": "Other Setting Care", + "ruleText": "Other Setting|We believe that you will get the vaccination where you are located", + "ruleType": "S" + }, + { + "ruleCode": "Other Setting DE", + "ruleText": "Other Setting|We believe that you will get the vaccination where you are located", + "ruleType": "S" + } + ] + } + ], + "responseId": "ae6577f5-ddd5-4199-b387-35b9fdb15172" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-1.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-1.json new file mode 100644 index 000000000..9b5387504 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-1.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T10:32:10.803638+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "9b11bdb0-afa8-4ff7-994c-ee7738313d76" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-2.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-2.json new file mode 100644 index 000000000..afcbcfb43 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-2.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T09:58:29.799271+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "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": "3eb44989-523d-48c5-a59d-011fbc7425a6" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-3.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-3.json new file mode 100644 index 000000000..398df9eee --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-3.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T10:32:59.478617+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "652229c3-0df6-4224-a41e-8482fe274bf5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-4.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-4.json new file mode 100644 index 000000000..398df9eee --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-4.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T10:32:59.478617+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "652229c3-0df6-4224-a41e-8482fe274bf5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-5.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-5.json new file mode 100644 index 000000000..398df9eee --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-5.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T10:32:59.478617+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "652229c3-0df6-4224-a41e-8482fe274bf5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-6.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-6.json new file mode 100644 index 000000000..afcbcfb43 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-6.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T09:58:29.799271+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "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": "3eb44989-523d-48c5-a59d-011fbc7425a6" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-7.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-7.json new file mode 100644 index 000000000..99d6cd6a0 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-7.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-25T15:00:10.943057+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "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": "526cbf5b-7049-4870-85c5-23c58b48973d" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-8.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-8.json new file mode 100644 index 000000000..663d20f03 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-222-8.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-25T15:07:17.633204+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Already Vaccinated", + "ruleText": "##You've had your RSV vaccination\nWe believe you had your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "85ef07db-b5d8-4451-8f63-e3229a424332" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-01.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-01.json new file mode 100644 index 000000000..aa9cc296e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-01.json @@ -0,0 +1,68 @@ +{ + "meta": { + "lastUpdated": "2025-07-22T21:07:51.351855+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_236_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_236" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "13Q Flag NVL equal Test", + "ruleText": "13Q Flag NVL Test|13Q Flag NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "CARE_HOME_FLAG not equal NVL Test", + "ruleText": "CARE_HOME_FLAG not equal NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "COMMISSIONING_REGION greater than NVL Test", + "ruleText": "COMMISSIONING_REGION greater than NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "DATE_OF_BIRTH less than NVL Test", + "ruleText": "DATE_OF_BIRTH less than NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "GENDER greater than or equal to NVL Test", + "ruleText": "GENDER greater than or equal to NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "GP_PRACTICE_CODE less or equal to NVL Test", + "ruleText": "GP_PRACTICE_CODE less than or equal to NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "ruleText": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "LAST_INVITE_DATE W> NVL Test", + "ruleText": "LAST_INVITE_DATE W> NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "LAST_VALID_DOSE_DATE Y< NVL Test", + "ruleText": "LAST_VALID_DOSE_DATE Y< NVL Test", + "ruleType": "S" + } + ] + } + ], + "responseId": "edb0e191-897e-41c0-b632-eef98d484867" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-02.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-02.json new file mode 100644 index 000000000..aa9cc296e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-236-02.json @@ -0,0 +1,68 @@ +{ + "meta": { + "lastUpdated": "2025-07-22T21:07:51.351855+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_236_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_236" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "13Q Flag NVL equal Test", + "ruleText": "13Q Flag NVL Test|13Q Flag NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "CARE_HOME_FLAG not equal NVL Test", + "ruleText": "CARE_HOME_FLAG not equal NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "COMMISSIONING_REGION greater than NVL Test", + "ruleText": "COMMISSIONING_REGION greater than NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "DATE_OF_BIRTH less than NVL Test", + "ruleText": "DATE_OF_BIRTH less than NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "GENDER greater than or equal to NVL Test", + "ruleText": "GENDER greater than or equal to NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "GP_PRACTICE_CODE less or equal to NVL Test", + "ruleText": "GP_PRACTICE_CODE less than or equal to NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "ruleText": "BOOKED_APPOINTMENT_DATE D<= NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "LAST_INVITE_DATE W> NVL Test", + "ruleText": "LAST_INVITE_DATE W> NVL Test", + "ruleType": "S" + }, + { + "ruleCode": "LAST_VALID_DOSE_DATE Y< NVL Test", + "ruleText": "LAST_VALID_DOSE_DATE Y< NVL Test", + "ruleType": "S" + } + ] + } + ], + "responseId": "edb0e191-897e-41c0-b632-eef98d484867" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-01.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-01.json new file mode 100644 index 000000000..b0fa0933e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-01.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:44:33.140529+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "fc6a6876-0ad8-45fb-85b3-9db42116d61b" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-02.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-02.json new file mode 100644 index 000000000..6ef823be4 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-02.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:54:13.465387+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "81213bbe-8a5d-47be-8868-eb03bb37bb49" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-03.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-03.json new file mode 100644 index 000000000..0d4be9f79 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-03.json @@ -0,0 +1,23 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:54:13.465387+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + ] + } + ], + "responseId": "81213bbe-8a5d-47be-8868-eb03bb37bb49" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-04.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-04.json new file mode 100644 index 000000000..24103b438 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-04.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:44:33.140529+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultX", + "actionType": "DefaultXType", + "description": "DefaultXDescription", + "urlLabel": "DefaultXLabel", + "urlLink": "https://www.defaultxaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "fc6a6876-0ad8-45fb-85b3-9db42116d61b" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-05.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-05.json new file mode 100644 index 000000000..02a3d5f8f --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-05.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:54:13.465387+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultY", + "actionType": "DefaultYType", + "description": "DefaultYDescription", + "urlLabel": "DefaultYLabel", + "urlLink": "https://www.defaultyaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "81213bbe-8a5d-47be-8868-eb03bb37bb49" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-06.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-06.json new file mode 100644 index 000000000..2dcd834ed --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-06.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T13:54:13.465387+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultA", + "actionType": "DefaultAType", + "description": "DefaultADescription", + "urlLabel": "DefaultALabel", + "urlLink": "https://www.defaultaaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "81213bbe-8a5d-47be-8868-eb03bb37bb49" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-07.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-07.json new file mode 100644 index 000000000..3eeb4318e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-07.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:29:05.049816+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "OtherX", + "actionType": "OtherXType", + "description": "OtherXDescription", + "urlLabel": "OtherXLabel", + "urlLink": "https://www.otherxaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "5a263695-083e-4218-bbdf-969427913aa7" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-08.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-08.json new file mode 100644 index 000000000..7fee15448 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-08.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:33:55.562448+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "OtherY", + "actionType": "OtherYType", + "description": "OtherYDescription", + "urlLabel": "OtherYLabel", + "urlLink": "https://www.otheryaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "7e7578a6-cddf-4d9e-8552-9d5502bb4d4c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-09.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-09.json new file mode 100644 index 000000000..3e391df5c --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-09.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:46:44.985757+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "65e95ff6-11e4-45e7-8844-d2242a422b88" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-10.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-10.json new file mode 100644 index 000000000..68f3ce5cb --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-10.json @@ -0,0 +1,21 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:29:05.049816+00:00" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "5a263695-083e-4218-bbdf-969427913aa7" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-11.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-11.json new file mode 100644 index 000000000..810c543d1 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-11.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:33:55.562448+00:00" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "7e7578a6-cddf-4d9e-8552-9d5502bb4d4c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-12.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-12.json new file mode 100644 index 000000000..a4f3e6b98 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-12.json @@ -0,0 +1,21 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T14:46:44.985757+00:00" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "65e95ff6-11e4-45e7-8844-d2242a422b88" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-13.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-13.json new file mode 100644 index 000000000..2b95f2473 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-13.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T15:34:56.695680+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultX", + "actionType": "DefaultXType", + "description": "DefaultXDescription", + "urlLabel": "DefaultXLabel", + "urlLink": "https://www.defaultxaction.com/" + }, + { + "actionCode": "OtherX", + "actionType": "OtherXType", + "description": "OtherXDescription", + "urlLabel": "OtherXLabel", + "urlLink": "https://www.otherxaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "6dbcf04d-9ae6-415d-b54f-6677c175dc6b" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-14.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-14.json new file mode 100644 index 000000000..a215f55e0 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-14.json @@ -0,0 +1,43 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T15:33:08.084080+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DefaultY", + "actionType": "DefaultYType", + "description": "DefaultYDescription", + "urlLabel": "DefaultYLabel", + "urlLink": "https://www.defaultyaction.com/" + }, + { + "actionCode": "OtherY", + "actionType": "OtherYType", + "description": "OtherYDescription", + "urlLabel": "OtherYLabel", + "urlLink": "https://www.otheryaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "299ff75e-4d02-4f23-81ca-6bfbf1e075a5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-15.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-15.json new file mode 100644 index 000000000..a436c06b1 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-15.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T15:31:37.704738+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "DefaultA", + "actionType": "DefaultAType", + "description": "DefaultADescription", + "urlLabel": "DefaultALabel", + "urlLink": "https://www.defaultaaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "65479e78-ee1d-4690-b29e-d75af4273d18" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-16.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-16.json new file mode 100644 index 000000000..1841f2b43 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-16.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T16:14:39.133500+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "HigherX", + "actionType": "HigherXType", + "description": "HigherXDescription", + "urlLabel": "HigherXLabel", + "urlLink": "https://www.higherxaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in eli_295" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "906fdcee-63f4-4585-a133-a3ee87c48d24" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-17.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-17.json new file mode 100644 index 000000000..2be0d2099 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-295-17.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-18T16:15:15.028078+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "HigherY", + "actionType": "HigherYType", + "description": "HigherYDescription", + "urlLabel": "HigherYLabel", + "urlLink": "https://www.higheryaction.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_295_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in eli_295" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Test S Rule", + "ruleText": "Test S Rule", + "ruleType": "S" + } + ] + } + ], + "responseId": "33b7a6a5-3961-4e73-ad90-89dc5d61b219" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-1.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-1.json new file mode 100644 index 000000000..2d56cbf08 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-1.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_317_cohort_1_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_317_cohort_1" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionCode": "", + "description": "", + "actionType": "", + "urlLabel": "", + "urlLink": "" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-2.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-2.json new file mode 100644 index 000000000..d832085ad --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-2.json @@ -0,0 +1,30 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_317_cohort_2_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_317_cohort_2" + } + ], + "suitabilityRules": [], + "actions": [ + { + "actionCode": "", + "description": "", + "actionType": "", + "urlLabel": "", + "urlLink": "" + } + ] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-3.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-3.json new file mode 100644 index 000000000..ebca2e682 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-3.json @@ -0,0 +1,21 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_317_cohort_3_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_317_cohort_3" + } + ], + "suitabilityRules": [] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-4.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-4.json new file mode 100644 index 000000000..d053d6e8e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-4.json @@ -0,0 +1,22 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "condition": "RSV", + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "eligibilityCohorts": [ + { + "cohortCode": "eli_317_cohort_4_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_317_cohort_4" + } + ], + "suitabilityRules": [], + "actions": [] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-5.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-5.json new file mode 100644 index 000000000..c9e5aa9b2 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-317-5.json @@ -0,0 +1,44 @@ +{ + "responseId": "<>", + "meta": { + "lastUpdated": "<>" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "ActionOneRoutingCode", + "actionType": "ActionOneActionType", + "description": "ActionOneDescription", + "urlLabel": "ActiononeUrlLabel", + "urlLink": "http://www.actiononeurl.com/" + }, + { + "actionCode": "ActionTwoRoutingCode", + "actionType": "ActionTwoActionType", + "description": "ActionTwoDescription", + "urlLabel": "ActionTwoUrlLabel", + "urlLink": "http://www.actiontwourl.com/" + }, + { + "actionCode": "ActionThreeRoutingCode", + "actionType": "ActionThreeActionType", + "description": "ActionThreeDescription", + "urlLabel": "ActionThreeUrlLabel", + "urlLink": "http://www.actionthreeurl.com/" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "eli_317_cohort_5_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in eli_317_cohort_5" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ] +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-1.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-1.json new file mode 100644 index 000000000..306ee5b66 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-1.json @@ -0,0 +1,64 @@ +{ + "meta": { + "lastUpdated": "2025-07-14T20:34:22.263070+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + }, + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + }, + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an RSV cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "d5255fb5-ec34-46c0-8177-d54c3bcbb5d1" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-10.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-10.json new file mode 100644 index 000000000..8b30871c9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-10.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T14:52:52.785698+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "5c8d1cb3-8326-40b1-93ad-1b7fa24c2595" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-11.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-11.json new file mode 100644 index 000000000..9f936928c --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-11.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T14:52:52.785698+00:00" + }, + "processedSuggestions": [], + "responseId": "5c8d1cb3-8326-40b1-93ad-1b7fa24c2595" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-2.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-2.json new file mode 100644 index 000000000..306ee5b66 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-2.json @@ -0,0 +1,64 @@ +{ + "meta": { + "lastUpdated": "2025-07-14T20:34:22.263070+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + }, + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + }, + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an RSV cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "d5255fb5-ec34-46c0-8177-d54c3bcbb5d1" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-3.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-3.json new file mode 100644 index 000000000..658cd5c04 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-3.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-07-14T20:34:22.263070+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "d5255fb5-ec34-46c0-8177-d54c3bcbb5d1" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-4.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-4.json new file mode 100644 index 000000000..ec373e2a9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-4.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "2025-07-14T20:34:22.263070+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "d5255fb5-ec34-46c0-8177-d54c3bcbb5d1" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-5.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-5.json new file mode 100644 index 000000000..7fb1ab894 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-5.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "2025-07-14T20:34:22.263070+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + }, + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an RSV cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "d5255fb5-ec34-46c0-8177-d54c3bcbb5d1" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-6.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-6.json new file mode 100644 index 000000000..a3dc37c19 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-6.json @@ -0,0 +1,78 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T13:05:26.936847+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + }, + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an flu screening appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-bs" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "FLU_screening_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an flu SCREENING cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the FLU vaccine", + "suitabilityRules": [] + }, + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + }, + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_screening_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an RSV SCREENING cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "2e40b120-6f59-4418-9c80-363137e6386e" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-7.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-7.json new file mode 100644 index 000000000..c57312555 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-7.json @@ -0,0 +1,78 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T14:52:52.785698+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + }, + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an flu screening appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-bs" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "FLU_screening_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an flu SCREENING cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the FLU vaccine", + "suitabilityRules": [] + }, + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + }, + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_screening_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an RSV SCREENING cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "5c8d1cb3-8326-40b1-93ad-1b7fa24c2595" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-8.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-8.json new file mode 100644 index 000000000..bff98f1db --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-8.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T14:52:52.785698+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an flu screening appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-bs" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "FLU_screening_cohort_group", + "cohortStatus": "Actionable", + "cohortText": "You are currently in an flu SCREENING cohort" + } + ], + "status": "Actionable", + "statusText": "You should have the FLU vaccine", + "suitabilityRules": [] + }, + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_screening_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an RSV SCREENING cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "5c8d1cb3-8326-40b1-93ad-1b7fa24c2595" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-9.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-9.json new file mode 100644 index 000000000..45c8d1200 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-320-9.json @@ -0,0 +1,42 @@ +{ + "meta": { + "lastUpdated": "2025-07-15T14:52:52.785698+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "covid_cohort_group", + "cohortStatus": "NotActionable", + "cohortText": "You are currently in a covid cohort" + } + ], + "status": "NotActionable", + "statusText": "You should have the COVID vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "##You've had your COVID vaccination\nWe believe you already had your COVID vaccination.", + "ruleType": "S" + } + ] + }, + { + "actions": [], + "condition": "MMR", + "eligibilityCohorts": [ + { + "cohortCode": "mmr_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "You are not currently in an mmr cohort" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "5c8d1cb3-8326-40b1-93ad-1b7fa24c2595" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_001.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_001.json new file mode 100644 index 000000000..d1c5e9563 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_001.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-16T10:32:10.803638+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "9b11bdb0-afa8-4ff7-994c-ee7738313d76" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_002.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_002.json new file mode 100644 index 000000000..52fd438d6 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_002.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:46:13.437131+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": "c4aba395-5f53-49b7-8506-9ab8f6bd7750" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_003.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_003.json new file mode 100644 index 000000000..f00ac3dc4 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_003.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:47:55.146282+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "0587f923-0f83-4f2b-aba4-024f11c7cf4e" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_004.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_004.json new file mode 100644 index 000000000..78d7940bf --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_004.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:48:45.576609+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "24041024-19c7-45ca-a564-0394e15f634c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_005.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_005.json new file mode 100644 index 000000000..601e189ef --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_005.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:49:21.809706+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "dc283180-9a04-4005-9da1-2dec682af213" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_006.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_006.json new file mode 100644 index 000000000..8e1e3f5a2 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_006.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:52:33.593209+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": "9bdf8ca7-e5b1-4e1e-a17f-a9e17bd4c203" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_007.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_007.json new file mode 100644 index 000000000..17443852e --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_007.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:53:18.270563+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": "d8144e93-4cfd-402b-ac3d-7699aa21b48f" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_008.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_008.json new file mode 100644 index 000000000..8b7d4b585 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_008.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T15:53:59.174715+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "54f1841a-93e5-4da1-916b-6ed1cff5903f" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_009.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_009.json new file mode 100644 index 000000000..204fb5de9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_009.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T16:08:36.057890+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": "84069cc8-d3a4-48aa-adcf-d5e292fb1a56" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_010.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_010.json new file mode 100644 index 000000000..204fb5de9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_010.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T16:08:36.057890+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": "84069cc8-d3a4-48aa-adcf-d5e292fb1a56" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_011.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_011.json new file mode 100644 index 000000000..204fb5de9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_011.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T16:08:36.057890+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": "84069cc8-d3a4-48aa-adcf-d5e292fb1a56" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_012.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_012.json new file mode 100644 index 000000000..204fb5de9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_012.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T16:08:36.057890+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": "84069cc8-d3a4-48aa-adcf-d5e292fb1a56" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_013.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_013.json new file mode 100644 index 000000000..faff88634 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_013.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-28T18:54:18.927265+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "622dc3d6-6c91-427a-8e03-b8a42fef140b" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_014.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_014.json new file mode 100644 index 000000000..c77bdbc6f --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_014.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T07:26:50.668718+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "NotActionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "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.", + "ruleType": "S" + } + ] + } + ], + "responseId": "4cab3850-0478-4cc5-a562-7c1b113740dc" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_015.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_015.json new file mode 100644 index 000000000..b3020f0e8 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_015.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T07:38:36.598629+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Other Setting with no future booking", + "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": "8cd0c26a-626d-4e02-9e3e-817c01fd4afa" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_016.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_016.json new file mode 100644 index 000000000..b6aef56b1 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_016.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T07:38:36.598629+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "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.", + "ruleType": "S" + } + ] + } + ], + "responseId": "8cd0c26a-626d-4e02-9e3e-817c01fd4afa" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_017.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_017.json new file mode 100644 index 000000000..c7508e1f8 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_017.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T13:30:49.717741+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "ManageLocal", + "actionType": "CardWithText", + "description": "##You have an RSV vaccination appointment\n\nContact your healthcare provider to change or cancel your appointment.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "1693bf53-e5a0-4320-b2cf-dbcd467bbb04" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_018.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_018.json new file mode 100644 index 000000000..710812e5c --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_018.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T13:35:47.326787+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "3b13b33f-51d8-45df-b5f2-854950a8724c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_019.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_019.json new file mode 100644 index 000000000..710812e5c --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_019.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T13:35:47.326787+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "3b13b33f-51d8-45df-b5f2-854950a8724c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_020.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_020.json new file mode 100644 index 000000000..6d3ea76b3 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_020.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T14:04:16.063150+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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": "BookNBS", + "actionType": "ButtonWithAuthLink", + "description": "", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "HelpSupportInfo", + "actionType": "InfoText", + "description": "## CONTENT TBC\n\nBlah blah blah.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "f0f2023c-3997-44aa-9a3a-35b5c432336c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_021.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_021.json new file mode 100644 index 000000000..6d3ea76b3 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_021.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T14:04:16.063150+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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": "BookNBS", + "actionType": "ButtonWithAuthLink", + "description": "", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "HelpSupportInfo", + "actionType": "InfoText", + "description": "## CONTENT TBC\n\nBlah blah blah.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "f0f2023c-3997-44aa-9a3a-35b5c432336c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_022.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_022.json new file mode 100644 index 000000000..a4f4656b8 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_022.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T16:27:41.967804+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ad09ee8c-ee37-4a7f-8fde-22aec6c90d89" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_023.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_023.json new file mode 100644 index 000000000..fe6f609a4 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_023.json @@ -0,0 +1,42 @@ +{ + "meta": { + "lastUpdated": "2025-07-29T16:27:41.967804+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ad09ee8c-ee37-4a7f-8fde-22aec6c90d89" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_024.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_024.json new file mode 100644 index 000000000..0dc4f9323 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_024.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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": "BookNBS", + "actionType": "ButtonWithAuthLink", + "description": "", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "HelpSupportInfo", + "actionType": "InfoText", + "description": "## CONTENT TBC\n\nBlah blah blah.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_025.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_025.json new file mode 100644 index 000000000..0dc4f9323 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_025.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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": "BookNBS", + "actionType": "ButtonWithAuthLink", + "description": "", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "HelpSupportInfo", + "actionType": "InfoText", + "description": "## CONTENT TBC\n\nBlah blah blah.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_026.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_026.json new file mode 100644 index 000000000..3367c8f54 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_026.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_027.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_027.json new file mode 100644 index 000000000..3367c8f54 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_027.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_028.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_028.json new file mode 100644 index 000000000..3367c8f54 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-365_028.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_001.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_001.json new file mode 100644 index 000000000..161e47856 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_001.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:04:27.923796+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "a09f1caf-8c0b-4448-a7a5-d307924db8b5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_002.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_002.json new file mode 100644 index 000000000..fb3f1d028 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_002.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:04:27.923796+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "a09f1caf-8c0b-4448-a7a5-d307924db8b5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_003.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_003.json new file mode 100644 index 000000000..0807411ba --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_003.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:06:59.787096+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "9dc41999-d5e0-4549-bcd8-6265a4284997" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_004.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_004.json new file mode 100644 index 000000000..bfb84ac34 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_004.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:08:58.770053+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "75 to 79 - Other Setting (Care Home) with no future booking", + "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": "f35fe552-5b0b-4be1-9a83-61696de605f6" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_005.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_005.json new file mode 100644 index 000000000..41c3f8730 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_005.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:08:58.770053+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "NotActionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "80 plus - Other Setting (Care Home) with no future booking", + "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": "f35fe552-5b0b-4be1-9a83-61696de605f6" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_006.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_006.json new file mode 100644 index 000000000..321775245 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_006.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:08:19.685910+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "bc3da5e2-b3b6-4979-b0fe-e40c48dd9e1c" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_007.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_007.json new file mode 100644 index 000000000..17669afd9 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_007.json @@ -0,0 +1,42 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:04:27.923796+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "a09f1caf-8c0b-4448-a7a5-d307924db8b5" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_008.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_008.json new file mode 100644 index 000000000..67c01a813 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-373_008.json @@ -0,0 +1,51 @@ +{ + "meta": { + "lastUpdated": "2025-08-11T16:34:44.019817+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + }, + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "NotActionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "75 to 79 - Other Setting (Care Home) with no future booking", + "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" + }, + { + "ruleCode": "80 plus - Other Setting (Care Home) with no future booking", + "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" + }, + { + "ruleCode": "80 plus - Other Setting (Detained Estates) with no future booking", + "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": "ac49dbde-9adb-49a5-a180-6503b7adcf82" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_001.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_001.json new file mode 100644 index 000000000..a6ff81f36 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_001.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_002.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_002.json new file mode 100644 index 000000000..43ff26a3f --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_002.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-07T19:59:03.606275+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_399_active_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_399_active_cohort_group" + }, + { + "cohortCode": "rsv_eli_399_active_cohort_group_other", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_399_active_cohort_group_other" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "7bf9eeeb-4951-4ee9-95ad-64d9a556908d" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_003.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_003.json new file mode 100644 index 000000000..43ff26a3f --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_003.json @@ -0,0 +1,27 @@ +{ + "meta": { + "lastUpdated": "2025-08-07T19:59:03.606275+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_399_active_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_399_active_cohort_group" + }, + { + "cohortCode": "rsv_eli_399_active_cohort_group_other", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_399_active_cohort_group_other" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "7bf9eeeb-4951-4ee9-95ad-64d9a556908d" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_004.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_004.json new file mode 100644 index 000000000..a6ff81f36 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_004.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_005.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_005.json new file mode 100644 index 000000000..a6ff81f36 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_005.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_006.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_006.json new file mode 100644 index 000000000..a6ff81f36 --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_006.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2025-08-06T15:15:45.231568+00:00" + }, + "processedSuggestions": [], + "responseId": "f6dfcae4-32c4-493a-a0cd-5faf83f3da64" +} diff --git a/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_007.json b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_007.json new file mode 100644 index 000000000..408f1c61c --- /dev/null +++ b/tests/e2e/data/responses/storyTestResponses/AUTO_RSV_ELI-399_007.json @@ -0,0 +1,22 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "COVID", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_eli_399_cohort_group", + "cohortStatus": "NotEligible", + "cohortText": "are not a member of eli_399_cohort_group_10" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json new file mode 100644 index 000000000..61e943908 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_001.json @@ -0,0 +1,44 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:33:02.541065+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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": "BookNBS", + "actionType": "ButtonWithAuthLink", + "description": "", + "urlLabel": "Continue to booking", + "urlLink": "http://www.nhs.uk/book-rsv" + }, + { + "actionCode": "HelpSupportInfo", + "actionType": "InfoText", + "description": "## CONTENT TBC\n\nBlah blah blah.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "da7c72bb-0a3e-47c1-a4c6-12a7994c4f31" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json new file mode 100644 index 000000000..e75e42133 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_002.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:34:16.758583+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "Actionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "04e12c58-86a4-46e9-a6ef-d640eb9a8e94" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json new file mode 100644 index 000000000..ff2e37c65 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_003.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:35:30.455708+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age_catchup", + "cohortStatus": "Actionable", + "cohortText": "turned 80 after 1st September 2024" + } + ], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "ad2f0a17-938a-423f-a2c7-82cfda58ced9" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json new file mode 100644 index 000000000..633262788 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_004.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:36:33.935778+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AmendNBS", + "actionType": "ButtonWithAuthLink", + "description": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.", + "urlLabel": "Manage your appointment", + "urlLink": "http://www.nhs.uk/book-rsv" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "4fe9ae68-7347-46f1-91c7-5e723a0b0249" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json new file mode 100644 index 000000000..af3da5ed0 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_005.json @@ -0,0 +1,24 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:37:10.340372+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "ManageLocal", + "actionType": "CardWithText", + "description": "##You have an RSV vaccination appointment\n\nContact your healthcare provider to change or cancel your appointment.", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "status": "Actionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [] + } + ], + "responseId": "594ce550-9721-4c1a-8dae-92ecdba2e763" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json new file mode 100644 index 000000000..2272fda9b --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_006.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-07-31T15:37:46.783236+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "303c446b-738e-493b-8c5f-3ab023750de7" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json new file mode 100644 index 000000000..1629b9158 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_007.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T07:49:46.208763+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "Not Available", + "ruleText": "##RSV vaccinations are not currently available\n\nPlease try again soon.", + "ruleType": "S" + } + ] + } + ], + "responseId": "aa5a5552-f94d-4dcf-a2d0-f888945b1641" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json new file mode 100644 index 000000000..8c12bd373 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_008.json @@ -0,0 +1,37 @@ +{ + "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/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json new file mode 100644 index 000000000..82fab2ff7 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_009.json @@ -0,0 +1,28 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T07:56:59.488641+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "status": "NotActionable", + "statusText": "You should have the RSV vaccine", + "suitabilityRules": [ + { + "ruleCode": "NotYetDue", + "ruleText": "##Your RSV vaccination is not yet due\\n\\nYour next dose will be due in 3 months.", + "ruleType": "S" + } + ] + } + ], + "responseId": "7399cb75-afd1-4861-94d4-63c8f615db61" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.json new file mode 100644 index 000000000..698ff9861 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_011.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 75 to 79 years old" + } + ], + "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/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json new file mode 100644 index 000000000..5ca38ff4b --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_012.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T08:10:25.890939+00:00" + }, + "processedSuggestions": [ + { + "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. (ADD LINK).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [ + { + "cohortCode": "rsv_age", + "cohortStatus": "NotActionable", + "cohortText": "are aged 75 to 79 years old" + } + ], + "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.", + "ruleType": "S" + } + ] + } + ], + "responseId": "2effe07d-747b-4288-84ef-9b7770dc7430" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json new file mode 100644 index 000000000..03870ebd2 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_013.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T08:11:38.412584+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "970bede3-4428-4456-9f4f-f1bf73c16953" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json new file mode 100644 index 000000000..03870ebd2 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_014.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2025-08-01T08:11:38.412584+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "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).", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "RSV", + "eligibilityCohorts": [], + "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 your vaccination.", + "ruleType": "S" + } + ] + } + ], + "responseId": "970bede3-4428-4456-9f4f-f1bf73c16953" +} diff --git a/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json new file mode 100644 index 000000000..8c1d56072 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_015.json @@ -0,0 +1,35 @@ +{ + "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/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_500.json b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_500.json new file mode 100644 index 000000000..c6b5dcd75 --- /dev/null +++ b/tests/e2e/data/responses/vitaIntegrationTestResponses/AUTO_RSV_VITA_INT_500.json @@ -0,0 +1,23 @@ +{ + "resourceType": "OperationOutcome", + "id": "a4639b8e-4359-4f17-8016-d325846bbc2a", + "meta": { + "lastUpdated": "2025-08-01T08:16:47.379654Z" + }, + "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/tests/e2e/data/s3/patient_s3_sample.json b/tests/e2e/data/s3/patient_s3_sample.json deleted file mode 100644 index 3e7b93748..000000000 --- a/tests/e2e/data/s3/patient_s3_sample.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "PATIENT": { - "NHS_NUMBER": "9876543210", - "SCENARIO": "SCN005", - "PERSON_ATTRIBUTES": { - "DATE_OF_BIRTH": "19880615", - "GENDER": "1", - "POSTCODE": "M1 1AA", - "POSTCODE_SECTOR": "M1", - "POSTCODE_OUTCODE": "1AA", - "MSOA": "E05000003", - "LSOA": "E01000003", - "GP_PRACTICE_CODE": "C98765", - "PCN": "PCN003", - "ICB": "ICB002", - "COMMISSIONING_REGION": "RegionZ", - "13Q_FLAG": "Y", - "CARE_HOME_FLAG": "N", - "DE_FLAG": "N" - }, - "TARGET_CONDITIONS": { - "COVID": { - "VALID_DOSES_COUNT": "2", - "INVALID_DOSES_COUNT": "0", - "LAST_SUCCESSFUL_DATE": "20241201", - "LAST_VALID_DOSE_DATE": "20241201", - "BOOKED_APPOINTMENT_DATE": "20250110", - "BOOKED_APPOINTMENT_PROVIDER": "Local Clinic", - "LAST_INVITE_DATE": "20241115", - "LAST_INVITE_STATUS": "Accepted", - "OPTOUT": "N" - }, - "FLU": { - "VALID_DOSES_COUNT": "1", - "INVALID_DOSES_COUNT": "0", - "LAST_SUCCESSFUL_DATE": "20241020", - "LAST_VALID_DOSE_DATE": "20241020", - "LAST_INVITE_DATE": "20240901", - "LAST_INVITE_STATUS": "Delivered", - "OPTOUT": "N" - }, - "RSV": { - "LAST_SUCCESSFUL_DATE": "20241105", - "LAST_VALID_DOSE_DATE": "20241105", - "OPTOUT": "N" - } - }, - "COHORT_MEMBERSHIP": [ - { - "cohort_label": "Trial_Group_A", - "date_joined": "20250210" - }, - { - "cohort_label": "Manchester_Residents_2024", - "date_joined": "20240701" - } - ] - } -} diff --git a/tests/e2e/features/__init__.py b/tests/e2e/features/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/features/conftest.py b/tests/e2e/features/conftest.py deleted file mode 100644 index d309566c5..000000000 --- a/tests/e2e/features/conftest.py +++ /dev/null @@ -1,32 +0,0 @@ -import os - -import pytest -import requests -from dotenv import load_dotenv - -# Load environment variables -load_dotenv() - -# Constants -BASE_URL = os.getenv("BASE_URL", "https://sandbox.api.service.nhs.uk/eligibility-signposting-api") -API_KEY = os.getenv("API_KEY", "") -VALID_NHS_NUMBER = os.getenv("VALID_NHS_NUMBER", "50000000004") -HTTP_STATUS_SERVER_ERROR = 500 - - -@pytest.fixture(scope="session", autouse=True) -def check_api_accessibility(): - """Check if the API is accessible before running tests.""" - try: - response = requests.get( - f"{BASE_URL}/eligibility-check", - params={"patient": VALID_NHS_NUMBER}, - headers={"apikey": API_KEY, "Accept": "application/json"}, - timeout=5, - ) - # If we get a 4xx response, the API is accessible but our request is invalid - # If we get a 5xx response, the API is having issues - if response.status_code >= HTTP_STATUS_SERVER_ERROR: - pytest.skip("API is returning server errors") - except (requests.RequestException, requests.Timeout): - pytest.skip("API is not accessible") diff --git a/tests/e2e/features/eligibility_check/eligibility_check.feature b/tests/e2e/features/eligibility_check/eligibility_check.feature deleted file mode 100644 index e10353c07..000000000 --- a/tests/e2e/features/eligibility_check/eligibility_check.feature +++ /dev/null @@ -1,44 +0,0 @@ - -Feature: Eligibility Check API - As a consumer of the Eligibility Check API - I want to verify the endpoint's response for various NHS numbers and parameters - So that I can ensure the API behaves as expected for all supported scenarios - - Background: - Given the Eligibility Check API base URL is configured - - Scenario Outline: Successful eligibility check returns 2xx and valid response - Given I have the NHS number "" - When I request an eligibility check for the NHS number - Then the response status code should be 2xx - And the response content type should be application/json - And the response should have a JSON body - And the response should match the eligibility check schema - - Examples: - | nhs_number | - | 50000000001 | - | 50000000004 | - | 9876543210 | - - Scenario Outline: Eligibility check with invalid or missing NHS number returns error - Given I have the NHS number "" - When I request an eligibility check for the NHS number - Then the response status code should be 4xx or 404 - - Examples: - | nhs_number | - | 00000000000 | - | | - | patient=ABC | - - Scenario Outline: Eligibility check with custom Accept header - Given I have the NHS number "" - And I set the Accept header to "" - When I request an eligibility check for the NHS number - Then the response content type should contain "" - - Examples: - | nhs_number | accept_header | expected_content_type | - | 9876543210 | application/json | application/json | - | 9876543210 | application/json | application/json | diff --git a/tests/e2e/features/environment.py b/tests/e2e/features/environment.py deleted file mode 100644 index cfb2becac..000000000 --- a/tests/e2e/features/environment.py +++ /dev/null @@ -1,189 +0,0 @@ -import json -import logging -import os -from pathlib import Path - -import boto3 -from botocore.exceptions import BotoCoreError -from dotenv import load_dotenv - -logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s") -logger = logging.getLogger("behave.environment") - - -def _load_environment_variables(context): - load_dotenv(dotenv_path=".env") - context.base_url = os.getenv("BASE_URL") - context.api_key = os.getenv("API_KEY") - context.valid_nhs_number = os.getenv("VALID_NHS_NUMBER", "50000000004") - context.aws_region = os.getenv("AWS_REGION", "eu-west-2") - context.inserted_items = [] - context.abort_on_aws_error = os.getenv("ABORT_ON_AWS_FAILURE", "false").lower() == "true" - context.keep_seed = os.getenv("KEEP_SEED", "false").lower() == "true" - context.s3_bucket = os.getenv("S3_BUCKET_NAME") - context.s3_upload_dir = os.getenv("S3_UPLOAD_DIR", "") - context.s3_data_path = Path(os.getenv("S3_JSON_SOURCE_DIR", "./data/s3")).resolve() - context.dynamodb_table_name = os.getenv("DYNAMODB_TABLE_NAME", "eligibilty_data_store") - context.dynamo_data_path = Path(os.getenv("DYNAMO_JSON_SOURCE_DIR", "./data/out/dynamoDB")).resolve() - logger.info("ABORT_ON_AWS_FAILURE=%s", context.abort_on_aws_error) - logger.info("KEEP_SEED=%s", context.keep_seed) - - -def _connect_to_dynamodb(context): - try: - context.dynamodb = boto3.resource("dynamodb", region_name=context.aws_region) - context.table = context.dynamodb.Table(context.dynamodb_table_name) - _ = context.table.table_status - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("DynamoDB not accessible") - return False - else: - logger.info("Connected to DynamoDB table: %s", context.dynamodb_table_name) - return True - - -def _get_dynamo_seed_files(context): - if not context.dynamo_data_path.exists() or not context.dynamo_data_path.is_dir(): - logger.error("Seed directory not found: %s", context.dynamo_data_path) - return [] - return list(context.dynamo_data_path.glob("*.json")) - - -def _load_seed_file(file_path: Path): - try: - with file_path.open() as f: - return json.load(f) - except (OSError, json.JSONDecodeError): - logger.exception("Failed to load seed file: %s", file_path) - return [] - - -def _insert_dynamodb_items(context, items): - for item in items: - try: - context.table.put_item(Item=item) - context.inserted_items.append(item) - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("Failed to insert item %s", item.get("PK", "")) - - -def _setup_dynamodb(context): - if not _connect_to_dynamodb(context): - if context.abort_on_aws_error: - context.abort_all = True - return False - json_files = _get_dynamo_seed_files(context) - if not json_files: - logger.error("No JSON files found in the directory: %s", context.dynamo_data_path) - if context.abort_on_aws_error: - context.abort_all = True - return False - logger.info("Found %d JSON files to insert into DynamoDB", len(json_files)) - for file_path in json_files: - items = _load_seed_file(file_path) - if not items: - if context.abort_on_aws_error: - context.abort_all = True - continue - logger.info("Inserting %d items from %s...", len(items), file_path.name) - _insert_dynamodb_items(context, items) - logger.info("Inserted %d items from %d files", len(context.inserted_items), len(json_files)) - return True - - -def _setup_s3(context): - if not context.s3_bucket: - logger.info("Skipping S3 upload โ€” no S3_BUCKET_NAME set.") - return True - logger.info( - "Uploading JSON files from %s to S3 bucket: %s/%s", - context.s3_data_path, - context.s3_bucket, - context.s3_upload_dir, - ) - try: - s3_client = boto3.client("s3", region_name=context.aws_region) - if not context.s3_data_path.exists(): - logger.error("S3 source directory not found: %s", context.s3_data_path) - return False - json_files = list(context.s3_data_path.glob("*.json")) - upload_success = True - for file_path in json_files: - key = f"{context.s3_upload_dir}/{file_path.name}" if context.s3_upload_dir else file_path.name - try: - s3_client.upload_file(str(file_path), context.s3_bucket, key) - logger.info("Uploaded %s to s3://%s/%s", file_path.name, context.s3_bucket, key) - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("Failed to upload %s", file_path.name) - upload_success = False - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("S3 upload setup failed") - if context.abort_on_aws_error: - context.abort_all = True - return False - else: - return upload_success - - -def before_all(context): - logger.info("Loading .env and initializing AWS fixtures...") - _load_environment_variables(context) - _setup_dynamodb(context) - _setup_s3(context) - - -def before_scenario(context, scenario): - if getattr(context, "abort_all", False): - scenario.skip("Skipping scenario due to setup failure") - if "requires_dynamodb" in scenario.tags and not context.inserted_items: - scenario.skip("Skipping due to missing seeded DynamoDB data") - - -def _cleanup_dynamodb(context): - if not context.inserted_items: - logger.info("No items were inserted โ€” skipping DynamoDB cleanup.") - return - logger.info("Cleaning up seeded items from DynamoDB...") - delete_count = 0 - for item in context.inserted_items: - nhs_number = item.get("NHS_NUMBER") - attribute_type = item.get("ATTRIBUTE_TYPE") - if nhs_number and attribute_type: - try: - context.table.delete_item(Key={"NHS_NUMBER": nhs_number, "ATTRIBUTE_TYPE": attribute_type}) - delete_count += 1 - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("Failed to delete item (%s, %s)", nhs_number, attribute_type) - else: - logger.error("Cannot delete item โ€” missing NHS_NUMBER or ATTRIBUTE_TYPE: %s", item) - logger.info("Deleted %d/%d DynamoDB items", delete_count, len(context.inserted_items)) - - -def _cleanup_s3(context): - if not (context.s3_bucket and context.s3_data_path.exists()): - logger.info("Skipping S3 cleanup โ€” no bucket or source directory not found.") - return - logger.info("Cleaning up uploaded files from S3...") - try: - s3_client = boto3.client("s3", region_name=context.aws_region) - json_files = list(context.s3_data_path.glob("*.json")) - deleted_files = 0 - for file_path in json_files: - key = f"{context.s3_upload_dir}/{file_path.name}" if context.s3_upload_dir else file_path.name - try: - s3_client.delete_object(Bucket=context.s3_bucket, Key=key) - logger.info("Deleted s3://%s/%s", context.s3_bucket, key) - deleted_files += 1 - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("Failed to delete s3://%s/%s", context.s3_bucket, key) - logger.info("Deleted %d/%d files from S3", deleted_files, len(json_files)) - except (boto3.exceptions.Boto3Error, BotoCoreError): - logger.exception("S3 cleanup failed") - - -def after_all(context): - if getattr(context, "keep_seed", False): - logger.info("KEEP_SEED=true โ€” skipping cleanup.") - return - _cleanup_dynamodb(context) - _cleanup_s3(context) diff --git a/tests/e2e/features/steps/eligibility_check_steps.py b/tests/e2e/features/steps/eligibility_check_steps.py deleted file mode 100644 index 3a0640dab..000000000 --- a/tests/e2e/features/steps/eligibility_check_steps.py +++ /dev/null @@ -1,85 +0,0 @@ -import jsonschema -import pytest -import requests -from behave import given, then, when -from utils.config import API_KEY, BASE_URL, ELIGIBILITY_CHECK_SCHEMA - -# HTTP Status Code Constants -HTTP_STATUS_OK = 200 -HTTP_STATUS_BAD_REQUEST = 400 -HTTP_STATUS_NOT_FOUND = 404 -HTTP_STATUS_SERVER_ERROR = 500 - - -@given("the Eligibility Check API base URL is configured") -def step_impl_base_url(context): - context.base_url = BASE_URL - context.headers = {"apikey": API_KEY} - - -@given('I have the NHS number "{nhs_number}"') -def step_impl_nhs_number(context, nhs_number): - context.nhs_number = nhs_number - - -@given('I have the NHS number ""') -def step_impl_empty_nhs_number(context): - context.nhs_number = "" - - -@given('I set the Accept header to "{accept_header}"') -def step_impl_accept_header(context, accept_header): - context.headers["Accept"] = accept_header - - -@when("I request an eligibility check for the NHS number") -def step_impl_request_eligibility_check(context): - # Use the correct endpoint: /patient-check/{nhs_number} - if context.nhs_number: - url = f"{context.base_url}/patient-check/{context.nhs_number}" - else: - url = f"{context.base_url}/patient-check/" - context.response = requests.get(url, headers=context.headers, timeout=10) - - -@then("the response status code should be 2xx") -def step_impl_status_code_2xx(context): - assert HTTP_STATUS_OK <= context.response.status_code < HTTP_STATUS_BAD_REQUEST, ( - f"Expected 2xx, got {context.response.status_code}" - ) - - -@then("the response status code should be 4xx or 404") -def step_impl_status_code_4xx_or_404(context): - assert ( - HTTP_STATUS_BAD_REQUEST <= context.response.status_code < HTTP_STATUS_SERVER_ERROR - ) or context.response.status_code == HTTP_STATUS_NOT_FOUND, ( - f"Expected 4xx or 404, got {context.response.status_code}" - ) - - -@then("the response content type should be application/json") -def step_impl_content_type_json(context): - assert "application/json" in context.response.headers.get("Content-Type", ""), ( - f"Content-Type is not application/json, got {context.response.headers.get('Content-Type', '')}" - ) - - -@then("the response should have a JSON body") -def step_impl_has_json_body(context): - try: - context.response.json() - except (ValueError, TypeError) as e: - pytest.fail(f"Response does not have a JSON body: {e}") - - -@then("the response should match the eligibility check schema") -def step_impl_schema(context): - jsonschema.validate(instance=context.response.json(), schema=ELIGIBILITY_CHECK_SCHEMA) - - -@then('the response content type should contain "{expected_content_type}"') -def step_impl_content_type_contains(context, expected_content_type): - assert expected_content_type in context.response.headers.get("Content-Type", ""), ( - f"Content-Type does not contain {expected_content_type}, got {context.response.headers.get('Content-Type', '')}" - ) diff --git a/tests/e2e/tests/conftest.py b/tests/e2e/tests/conftest.py index f220cb1db..7be5cad4e 100644 --- a/tests/e2e/tests/conftest.py +++ b/tests/e2e/tests/conftest.py @@ -1,19 +1,19 @@ -import json import logging import os from pathlib import Path -import boto3 import pytest from dotenv import load_dotenv +from tests.e2e.utils.eligibility_api_client import EligibilityApiClient +from tests.e2e.utils.s3_config_manager import upload_configs_to_s3 + # Load environment variables from .env.local -load_dotenv(dotenv_path=".env.local") +load_dotenv(dotenv_path=".env") # Constants -BASE_URL = os.getenv("BASE_URL", "https://sandbox.api.service.nhs.uk/eligibility-signposting-api") +BASE_URL = os.getenv("BASE_URL", "https://test.eligibility-signposting-api.nhs.uk/patient-check") API_KEY = os.getenv("API_KEY", "") -VALID_NHS_NUMBER = os.getenv("VALID_NHS_NUMBER", "50000000004") DYNAMODB_TABLE_NAME = os.getenv("DYNAMODB_TABLE_NAME", "eligibility_data_store") AWS_REGION = os.getenv("AWS_REGION", "eu-west-2") @@ -24,57 +24,24 @@ logger = logging.getLogger(__name__) -def pytest_addoption(parser): - parser.addoption("--keep-seed", action="store_true", default=False, help="Keep DynamoDB seed data after tests") - - -@pytest.fixture(scope="session", autouse=True) -def setup_dynamodb_data(request): - """Insert test data into DynamoDB before tests and optionally clean up after.""" - logger.info("[โš™] Connecting to DynamoDB table: %s in region %s", DYNAMODB_TABLE_NAME, AWS_REGION) - logger.info("[TEST] DynamoDB fixture executing โ€” REGION: %s, TABLE: %s", AWS_REGION, DYNAMODB_TABLE_NAME) - logger.info("[TEST] Seed file path: %s โ†’ Exists: %s", DYNAMO_DATA_PATH, DYNAMO_DATA_PATH.exists()) - import botocore.exceptions - - try: - dynamodb = boto3.resource("dynamodb", region_name=AWS_REGION) - table = dynamodb.Table(DYNAMODB_TABLE_NAME) - _ = table.table_status # Force connection check - except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError) as e: - pytest.skip(f"[x] DynamoDB not accessible: {e}") - - if not DYNAMO_DATA_PATH.exists(): - pytest.skip(f"[x] Test data file not found: {DYNAMO_DATA_PATH}") - else: - logger.info("[โœ“] Found test data file: %s", DYNAMO_DATA_PATH) +@pytest.fixture(scope="session") +def eligibility_client(): + return EligibilityApiClient(BASE_URL, cert_dir="certs") - with DYNAMO_DATA_PATH.open() as f: - items = json.load(f) - logger.info("[โ†’] Inserting %d items into DynamoDB...", len(items)) - success_count = 0 - for item in items: - try: - table.put_item(Item=item) - success_count += 1 - except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError): - logger.exception("[x] Failed to insert item %s due to BotoCoreError", item.get("PK", "")) +@pytest.fixture +def get_scenario_params(request): + _ = request - logger.info("[โœ“] Inserted %d/%d items", success_count, len(items)) + def _setup(scenario, config_path): + nhs_number = scenario["nhs_number"] + config_filenames = scenario.get("config_filenames", []) + request_headers = scenario.get("request_headers", {}) + query_params = scenario.get("query_params", {}) + expected_response_code = scenario["expected_response_code"] - yield + upload_configs_to_s3(config_filenames, config_path) - # Handle tear-down based on --keep-seed flag - if request.config.getoption("--keep-seed"): - logger.info("[โ†ฉ] Skipping DynamoDB cleanup due to --keep-seed flag") - return + return nhs_number, config_filenames, request_headers, query_params, expected_response_code - logger.info("[๐Ÿงน] Deleting seeded items from DynamoDB...") - delete_count = 0 - for item in items: - try: - table.delete_item(Key={"PK": item["PK"], "SK": item["SK"]}) - delete_count += 1 - except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError): - logger.exception("[x] Failed to delete item %s", item.get("PK", "")) - logger.info("[โœ“] Deleted %d/%d items", delete_count, len(items)) + return _setup diff --git a/tests/e2e/tests/eligibility_signposting/__init__.py b/tests/e2e/tests/eligibility_signposting/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/tests/eligibility_signposting/conftest.py b/tests/e2e/tests/eligibility_signposting/conftest.py deleted file mode 100644 index c10b433d8..000000000 --- a/tests/e2e/tests/eligibility_signposting/conftest.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Pytest fixtures for the Eligibility Signposting API tests.""" - -import pytest -from utils.api_client import ApiClient -from utils.config import INVALID_NHS_NUMBER, VALID_NHS_NUMBER - - -@pytest.fixture -def api_client(): - """Create and return an instance of the API client. - - Returns: - ApiClient: Instance of the API client. - """ - return ApiClient() - - -@pytest.fixture -def valid_nhs_number(): - """Return a valid NHS number for testing. - - Returns: - str: Valid NHS number. - """ - return VALID_NHS_NUMBER - - -@pytest.fixture -def invalid_nhs_number(): - """Return an invalid NHS number for testing. - - Returns: - str: Invalid NHS number. - """ - return INVALID_NHS_NUMBER diff --git a/tests/e2e/tests/eligibility_signposting/test_eligibility_check.py b/tests/e2e/tests/eligibility_signposting/test_eligibility_check.py deleted file mode 100644 index 817648eb9..000000000 --- a/tests/e2e/tests/eligibility_signposting/test_eligibility_check.py +++ /dev/null @@ -1,165 +0,0 @@ -"""Tests for the Eligibility Check endpoint.""" - -import jsonschema -import pytest -import requests -from utils.config import BASE_URL, ELIGIBILITY_CHECK_SCHEMA - -# HTTP Status Code Constants -HTTP_STATUS_OK = 200 -HTTP_STATUS_BAD_REQUEST = 400 -HTTP_STATUS_NOT_FOUND = 404 -HTTP_STATUS_SERVER_ERROR = 500 - - -# Check if the API is accessible -def is_api_accessible(): - """Check if the API is accessible. - - Returns: - bool: True if the API is accessible, False otherwise. - """ - try: - response = requests.get(f"{BASE_URL}/eligibility-check", timeout=5) - except requests.RequestException: - return False - else: - return response.status_code != HTTP_STATUS_NOT_FOUND - - -@pytest.mark.eligibility_response -class TestEligibilityCheck: - """Test suite for the Eligibility Check endpoint.""" - - @pytest.mark.smoke - def test_eligibility_check_success(self, api_client, valid_nhs_number): - """Test that the eligibility check endpoint returns a successful response. - - Args: - api_client: API client fixture. - valid_nhs_number: Valid NHS number fixture. - """ - # Make the API call - response = api_client.get_eligibility_check(valid_nhs_number) - - # Assert status code is 2xx - error_msg = f"Expected 2xx status code, got {response.status_code}" - assert HTTP_STATUS_OK <= response.status_code < HTTP_STATUS_BAD_REQUEST, error_msg - - # Assert content type is application/json - assert "application/json" in response.headers.get("Content-Type", ""), "Content-Type is not application/json" - - # Assert response has JSON body - response_json = response.json() - assert response_json, "Response does not have a JSON body" - - # Validate response against schema - try: - jsonschema.validate(instance=response_json, schema=ELIGIBILITY_CHECK_SCHEMA) - except jsonschema.exceptions.ValidationError as e: - pytest.fail(f"Response does not match schema: {e}") - - @pytest.mark.smoke - def test_eligibility_check_response_structure(self, api_client, valid_nhs_number): - """Test that the eligibility check response has the expected structure. - - Args: - api_client: API client fixture. - valid_nhs_number: Valid NHS number fixture. - """ - # Make the API call - response = api_client.get_eligibility_check(valid_nhs_number) - - # Assert status code is 2xx - error_msg = f"Expected 2xx status code, got {response.status_code}" - assert HTTP_STATUS_OK <= response.status_code < HTTP_STATUS_BAD_REQUEST, error_msg - - # Get response JSON - response_json = response.json() - - # Check for required fields - assert "responseId" in response_json, "Response does not contain responseId" - assert "meta" in response_json, "Response does not contain meta" - assert "processedSuggestions" in response_json, "Response does not contain processedSuggestions" - - # Check meta structure - assert "lastUpdated" in response_json["meta"], "Meta does not contain lastUpdated" - - # Check processedSuggestions structure if any exist - if response_json["processedSuggestions"]: - suggestion = response_json["processedSuggestions"][0] - assert "condition" in suggestion, "Suggestion does not contain condition" - assert "status" in suggestion, "Suggestion does not contain status" - assert suggestion["status"] in ["NotEligible", "NotActionable", "Actionable"], "Invalid status value" - - def test_eligibility_check_invalid_nhs_number(self, api_client, invalid_nhs_number): - """Test the behavior when an invalid NHS number is provided. - - Args: - api_client: API client fixture. - invalid_nhs_number: Invalid NHS number fixture. - """ - # Make the API call - response = api_client.get_eligibility_check(invalid_nhs_number) - - # Check the response - this could be a 4xx error or a specific response format - # depending on how the API handles invalid NHS numbers - if HTTP_STATUS_BAD_REQUEST <= response.status_code < HTTP_STATUS_SERVER_ERROR: - # If API returns an error code for invalid NHS numbers - assert True, "API correctly returned an error for invalid NHS number" - else: - # If API returns a success code but with specific content - response_json = response.json() - # Check if the response indicates no eligibility or an error message - # This will depend on the specific API behavior - assert response_json, "Response should contain data even for invalid NHS number" - - @pytest.mark.parametrize( - "query_param", - [ - "", # Missing NHS number - "patient=", # Empty NHS number - ], - ) - def test_eligibility_check_empty_parameters(self, api_client, query_param): - """Test the behavior when empty parameters are provided. - - Args: - api_client: API client fixture. - query_param: Query parameter to test. - """ - # Construct the endpoint with the query parameter - endpoint = f"/eligibility-check?{query_param}" if query_param else "/eligibility-check" - - # Make the API call - response = api_client.get(endpoint) - - # Check the response - expecting a 4xx error for invalid parameters - error_msg = f"Expected 4xx status code, got {response.status_code}" - assert HTTP_STATUS_BAD_REQUEST <= response.status_code < HTTP_STATUS_SERVER_ERROR, error_msg - - @pytest.mark.parametrize( - "query_param", - [ - "patient=ABC", # Non-numeric NHS number - ], - ) - def test_eligibility_check_invalid_parameters(self, api_client, query_param): - """Test the behavior when invalid parameters are provided. - - Args: - api_client: API client fixture. - query_param: Query parameter to test. - """ - # Construct the endpoint with the query parameter - endpoint = f"/eligibility-check?{query_param}" if query_param else "/eligibility-check" - - # Make the API call - response = api_client.get(endpoint) - - # We're now expecting a 2xx response even with invalid parameters - # The API handles invalid parameters gracefully - - # Assert status code is 2xx - error_msg = f"Expected 2xx status code, got {response.status_code}" - assert HTTP_STATUS_OK <= response.status_code < HTTP_STATUS_BAD_REQUEST, error_msg diff --git a/tests/e2e/tests/eligibility_signposting/test_eligibility_check_bdd.py b/tests/e2e/tests/eligibility_signposting/test_eligibility_check_bdd.py deleted file mode 100644 index ceb94642a..000000000 --- a/tests/e2e/tests/eligibility_signposting/test_eligibility_check_bdd.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -from pathlib import Path - -import pytest -from behave import scenarios - -# Add the features directory to the Python path -sys.path.append(str(Path(__file__).parent.parent.parent)) - -# Mark all tests as BDD tests -pytestmark = [pytest.mark.bdd, pytest.mark.eligibility_response] - -# Load the scenarios from the feature file -scenarios("../../features/eligibility_check/eligibility_check.feature") diff --git a/tests/e2e/tests/test_config.py b/tests/e2e/tests/test_config.py new file mode 100644 index 000000000..16f2035f3 --- /dev/null +++ b/tests/e2e/tests/test_config.py @@ -0,0 +1,22 @@ +# Smoke Test Data Paths +SMOKE_TEST_DATA: str = "data/dynamoDB/smokeTestData/" +SMOKE_TEST_RESPONSES: str = "data/responses/smokeTestResponses/" +SMOKE_TEST_CONFIGS: str = "data/configs/smokeTestConfigs" +# Story Test Data Paths +STORY_TEST_DATA: str = "data/dynamoDB/storyTestData/" +STORY_TEST_RESPONSES: str = "data/responses/storyTestResponses/" +STORY_TEST_CONFIGS: str = "data/configs/storyTestConfigs" +# Story Test Data Paths +REGRESSION_TEST_DATA: str = "data/dynamoDB/regressionTestData/" +REGRESSION_RESPONSES: str = "data/responses/regressionTestResponses/" +REGRESSION_CONFIGS: str = "data/configs/regressionTestConfigs" + +# In Progress Test Data Paths +IN_PROGRESS_TEST_DATA: str = "data/dynamoDB/inProgressTestData/" +IN_PROGRESS_RESPONSES: str = "data/responses/inProgressTestResponses/" +IN_PROGRESS_CONFIGS: str = "data/configs/inProgressTestConfigs" + +# Vita Integration Test Data Paths +VITA_INTEGRATION_TEST_DATA: str = "data/dynamoDB/vitaIntegrationTestData/" +VITA_INTEGRATION_RESPONSES: str = "data/responses/vitaIntegrationTestResponses/" +VITA_INTEGRATION_CONFIGS: str = "data/configs/vitaIntegrationTestConfigs" diff --git a/tests/e2e/tests/test_error_scenario_tests.py b/tests/e2e/tests/test_error_scenario_tests.py new file mode 100644 index 000000000..aade6374d --- /dev/null +++ b/tests/e2e/tests/test_error_scenario_tests.py @@ -0,0 +1,263 @@ +import http + +import pytest + +from tests.e2e.utils.s3_config_manager import delete_all_configs_from_s3 + + +@pytest.mark.errorscenarios +@pytest.mark.smoketest +def test_check_for_missing_person(eligibility_client): + nhs_number = "9934567890" + + request_headers = {"nhs-login-nhs-number": "9934567890"} + + expected_body = { + "resourceType": "OperationOutcome", + "id": "", + "meta": {"lastUpdated": ""}, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. " + "This could be because the number is incorrect or some other reason " + "we cannot process that number.", + } + ] + }, + "diagnostics": "NHS Number '9934567890' was not recognised by the Eligibility Signposting API", + "location": ["parameters/id"], + } + ], + } + + response = eligibility_client.make_request(nhs_number, headers=request_headers, raise_on_error=False) + + assert response["status_code"] == http.HTTPStatus.NOT_FOUND + assert response["body"] == expected_body + assert response["headers"].get("Content-Type".lower()) == "application/fhir+json" + + +@pytest.mark.errorscenarios +@pytest.mark.parametrize( + "test_case", + [ + { + "scenario": "correct header - NHS number exists but not found in data", + "nhs_number": "9934567890", + "request_headers": {"nhs-login-nhs-number": "9934567890"}, + "expected_status": http.HTTPStatus.NOT_FOUND, + "expected_body": { + "resourceType": "OperationOutcome", + "id": "", + "meta": {"lastUpdated": ""}, + "issue": [ + { + "severity": "error", + "code": "processing", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "REFERENCE_NOT_FOUND", + "display": "The given NHS number was not found in our datasets. " + "This could be because the number is incorrect or some other reason we " + "cannot process that number.", + } + ] + }, + "diagnostics": "NHS Number '9934567890' was not recognised by the Eligibility Signposting API", + "location": ["parameters/id"], + } + ], + }, + }, + { + "scenario": "incorrect header - NHS number mismatch", + "nhs_number": "9934567890", + "request_headers": {"nhs-login-nhs-number": "99345678900"}, + "expected_status": http.HTTPStatus.FORBIDDEN, + "expected_body": { + "resourceType": "OperationOutcome", + "id": "", + "meta": {"lastUpdated": ""}, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INVALID_NHS_NUMBER", + "display": "The provided NHS number does not match the record.", + } + ] + }, + "diagnostics": "NHS Number 9934567890 does not match the header NHS Number 99345678900", + "location": ["parameters/id"], + } + ], + }, + }, + { + "scenario": "missing header - NHS number required", + "nhs_number": "1234567890", + "request_headers": {}, + "expected_status": http.HTTPStatus.FORBIDDEN, + "expected_body": { + "resourceType": "OperationOutcome", + "id": "", + "meta": {"lastUpdated": ""}, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + "code": "INVALID_NHS_NUMBER", + "display": "The provided NHS number does not match the record.", + } + ] + }, + "diagnostics": "NHS Number 1234567890 does not match the header NHS Number ", + "location": ["parameters/id"], + } + ], + }, + }, + ], + ids=["correct-header", "incorrect-header", "missing-header"], +) +def test_nhs_login_header_handling(eligibility_client, test_case): + response = eligibility_client.make_request( + test_case["nhs_number"], + headers=test_case["request_headers"], + raise_on_error=False, + ) + + assert response["status_code"] == test_case["expected_status"], f"{test_case['scenario']} failed on status code" + assert response["body"] == test_case["expected_body"], f"{test_case['scenario']} failed on response body" + assert response["headers"].get("Content-Type".lower()) == "application/fhir+json" + + +@pytest.mark.errorscenarios +@pytest.mark.parametrize( + "test_case", + [ + { + "scenario": "invalid conditions - use special character in conditions", + "nhs_number": "9990032010", + "request_headers": {"nhs-login-nhs-number": "9990032010"}, + "query_params": {"conditions": "covid-rsv"}, + "expected_status": http.HTTPStatus.BAD_REQUEST, + "expected_body": { + "id": "", + "issue": [ + { + "code": "value", + "details": { + "coding": [ + { + "code": "INVALID_PARAMETER", + "display": "The given conditions were not in the expected format.", + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + } + ] + }, + "diagnostics": "covid-rsv should be a single or comma separated list of condition strings " + "with no other punctuation or special characters", + "location": ["parameters/conditions"], + "severity": "error", + } + ], + "meta": {"lastUpdated": ""}, + "resourceType": "OperationOutcome", + }, + }, + { + "scenario": "unknown-category - misspelt category", + "nhs_number": "9990032010", + "request_headers": {"nhs-login-nhs-number": "9990032010"}, + "query_params": {"category": "VACCINATIONSS"}, + "expected_status": http.HTTPStatus.UNPROCESSABLE_ENTITY, + "expected_body": { + "id": "", + "issue": [ + { + "code": "value", + "details": { + "coding": [ + { + "code": "INVALID_PARAMETER", + "display": "The supplied category was not recognised by the API.", + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + } + ] + }, + "diagnostics": "VACCINATIONSS is not a category that is supported by the API", + "location": ["parameters/category"], + "severity": "error", + } + ], + "meta": {"lastUpdated": ""}, + "resourceType": "OperationOutcome", + }, + }, + ], + ids=["invalid-conditions", "unknown-category"], +) +def test_query_param_errors(eligibility_client, test_case): + response = eligibility_client.make_request( + test_case["nhs_number"], + headers=test_case["request_headers"], + query_params=test_case["query_params"], + raise_on_error=False, + ) + + assert response["status_code"] == test_case["expected_status"], f"{test_case['scenario']} failed on status code" + assert response["body"] == test_case["expected_body"], f"{test_case['scenario']} failed on response body" + assert response["headers"].get("Content-Type".lower()) == "application/fhir+json" + + +@pytest.mark.errorscenarios +def test_no_config_error(eligibility_client): + expected_response = { + "id": "", + "issue": [ + { + "code": "processing", + "details": { + "coding": [ + { + "code": "INTERNAL_SERVER_ERROR", + "display": "An unexpected internal server error occurred.", + "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", + } + ] + }, + "diagnostics": "An unexpected error occurred.", + "severity": "error", + } + ], + "meta": {"lastUpdated": ""}, + "resourceType": "OperationOutcome", + } + + delete_all_configs_from_s3() + + response = eligibility_client.make_request( + nhs_number="9990032010", headers={"nhs-login-nhs-number": "9990032010"}, raise_on_error=False + ) + + assert response["status_code"] == http.HTTPStatus.INTERNAL_SERVER_ERROR + assert response["body"] == expected_response + assert response["headers"].get("Content-Type".lower()) == "application/fhir+json" diff --git a/tests/e2e/tests/test_in_progress.py b/tests/e2e/tests/test_in_progress.py new file mode 100644 index 000000000..f3a6a5917 --- /dev/null +++ b/tests/e2e/tests/test_in_progress.py @@ -0,0 +1,36 @@ +import http + +import pytest + +from tests.e2e.tests import test_config +from tests.e2e.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.IN_PROGRESS_TEST_DATA) +all_expected_responses = load_all_expected_responses(test_config.IN_PROGRESS_RESPONSES) +config_path = test_config.IN_PROGRESS_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.parametrize(("filename", "scenario"), param_list, ids=id_list) +def test_run_in_progress_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, 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/tests/e2e/tests/test_regression_tests.py b/tests/e2e/tests/test_regression_tests.py new file mode 100644 index 000000000..e9a0ba88c --- /dev/null +++ b/tests/e2e/tests/test_regression_tests.py @@ -0,0 +1,35 @@ +import http + +import pytest + +from tests.e2e.tests import test_config +from tests.e2e.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/e2e/tests/test_smoke_tests.py b/tests/e2e/tests/test_smoke_tests.py new file mode 100644 index 000000000..278fd8b52 --- /dev/null +++ b/tests/e2e/tests/test_smoke_tests.py @@ -0,0 +1,37 @@ +import http + +import pytest + +from tests.e2e.tests import test_config +from tests.e2e.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/tests/e2e/tests/test_story_tests.py b/tests/e2e/tests/test_story_tests.py new file mode 100644 index 000000000..3f729365e --- /dev/null +++ b/tests/e2e/tests/test_story_tests.py @@ -0,0 +1,36 @@ +import http + +import pytest + +from tests.e2e.tests import test_config +from tests.e2e.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.STORY_TEST_DATA) +all_expected_responses = load_all_expected_responses(test_config.STORY_TEST_RESPONSES) +config_path = test_config.STORY_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.storyregressiontests +@pytest.mark.parametrize(("filename", "scenario"), param_list, ids=id_list) +def test_run_story_test_cases(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=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/tests/e2e/tests/test_vita_integration_tests.py b/tests/e2e/tests/test_vita_integration_tests.py new file mode 100644 index 000000000..822e23764 --- /dev/null +++ b/tests/e2e/tests/test_vita_integration_tests.py @@ -0,0 +1,37 @@ +import http + +import pytest + +from tests.e2e.tests import test_config +from tests.e2e.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.VITA_INTEGRATION_TEST_DATA) +all_expected_responses = load_all_expected_responses(test_config.VITA_INTEGRATION_RESPONSES) +config_path = test_config.VITA_INTEGRATION_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.vitaintegration +@pytest.mark.parametrize(("filename", "scenario"), param_list, ids=id_list) +def test_run_story_test_cases(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=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/tests/e2e/utils/api_client.py b/tests/e2e/utils/api_client.py deleted file mode 100644 index 53c706168..000000000 --- a/tests/e2e/utils/api_client.py +++ /dev/null @@ -1,63 +0,0 @@ -"""API client module for making HTTP requests to the Eligibility Signposting API.""" - -import requests -from utils.config import API_KEY, BASE_URL - -# Default timeout for API requests in seconds -DEFAULT_TIMEOUT = 10 - - -class ApiClient: - """API client for making HTTP requests to the Eligibility Signposting API.""" - - def __init__(self, base_url=BASE_URL, api_key=API_KEY): - """Initialize the API client with base URL and API key. - - Args: - base_url (str, optional): Base URL for the API. Defaults to BASE_URL from config. - api_key (str, optional): API key for authentication. Defaults to API_KEY from config. - """ - self.base_url = base_url - self.api_key = api_key - self.headers = {"Accept": "application/json", "apikey": self.api_key} - - def get_eligibility_check(self, nhs_number): - """Make a GET request to the eligibility-check endpoint. - - Args: - nhs_number (str): NHS number to check eligibility for. - - Returns: - requests.Response: Response object from the API. - """ - url = f"{BASE_URL}/patient-check/{nhs_number}" - params = {"patient": nhs_number} - - return requests.get(url, headers=self.headers, params=params, timeout=DEFAULT_TIMEOUT) - - def get(self, endpoint, params=None): - """Make a generic GET request to the API. - - Args: - endpoint (str): API endpoint to call. - params (dict, optional): Query parameters. Defaults to None. - - Returns: - requests.Response: Response object from the API. - """ - url = f"{self.base_url}{endpoint}" - return requests.get(url, headers=self.headers, params=params, timeout=DEFAULT_TIMEOUT) - - def post(self, endpoint, data=None, json=None): - """Make a generic POST request to the API. - - Args: - endpoint (str): API endpoint to call. - data (dict, optional): Form data. Defaults to None. - json (dict, optional): JSON data. Defaults to None. - - Returns: - requests.Response: Response object from the API. - """ - url = f"{self.base_url}{endpoint}" - return requests.post(url, headers=self.headers, data=data, json=json, timeout=DEFAULT_TIMEOUT) diff --git a/tests/e2e/utils/config.py b/tests/e2e/utils/config.py deleted file mode 100644 index b0666ea7e..000000000 --- a/tests/e2e/utils/config.py +++ /dev/null @@ -1,146 +0,0 @@ -"""Configuration module for the test framework.""" - -import os - -from dotenv import load_dotenv - -# Load environment variables from .env file -load_dotenv() - -# API Configuration -BASE_URL = os.getenv("BASE_URL", "https://sandbox.api.service.nhs.uk/eligibility-signposting-api") -API_KEY = os.getenv("API_KEY", "srgedsrgveg") - -# Test Data -VALID_NHS_NUMBER = os.getenv("VALID_NHS_NUMBER", "50000000004") -INVALID_NHS_NUMBER = os.getenv("INVALID_NHS_NUMBER", "9876543210") - -# API Endpoints -ELIGIBILITY_CHECK_ENDPOINT = "/eligibility-check" - -# Response Schema -ELIGIBILITY_CHECK_SCHEMA = { - "type": "object", - "properties": { - "responseId": { - "type": "string", - "description": "GUID assigned when the decisioning evaluation is carried out.", - }, - "meta": { - "type": "object", - "properties": { - "lastUpdated": { - "type": "string", - "description": "Timestamp of when the decisioning evaluation is carried out.", - } - }, - }, - "processedSuggestions": { - "type": "array", - "description": "List of suggestions the person is eligible for.", - "items": { - "type": "object", - "properties": { - "condition": { - "type": "string", - "description": ( - "String representing the vaccine target disease, screening target or other scenario " - "requiring decision based suggestions, that this suggestion relates to" - ), - }, - "status": { - "type": "string", - "description": ( - "String representing an overall summary of the persons status for this processedSuggestion" - ), - "enum": ["NotEligible", "NotActionable", "Actionable"], - }, - "statusText": {"type": "string"}, - "eligibilityCohorts": { - "type": "array", - "description": "Cohorts that drove the eligibility status returned.", - "items": { - "type": "object", - "properties": { - "cohortCode": { - "type": "string", - "description": ( - "Machine readable code signifying the cohort/cohort group that lead to a " - "person's eligibility for this suggestion" - ), - }, - "cohortText": { - "type": "string", - "description": ( - "Human readable (render-able) text describing the meaning of a cohort/" - "cohort group that lead to a person's eligibility for this suggestion" - ), - }, - "cohortStatus": { - "type": "string", - "description": ( - "String representing the persons status for this processedSuggestion " - "in respect of this particular cohort or cohort group" - ), - "enum": ["NotEligible", "NotActionable", "Actionable"], - }, - }, - }, - }, - "suitablityRules": { - "type": "array", - "description": ( - "Reasons that the eligibility status was changed from the base eligibility " - "to result in its status to not be eligible or to be acted on" - ), - "items": { - "type": "object", - "properties": { - "ruleType": { - "type": "string", - "description": ( - "The type of a rule that triggered to amend the status of the suggestion" - ), - "enum": ["F", "S"], - }, - "ruleCode": { - "type": "string", - "description": ( - "Machine readable code signifying a rule that amended the status " - "of the suggestion" - ), - }, - "ruleText": { - "type": "string", - "description": ( - "Human readable (render-able) text describing a rule that amended " - "the status of the suggestion" - ), - }, - }, - }, - }, - "actions": { - "type": "array", - "description": "List of actions to be shown to the person.", - "items": { - "type": "object", - "properties": { - "actionType": { - "type": "string", - "description": "Type of action to render. E.g. A primary button, a link, text etc", - }, - "actionCode": { - "type": "string", - "description": "Code representing the action to be taken", - }, - "description": {"type": "string", "description": "A brief description of the step."}, - "urlLink": {"type": "string", "description": "URL to invoke if action selected."}, - }, - }, - }, - }, - }, - }, - }, -} diff --git a/tests/e2e/utils/data_helper.py b/tests/e2e/utils/data_helper.py new file mode 100644 index 000000000..338d24345 --- /dev/null +++ b/tests/e2e/utils/data_helper.py @@ -0,0 +1,161 @@ +import json +from pathlib import Path + +from .dynamo_helper import insert_into_dynamo +from .placeholder_context import PlaceholderDTO, ResolvedPlaceholderContext +from .placeholder_utils import resolve_placeholders + +keys_to_ignore = ["responseId", "lastUpdated", "id"] + + +def initialise_tests(folder): + folder_path = Path(folder).resolve() + all_data, dto = load_all_test_scenarios(folder_path) + + # Insert to Dynamo (placeholder) + for scenario in all_data.values(): + insert_into_dynamo(scenario["dynamo_items"]) + + return all_data, dto + + +def resolve_placeholders_in_data(data, context, file_name): + if isinstance(data, dict): + return {k: resolve_placeholders_in_data(v, context, file_name) for k, v in data.items()} + if isinstance(data, list): + return [resolve_placeholders_in_data(item, context, file_name) for item in data] + return resolve_placeholders(data, context, file_name) + + +def load_test_scenario(file_path): + with Path.open(file_path) as f: + raw_data = json.load(f) + + file_name = Path(file_path).name + context = ResolvedPlaceholderContext() + resolved_data = resolve_placeholders_in_data(raw_data["data"], context, file_name) + + return { + "file": file_name, + "scenario_name": raw_data.get("scenario_name"), + "data": resolved_data, + "placeholders": context.all(), # Now just placeholder โ†’ value + } + + +def extract_nhs_number_from_data(data): + def find_nhs(obj): + if isinstance(obj, dict): + for k, v in obj.items(): + if k.lower().replace("_", "") == "nhsnumber": + return v + if isinstance(v, (dict, list)): + result = find_nhs(v) + if result: + return result + elif isinstance(obj, list): + for item in obj: + result = find_nhs(item) + if result: + return result + return None + + return find_nhs(data) or "UNKNOWN" + + +def load_all_expected_responses(folder_path): + all_data = {} + dto = PlaceholderDTO() # Shared across all files + + for path in Path(folder_path).iterdir(): + if path.suffix != ".json": + continue + + with path.open() as f: + raw_json = json.load(f) + + resolved_data = resolve_placeholders_in_data(raw_json, dto, path.name) + cleaned_data = clean_responses(data=resolved_data, ignore_keys=keys_to_ignore) + + all_data[path.name] = {"response_items": cleaned_data} + + return all_data + + +def load_all_test_scenarios(folder_path): + all_data = {} + dto = PlaceholderDTO() # Shared across all files + + for path in Path(folder_path).iterdir(): + if path.suffix != ".json": + continue + + with path.open() as f: + raw_json = json.load(f) + + raw_data = raw_json["data"] + + config_filenames = raw_json.get("config_filenames") + scenario_name = raw_json.get("scenario_name") + request_headers = raw_json.get("request_headers") + expected_response_code = raw_json.get("expected_response_code") + query_params = raw_json.get("query_params") + + # Resolve placeholders with shared DTO + resolved_data = resolve_placeholders_in_data(raw_data, dto, path.name) + + # Extract NHS number + nhs_number = extract_nhs_number_from_data(resolved_data) + + # Add resolved scenario + all_data[path.name] = { + "dynamo_items": resolved_data, + "nhs_number": nhs_number, + "config_filenames": config_filenames, + "expected_response_code": expected_response_code, + "request_headers": request_headers, + "query_params": query_params, + "scenario_name": scenario_name, + } + + return all_data, dto + + +def load_data_items_to_dynamo(folder_path): + dto = PlaceholderDTO() # Shared across all files + + for path in Path(folder_path).iterdir(): + if path.suffix != ".json": + continue + + with path.open() as f: + raw_json = json.load(f) + + raw_data = raw_json["data"] + + # Resolve placeholders with shared DTO + resolved_data = resolve_placeholders_in_data(raw_data, dto, path.name) + + # Insert immediately + insert_into_dynamo(resolved_data) + + +def clean_responses(data: dict, ignore_keys: list) -> dict: + return _mask_volatile_fields(data, ignore_keys) + + +def _mask_volatile_fields(data, keys_to_mask, placeholder=""): + if isinstance(data, dict): + result = {} + for key, value in data.items(): + # Always recurse first + if isinstance(value, (dict, list)): + masked_value = _mask_volatile_fields(value, keys_to_mask, placeholder) + else: + masked_value = value + # Then decide if this key should be masked + result[key] = placeholder if key in keys_to_mask else masked_value + return result + if isinstance(data, list): + return [_mask_volatile_fields(item, keys_to_mask, placeholder) for item in data] + return data diff --git a/tests/e2e/utils/dynamo_helper.py b/tests/e2e/utils/dynamo_helper.py new file mode 100644 index 000000000..142fd796f --- /dev/null +++ b/tests/e2e/utils/dynamo_helper.py @@ -0,0 +1,66 @@ +import logging +import os + +import boto3 +from botocore.exceptions import ClientError +from dotenv import load_dotenv + +# Load credentials from .env +load_dotenv() +logger = logging.getLogger(__name__) + + +class DynamoDBHelper: + def __init__(self, table_name): + # Create DynamoDB resource using credentials from env + self.dynamodb = boto3.resource("dynamodb") + self.table = self.dynamodb.Table(table_name) + + def insert_item(self, item: dict): + """ + Insert a single item into the table. + """ + try: + response = self.table.put_item(Item=item) + except ClientError as e: + logger.exception("Failed to insert item: %s", e.response["Error"]["Message"]) + raise + else: + return response + + def insert_items(self, items: list): + """ + Insert multiple items using batch_writer. + """ + try: + with self.table.batch_writer() as batch: + for item in items: + batch.put_item(Item=item) + except ClientError as e: + logger.exception("Batch insert failed: %s", e.response["Error"]["Message"]) + raise + else: + logger.info("Batch insert complete.") + + def get_item(self, key: dict): + """ + Retrieve a single item by primary key. + """ + try: + response = self.table.get_item(Key=key) + except ClientError as e: + logger.exception("Failed to get item: %s", e.response["Error"]["Message"]) + raise + else: + return response.get("Item") + + +def insert_into_dynamo(data): + logger.info("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) + except ClientError as e: + logger.exception("โŒ Failed to insert %s: %s", item, e.response["Error"]["Message"]) diff --git a/tests/e2e/utils/eligibility_api_client.py b/tests/e2e/utils/eligibility_api_client.py new file mode 100644 index 000000000..6d57dbadc --- /dev/null +++ b/tests/e2e/utils/eligibility_api_client.py @@ -0,0 +1,127 @@ +import json +import os +from pathlib import Path +from typing import Any + +import boto3 +import requests +from botocore.exceptions import ClientError +from dotenv import load_dotenv +from requests import Response + +from tests.e2e.utils.data_helper import clean_responses + +ignore_keys = ["lastUpdated", "responseId", "id"] + + +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.region: str | None = os.getenv("AWS_REGION") + self.aws_access_key_id: str | None = os.getenv("AWS_ACCESS_KEY_ID") + self.aws_secret_access_key: str | None = os.getenv("AWS_SECRET_ACCESS_KEY") + self.aws_session_token: str | None = os.getenv("AWS_SESSION_TOKEN") + + self.cert_dir: Path = Path(cert_dir) + self.cert_dir.mkdir(parents=True, exist_ok=True) + + self.cert_paths: dict[str, Path] = { + "private_key": self.cert_dir / "api_private_key_cert.pem", + "client_cert": self.cert_dir / "api_client_cert.pem", + "ca_cert": self.cert_dir / "api_ca_cert.pem", + } + + 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", + } + + self._ensure_certs_present() + + def _get_ssm_parameter(self, param_name: str, *, decrypt: bool = True) -> str: + try: + client = boto3.client( + "ssm", + region_name=self.region, + aws_access_key_id=self.aws_access_key_id, + aws_secret_access_key=self.aws_secret_access_key, + aws_session_token=self.aws_session_token, + ) + response = client.get_parameter(Name=param_name, WithDecryption=decrypt) + return response["Parameter"]["Value"] + except ClientError as e: + msg = f"Error retrieving {param_name} from SSM: {e}" + raise RuntimeError(msg) from e + + def _ensure_certs_present(self) -> None: + missing = [k for k, path in self.cert_paths.items() if not path.exists()] + if not missing: + return + + for cert_type in missing: + param_name = self.ssm_params[cert_type] + cert_value = self._get_ssm_parameter(param_name) + with Path.open(self.cert_paths[cert_type], "w", encoding="utf-8") as f: + f.write(cert_value) + + def make_request( + self, + nhs_number: str, + method: str = "GET", + payload: dict[str, Any] | list | None = None, + headers: dict[str, str] | None = None, + query_params: dict[str, Any] | None = None, + **options, + ) -> dict[str, Any]: + strict_ssl = options.get("strict_ssl", False) + raise_on_error = options.get("raise_on_error", True) + url = f"{self.api_url.rstrip('/')}/{nhs_number}" + cert = ( + str(self.cert_paths["client_cert"]), + str(self.cert_paths["private_key"]), + ) + verify: bool | str = str(self.cert_paths["ca_cert"]) if strict_ssl else False + + try: + response = requests.request( + method=method.upper(), + url=url, + cert=cert, + verify=verify, + json=payload, + headers=headers, + params=query_params, + timeout=10, + ) + + if raise_on_error: + response.raise_for_status() + + return self._parse_response(response) + + except requests.exceptions.SSLError as ssl_err: + msg = "SSL error during request: %s", ssl_err + raise RuntimeError(msg) from ssl_err + except requests.exceptions.RequestException as req_err: + response = getattr(req_err, "response", None) + if isinstance(response, Response): + return self._parse_response(response) + msg = "Request error: %s", req_err + raise RuntimeError(msg) from req_err + + def _parse_response(self, response: Response) -> dict[str, Any]: + try: + data = response.json() + cleaned = clean_responses(data=data, ignore_keys=ignore_keys) + except json.JSONDecodeError: + cleaned = response.text + + return { + "status_code": response.status_code, + "headers": dict(response.headers), + "body": cleaned, + "ok": response.ok, + } diff --git a/tests/e2e/utils/placeholder_context.py b/tests/e2e/utils/placeholder_context.py new file mode 100644 index 000000000..5d22c5534 --- /dev/null +++ b/tests/e2e/utils/placeholder_context.py @@ -0,0 +1,31 @@ +class ResolvedPlaceholderContext: + def __init__(self): + self.values = {} + + def add(self, placeholder: str, resolved_value: str): + self.values[placeholder] = resolved_value # Drop file_name key nesting + + def get(self, placeholder: str) -> str: + return self.values.get(placeholder) + + def all(self): + return self.values + + +class PlaceholderDTO: + def __init__(self): + self.placeholders = {} # key: filename, value: dict of placeholders per file + + def add(self, key: str, value: str, file_name: str): + if file_name not in self.placeholders: + self.placeholders[file_name] = {} + self.placeholders[file_name][key] = value + + def get(self, key: str, file_name: str): + return self.placeholders.get(file_name, {}).get(key) + + def get_all_for_file(self, file_name: str): + return self.placeholders.get(file_name, {}).copy() + + def all(self): + return self.placeholders.copy() diff --git a/tests/e2e/utils/placeholder_utils.py b/tests/e2e/utils/placeholder_utils.py new file mode 100644 index 000000000..98541cd92 --- /dev/null +++ b/tests/e2e/utils/placeholder_utils.py @@ -0,0 +1,79 @@ +import logging +import re +from calendar import isleap +from datetime import UTC, datetime, timedelta + +from dateutil.relativedelta import relativedelta + +logger = logging.getLogger(__name__) + + +def resolve_placeholders(value, context=None, file_name=None): + if not isinstance(value, str): + return value + + match = re.search(r"<<(.*?)>>", value) + if not match: + return value + + placeholder = match.group(1) + + 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 + + +def _resolve_placeholder_value(placeholder: str) -> str: + placeholder_parts_length = 3 + # RDATE + valid_placeholder_types = ["DATE", "RDATE", "IGNORE"] + result = f"<<{placeholder}>>" # Default fallback + + if placeholder in ["IGNORE_RESPONSE_ID", "IGNORE_DATE"]: + return placeholder + + parts = placeholder.split("_") + if len(parts) != placeholder_parts_length or parts[0] not in valid_placeholder_types: + return result + + today = datetime.now(UTC) + date_type, arg = parts[1], parts[2] + + try: + if date_type == "AGE": + result = _resolve_age_placeholder(today, int(arg), parts[0]) + elif date_type == "DAY": + result = _format_date(today + timedelta(days=int(arg)), parts[0]) + elif date_type == "WEEK": + result = _format_date(today + timedelta(weeks=int(arg)), parts[0]) + elif date_type == "MONTH": + result = _format_date(today + relativedelta(months=int(arg)), parts[0]) + elif date_type == "YEAR": + result = _format_date(today + relativedelta(years=int(arg)), parts[0]) + except Exception: + logger.exception("Failed to resolve placeholder: %s", placeholder) + raise + return result + + +def _resolve_age_placeholder(today: datetime, years_back: int, format_type: str) -> str: + target_year = today.year - years_back + february = 2 + leap_year_day = 29 + try: + result_date = today.replace(year=target_year) + except ValueError: + if today.month == february and today.day == leap_year_day and not isleap(target_year): + result_date = datetime(target_year, 2, 28, tzinfo=UTC) + else: + raise + return _format_date(result_date, format_type) + + +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") diff --git a/tests/e2e/utils/s3_config_manager.py b/tests/e2e/utils/s3_config_manager.py new file mode 100644 index 000000000..e7bd6994e --- /dev/null +++ b/tests/e2e/utils/s3_config_manager.py @@ -0,0 +1,160 @@ +import hashlib +import json +import logging +import os +from pathlib import Path + +import boto3 +import botocore +from dotenv import load_dotenv + +from tests.e2e.utils.data_helper import resolve_placeholders_in_data +from tests.e2e.utils.placeholder_context import PlaceholderDTO + +load_dotenv(dotenv_path=".env") +logger = logging.getLogger(__name__) + + +class S3ConfigManager: + def __init__(self, bucket_name: str, s3_prefix: str = "") -> None: + self.bucket_name: str = bucket_name + self.s3_prefix: str = s3_prefix + self.s3_client = boto3.client("s3") + + def _s3_key(self, filename: str) -> str: + return str(Path(self.s3_prefix) / filename) + + def _calculate_file_hash(self, file_path: Path) -> str: + """Return SHA256 hash of the given file.""" + sha256 = hashlib.sha256() + with file_path.open("rb") as file: + for chunk in iter(lambda: file.read(4096), b""): + sha256.update(chunk) + return sha256.hexdigest() + + def upload_if_missing_or_changed(self, local_path: Path) -> None: + filename = Path(local_path).name + s3_key = self._s3_key(filename) + + try: + if self.config_exists_and_matches(local_path, s3_key): + logger.info("\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() + except self.s3_client.exceptions.NoSuchKey: + logger.info("\n๐Ÿ†• No config found under '%s/'. Proceeding to upload.", self.s3_prefix) + 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) + else: + raise + + logger.info("โฌ†๏ธ 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) + + 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) + + try: + s3_obj = self.s3_client.get_object(Bucket=self.bucket_name, Key=s3_key) + s3_data = s3_obj["Body"].read() + s3_hash = hashlib.sha256(s3_data).hexdigest() + local_hash = self._calculate_file_hash(local_path) + except self.s3_client.exceptions.NoSuchKey: + return False + except botocore.exceptions.ClientError as error: + if error.response.get("Error", {}).get("Code") == "NoSuchKey": + return False + raise + 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) + + 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) + else: + logger.info("๐Ÿ“ญ Nothing to delete under prefix '%s/'.", self.s3_prefix) + + def upload_all_configs(self, local_paths: list[Path]) -> None: + desired_filenames = [p.name for p in local_paths] + desired_keys = {self._s3_key(name) for name in desired_filenames} + + existing_keys = self._list_existing_keys() + keys_to_delete = [key for key in existing_keys if key not in desired_keys] + if keys_to_delete: + self._delete_keys(keys_to_delete) + + dto = PlaceholderDTO() + + for path in local_paths: + filename = path.name + s3_key = self._s3_key(filename) + + logger.info("๐Ÿ”ง Resolving placeholders in config: %s", filename) + + with path.open() as f: + raw_data = json.load(f) + + resolved = resolve_placeholders_in_data(raw_data, dto, filename) + resolved_json_str = json.dumps(resolved, indent=2) + + if self.config_exists_and_matches_str(resolved_json_str, s3_key): + logger.info("โœ… Config '%s' is unchanged in S3. Skipping upload.", filename) + else: + logger.info("โฌ†๏ธ 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) + + def config_exists_and_matches_str(self, local_json_str: str, s3_key: str) -> bool: + try: + response = self.s3_client.get_object(Bucket=self.bucket_name, Key=s3_key) + remote_str = response["Body"].read().decode("utf-8") + return local_json_str.strip() == remote_str.strip() + except self.s3_client.exceptions.NoSuchKey: + 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) + return [obj["Key"] for obj in response.get("Contents", [])] + + def _delete_keys(self, keys: list[str]) -> None: + """Delete specific keys from the S3 bucket.""" + self.s3_client.delete_objects( + Bucket=self.bucket_name, + Delete={"Objects": [{"Key": key} for key in keys]}, + ) + logger.info("๐Ÿ—‘๏ธ 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.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.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()