diff --git a/.gitignore b/.gitignore index 67c889c5..3b143737 100644 --- a/.gitignore +++ b/.gitignore @@ -256,4 +256,3 @@ vscode node_modules /certs/ temp* -inProgress* diff --git a/data/configs/consumerMappings/consumer_mapping_config.json b/data/configs/consumerMappings/consumer_mapping_config.json index 7bd06b7e..32266f55 100644 --- a/data/configs/consumerMappings/consumer_mapping_config.json +++ b/data/configs/consumerMappings/consumer_mapping_config.json @@ -6,11 +6,11 @@ }, { "CampaignConfigID": "VITA_Campaign_Config_ID_COVID", - "Description": "RSV Ongoing for My Vaccines" + "Description": "COVID Ongoing for My Vaccines" }, { "CampaignConfigID": "VITA_Campaign_Config_ID_FLU", - "Description": "RSV Ongoing for My Vaccines" + "Description": "FLU Ongoing for My Vaccines" }, { "CampaignConfigID": "VITA_NBS_Campaign_Config_ID_COVID", @@ -22,9 +22,13 @@ "CampaignConfigID": "7fcb742b-45fa-4w0d-8f2f-9c2efb1f46d1", "Description": "RSV Ongoing for NBS" }, + { + "CampaignConfigID": "b21cff69-a2c7-4e78-a514-ce067c09df0c", + "Description": "FLU Ongoing for NBS" + }, { "CampaignConfigID": "NBS_Campaign_Config_ID_RSV", - "Description": "RSV Ongoing for NBS" + "Description": "RSV Test Config for NBS" }, { "CampaignConfigID": "NBS_Campaign_Config_ID_COVID", @@ -36,7 +40,7 @@ }, { "CampaignConfigID": "NBS_Campaign_Config_ID_FLU", - "Description": "FLU Ongoing for NBS" + "Description": "Flu for NBS Story Tests" }, { "CampaignConfigID": "VITA_NBS_Campaign_Config_ID_COVID", diff --git a/data/configs/consumerMappings/preprod/consumer_mapping_config.json b/data/configs/consumerMappings/preprod/consumer_mapping_config.json index a51fa56d..8d2f1df2 100644 --- a/data/configs/consumerMappings/preprod/consumer_mapping_config.json +++ b/data/configs/consumerMappings/preprod/consumer_mapping_config.json @@ -22,6 +22,10 @@ "CampaignConfigID": "7fcb742b-45fa-4w0d-8f2f-9c2efb1f46d1", "Description": "RSV Ongoing for NBS" }, + { + "CampaignConfigID": "b21cff69-a2c7-4e78-a514-ce067c09df0c", + "Description": "FLU Ongoing for NBS" + }, { "CampaignConfigID": "NBS_Campaign_Config_ID_RSV", "Description": "RSV Ongoing for NBS" @@ -34,10 +38,6 @@ "CampaignConfigID": "NBS_Campaign_Config_ID_COVID_ACTIVE", "Description": "COVID Ongoing for NBS" }, - { - "CampaignConfigID": "NBS_Campaign_Config_ID_FLU", - "Description": "FLU Ongoing for NBS" - }, { "CampaignConfigID": "VITA_NBS_Campaign_Config_ID_COVID", "Description": "Shared Config for My Vaccines and NBS" diff --git a/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json b/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json new file mode 100644 index 00000000..6b4fc6a0 --- /dev/null +++ b/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json @@ -0,0 +1,603 @@ +{ + "CampaignConfig": { + "ID": "b21cff69-a2c7-4e78-a514-ce067c09df0c", + "Version": 1, + "Name": "EliD NBS Flu campaign config Release 1", + "Type": "V", + "Target": "FLU", + "Manager": [ + "example@nhs.net" + ], + "Approver": [ + "example@nhs.net" + ], + "Reviewer": [ + "example@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "<>", + "EndDate": "20270331", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "2834b74a-4170-4594-9d2c-9e6d9af41d20", + "DefaultCommsRouting": "BOOK_NBS", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "EliD NBS Flu campaign config Release 1", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "StatusText": { + "NotEligible": "We do not believe you can have it", + "NotActionable": "You should have the Flu vaccine", + "Actionable": "You should have the Flu vaccine" + }, + "IterationCohorts": [ + { + "CohortLabel": "flu_65+_autumnwinter2026", + "CohortGroup": "flu_age_65+", + "PositiveDescription": "are aged 65 or over (including those who will be 65 by 31 March 2027)", + "NegativeDescription": "are not aged 65 or over (including those who will be 65 by 31 March 2027)", + "Priority": 10, + "Virtual": "N" + }, + { + "CohortLabel": "flu_2to3_autumnwinter2026", + "CohortGroup": "flu_age_2to3", + "PositiveDescription": "are aged 2 or 3 years (born between 1 September 2022 and 31 August 2024)", + "NegativeDescription": "are not aged 2 or 3 years (born between 1 September 2022 and 31 August 2024)", + "Priority": 15, + "Virtual": "N" + }, + { + "CohortLabel": "flu_4to16_autumnwinter2026", + "CohortGroup": "flu_school_age", + "PositiveDescription": "are of school age (Reception to Year 11)", + "NegativeDescription": "are not of school age (Reception to Year 11)", + "Priority": 20, + "Virtual": "N" + }, + { + "CohortLabel": "flu_immunosuppression", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 25, + "Virtual": "N" + }, + { + "CohortLabel": "flu_diabetes", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 30, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_heart_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 35, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_kidney_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 40, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_liver_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 45, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_neurological_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 50, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_respiratory_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 55, + "Virtual": "N" + }, + { + "CohortLabel": "flu_coded_eligibility", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 60, + "Virtual": "N" + }, + { + "CohortLabel": "flu_morbid_obesity", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 65, + "Virtual": "N" + }, + { + "CohortLabel": "care_home_residents_older_adults", + "CohortGroup": "care_home_residents", + "PositiveDescription": "live in a care home for older adults", + "NegativeDescription": "do not live in a care home for older adults", + "Priority": 70, + "Virtual": "N" + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 90, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone NOT already vaccinated within the current campaign and do not have a future booking from the magic cohort", + "Operator": "<", + "Comparator": "<>[[NVL:18000101]]", + "AttributeTarget": "FLU", + "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": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove under 65 Years at end of campaign", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 65 years at the end of campaign is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": ">=", + "Comparator": "19620401", + "CohortLabel": "flu_65+_autumnwinter2026" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "Vaccinated within the current campaign and aged 9 or over", + "Priority": 500, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "Vaccinated within the current campaign and aged 9 or over", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<=", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D>=", + "Comparator": "-28", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "=", + "Comparator": "1", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": ">=", + "Comparator": "2", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "NotMemberOf", + "Comparator": "flu_immunosuppression", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "SchoolAge", + "Description": "Will be vaccinated at school through a School Age Immunisation Service", + "Priority": 560, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_4to16_autumnwinter2026", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingNBS", + "Description": "Has a future booking on NBS", + "Priority": 700, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingNBS", + "Description": "Has a future booking on NBS", + "Priority": 700, + "Operator": "in", + "Comparator": "NBS,MYA", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingLocal", + "Description": "Has a future local booking", + "Priority": 750, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "=", + "Comparator": "1", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D>=", + "Comparator": "-28", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated within the current campaign", + "Priority": 3200, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "LAST_VACCINATION_DATE" + }, + { + "Type": "Y", + "Name": "FutureBookingDate", + "Description": "Future booking date", + "Priority": 3300, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "FUTURE_APPOINTMENT_DATE" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "Eligible to book", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "LAST_VACCINATION_DATE": { + "ExternalRoutingCode": "DateOfLastVaccination", + "ActionDescription": "[[TARGET.FLU.LAST_SUCCESSFUL_DATE:DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "EARLIEST_NEXT_VACCINATION_DATE": { + "ExternalRoutingCode": "DateOfNextEarliestVaccination", + "ActionDescription": "[[TARGET.FLU.NEXT_DOSE_DUE:ADD_DAYS(29):DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "ADDITIONAL_DOSE_REQUIRED": { + "ExternalRoutingCode": "AdditionalDoseRequired", + "ActionDescription": "Yes", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "MAY_REQUIRE_ADDITIONAL_DOSE": { + "ExternalRoutingCode": "AdditionalDoseRequired", + "ActionDescription": "Maybe", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "FUTURE_APPOINTMENT_DATE": { + "ExternalRoutingCode": "FutureBookingDate", + "ActionDescription": "[[TARGET.FLU.BOOKED_APPOINTMENT_DATE:DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP_Inactive.json b/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP_Inactive.json new file mode 100644 index 00000000..c1b73246 --- /dev/null +++ b/data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP_Inactive.json @@ -0,0 +1,603 @@ +{ + "CampaignConfig": { + "ID": "b21cff69-a2c7-4e78-a514-ce067c09df0c", + "Version": 1, + "Name": "EliD NBS Flu campaign config Release 1", + "Type": "V", + "Target": "FLU", + "Manager": [ + "example@nhs.net" + ], + "Approver": [ + "example@nhs.net" + ], + "Reviewer": [ + "example@nhs.net" + ], + "IterationFrequency": "X", + "IterationType": "O", + "IterationTime": "07:00:00", + "StartDate": "<>", + "EndDate": "20270331", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "DefaultCommsRouting": "BOOK_NBS", + "Iterations": [ + { + "ID": "2834b74a-4170-4594-9d2c-9e6d9af41d20", + "DefaultCommsRouting": "BOOK_NBS", + "DefaultNotActionableRouting": "", + "DefaultNotEligibleRouting": "", + "Version": 1, + "Name": "EliD NBS Flu campaign config Release 1", + "IterationDate": "<>", + "IterationNumber": 1, + "CommsType": "I", + "ApprovalMinimum": 0, + "ApprovalMaximum": 0, + "Type": "O", + "StatusText": { + "NotEligible": "We do not believe you can have it", + "NotActionable": "You should have the Flu vaccine", + "Actionable": "You should have the Flu vaccine" + }, + "IterationCohorts": [ + { + "CohortLabel": "flu_65+_autumnwinter2026", + "CohortGroup": "flu_age_65+", + "PositiveDescription": "are aged 65 or over (including those who will be 65 by 31 March 2027)", + "NegativeDescription": "are not aged 65 or over (including those who will be 65 by 31 March 2027)", + "Priority": 10, + "Virtual": "N" + }, + { + "CohortLabel": "flu_2to3_autumnwinter2026", + "CohortGroup": "flu_age_2to3", + "PositiveDescription": "are aged 2 or 3 years (born between 1 September 2022 and 31 August 2024)", + "NegativeDescription": "are not aged 2 or 3 years (born between 1 September 2022 and 31 August 2024)", + "Priority": 15, + "Virtual": "N" + }, + { + "CohortLabel": "flu_4to16_autumnwinter2026", + "CohortGroup": "flu_school_age", + "PositiveDescription": "are of school age (Reception to Year 11)", + "NegativeDescription": "are not of school age (Reception to Year 11)", + "Priority": 20, + "Virtual": "N" + }, + { + "CohortLabel": "flu_immunosuppression", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 25, + "Virtual": "N" + }, + { + "CohortLabel": "flu_diabetes", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 30, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_heart_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 35, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_kidney_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 40, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_liver_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 45, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_neurological_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 50, + "Virtual": "N" + }, + { + "CohortLabel": "flu_chronic_respiratory_disease", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 55, + "Virtual": "N" + }, + { + "CohortLabel": "flu_coded_eligibility", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 60, + "Virtual": "N" + }, + { + "CohortLabel": "flu_morbid_obesity", + "CohortGroup": "flu_clinical_risk", + "PositiveDescription": "have a weakened immune system because of a health condition or treatment", + "NegativeDescription": "do not have a weakened immune system because of a health condition or treatment", + "Priority": 65, + "Virtual": "N" + }, + { + "CohortLabel": "care_home_residents_older_adults", + "CohortGroup": "care_home_residents", + "PositiveDescription": "live in a care home for older adults", + "NegativeDescription": "do not live in a care home for older adults", + "Priority": 70, + "Virtual": "N" + }, + { + "CohortLabel": "elid_all_people", + "CohortGroup": "magic_cohort", + "PositiveDescription": "", + "NegativeDescription": "", + "Priority": 90, + "Virtual": "Y" + } + ], + "IterationRules": [ + { + "Type": "F", + "Name": "Remove from magic cohort unless already vaccinated or have future booking", + "Description": "Remove anyone NOT already vaccinated within the current campaign and do not have a future booking from the magic cohort", + "Operator": "<", + "Comparator": "<>[[NVL:18000101]]", + "AttributeTarget": "FLU", + "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": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "CohortLabel": "elid_all_people", + "Priority": 100 + }, + { + "Type": "F", + "Name": "Remove under 65 Years at end of campaign", + "Description": "Ensure anyone who has a PDS date of birth which determines their age to be less than 65 years at the end of campaign is filtered out.", + "Priority": 120, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": ">=", + "Comparator": "19620401", + "CohortLabel": "flu_65+_autumnwinter2026" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "Vaccinated within the current campaign and aged 9 or over", + "Priority": 500, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinated", + "Description": "Vaccinated within the current campaign and aged 9 or over", + "Priority": 500, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y<=", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D>=", + "Comparator": "-28", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "TooClose", + "Description": "Additional dose required but it is too closer to previous dose", + "Priority": 520, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "=", + "Comparator": "1", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": ">=", + "Comparator": "2", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "AlreadyVaccinatedNoAdditionalDose", + "Description": "Already vaccinated in current campaign and no additional dose required", + "Priority": 540, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "MayRequireAdditionalDose", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 550, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "NotMemberOf", + "Comparator": "flu_immunosuppression", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "SchoolAge", + "Description": "Will be vaccinated at school through a School Age Immunisation Service", + "Priority": 560, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_4to16_autumnwinter2026", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingNBS", + "Description": "Has a future booking on NBS", + "Priority": 700, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingNBS", + "Description": "Has a future booking on NBS", + "Priority": 700, + "Operator": "in", + "Comparator": "NBS,MYA", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_PROVIDER", + "RuleStop": "Y" + }, + { + "Type": "S", + "Name": "FutureBookingLocal", + "Description": "Has a future local booking", + "Priority": 750, + "Operator": "D>=", + "Comparator": "0", + "AttributeTarget": "FLU", + "AttributeLevel": "TARGET", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "RuleStop": "Y" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "R", + "Name": "AdditionalDoseRequired", + "Description": "Requires an additional vaccination dose", + "Priority": 1000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "=", + "Comparator": "1", + "CommsRouting": "BOOK_NBS|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": "D>=", + "Comparator": "-28", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "COHORT", + "AttributeName": "COHORT_LABEL", + "Operator": "MemberOf", + "Comparator": "flu_immunosuppression", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "TooCloseForAdditionalDoseAction", + "Description": "Requires an additional dose but is within 4 weeks of previous vaccination", + "Priority": 3000, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "CommsRouting": "LAST_VACCINATION_DATE|EARLIEST_NEXT_VACCINATION_DATE|ADDITIONAL_DOSE_REQUIRED" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "PERSON", + "AttributeName": "DATE_OF_BIRTH", + "Operator": "Y>", + "Comparator": "-9", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "MayRequireAdditionalDoseAction", + "Description": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "Priority": 3100, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "SUCCESSFUL_PROCEDURE_COUNT", + "Operator": "<", + "Comparator": "2", + "CommsRouting": "MAY_REQUIRE_ADDITIONAL_DOSE" + }, + { + "Type": "Y", + "Name": "Already vaccinated default text", + "Description": "Already vaccinated within the current campaign", + "Priority": 3200, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "LAST_SUCCESSFUL_DATE", + "Operator": ">=", + "Comparator": "<>", + "CommsRouting": "LAST_VACCINATION_DATE" + }, + { + "Type": "Y", + "Name": "FutureBookingDate", + "Description": "Future booking date", + "Priority": 3300, + "AttributeLevel": "TARGET", + "AttributeTarget": "FLU", + "AttributeName": "BOOKED_APPOINTMENT_DATE", + "Operator": "D>=", + "Comparator": "0", + "CommsRouting": "FUTURE_APPOINTMENT_DATE" + } + ], + "ActionsMapper": { + "BOOK_NBS": { + "ExternalRoutingCode": "BookNBS", + "ActionDescription": "Eligible to book", + "ActionType": "InfoText", + "UrlLink": null, + "UrlLabel": "" + }, + "LAST_VACCINATION_DATE": { + "ExternalRoutingCode": "DateOfLastVaccination", + "ActionDescription": "[[TARGET.FLU.LAST_SUCCESSFUL_DATE:DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "EARLIEST_NEXT_VACCINATION_DATE": { + "ExternalRoutingCode": "DateOfNextEarliestVaccination", + "ActionDescription": "[[TARGET.FLU.NEXT_DOSE_DUE:ADD_DAYS(29):DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "ADDITIONAL_DOSE_REQUIRED": { + "ExternalRoutingCode": "AdditionalDoseRequired", + "ActionDescription": "Yes", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "MAY_REQUIRE_ADDITIONAL_DOSE": { + "ExternalRoutingCode": "AdditionalDoseRequired", + "ActionDescription": "Maybe", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + }, + "FUTURE_APPOINTMENT_DATE": { + "ExternalRoutingCode": "FutureBookingDate", + "ActionDescription": "[[TARGET.FLU.BOOKED_APPOINTMENT_DATE:DATE(%Y-%m-%d)]]", + "ActionType": "DataValue", + "UrlLink": null, + "UrlLabel": "" + } + } + } + ] + } +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A01.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A01.json new file mode 100644 index 00000000..efbfb6fe --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A01.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "FLU - NBS Integration - A01 - Actionable - Eligible, within single eligible cohort", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971501", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_65+_autumnwinter2026", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9999971501", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971501", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A02.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A02.json new file mode 100644 index 00000000..4e5848a3 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A02.json @@ -0,0 +1,42 @@ +{ + "scenario_name": "FLU - NBS Integration - A02 - Actionable - Eligible, within multiple eligible cohorts", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971502", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_65+_autumnwinter2026", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20231020" + }, + { + "COHORT_LABEL": "flu_diabetes", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9999971502", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971502", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A03.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A03.json new file mode 100644 index 00000000..f4382689 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A03.json @@ -0,0 +1,35 @@ +{ + "scenario_name": "FLU - NBS Integration - A03 - Actionable - Eligible, within care home residents eligible cohort", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971503", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "care_home_residents_older_adults", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9999971503", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>", + "CARE_HOME_FLAG": "Y" + }, + { + "NHS_NUMBER": "9999971503", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A04.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A04.json new file mode 100644 index 00000000..da414c0d --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_A04.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "FLU - NBS Integration - A04 - Actionable - Additional Dose Required", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971504", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971504", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971504", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "SUCCESSFUL_PROCEDURE_COUNT": "1" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA01.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA01.json new file mode 100644 index 00000000..7e534a3e --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA01.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "FLU - NBS Integration - NA01 - Not Actionable - The individual has already been vaccinated within the current campaign", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971505", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971505", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971505", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "SUCCESSFUL_PROCEDURE_COUNT": "1" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA02.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA02.json new file mode 100644 index 00000000..48653409 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA02.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "FLU - NBS Integration - NA02 - Not Actionable - Too close to previous vaccination", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971506", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971506", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971506", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "SUCCESSFUL_PROCEDURE_COUNT": "1" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA03.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA03.json new file mode 100644 index 00000000..23b0744d --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA03.json @@ -0,0 +1,31 @@ +{ + "scenario_name": "FLU - NBS Integration - NA03 - Already Vaccinated - Not in eligible cohort", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971507", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [] + }, + { + "NHS_NUMBER": "9999971507", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971507", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "SUCCESSFUL_PROCEDURE_COUNT": "1" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA04.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA04.json new file mode 100644 index 00000000..be85da8a --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA04.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "FLU - NBS Integration - NA04 - NotActionable - Future booking (NBS)", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971508", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971508", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971508", + "ATTRIBUTE_TYPE": "FLU", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "MYA" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA05.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA05.json new file mode 100644 index 00000000..5273ffbf --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA05.json @@ -0,0 +1,36 @@ +{ + "scenario_name": "FLU - NBS Integration - NA05 - NotActionable - Future booking (local)", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971509", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971509", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971509", + "ATTRIBUTE_TYPE": "FLU", + "BOOKED_APPOINTMENT_DATE": "<>", + "BOOKED_APPOINTMENT_PROVIDER": "ACC" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA06.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA06.json new file mode 100644 index 00000000..df179cfc --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA06.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "FLU - NBS Integration - NA06 - NotActionable - School aged", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971510", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_4to16_autumnwinter2026", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971510", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971510", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA07.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA07.json new file mode 100644 index 00000000..0b965c31 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA07.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "FLU - NBS Integration - NA07 - No current campaign", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP_Inactive.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971511", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "flu_immunosuppression", + "DATE_JOINED": "20240101" + } + ] + }, + { + "NHS_NUMBER": "9999971511", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971511", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA08.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA08.json new file mode 100644 index 00000000..6a037f59 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NA08.json @@ -0,0 +1,31 @@ +{ + "scenario_name": "FLU - NBS Integration - NA08 - Not Actionable - May be eligible for an additional dose", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971512", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [] + }, + { + "NHS_NUMBER": "9999971512", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971512", + "ATTRIBUTE_TYPE": "FLU", + "LAST_SUCCESSFUL_DATE": "<>", + "SUCCESSFUL_PROCEDURE_COUNT": "1" + } + ] +} diff --git a/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NE01.json b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NE01.json new file mode 100644 index 00000000..f7e0b497 --- /dev/null +++ b/data/dynamoDB/nbsIntegrationTestData/AUTO_FLU_NBS_INT_NE01.json @@ -0,0 +1,34 @@ +{ + "scenario_name": "FLU - NBS Integration - NE01 - Not Eligible - Not in an eligible cohort", + "request_headers": { + "NHSE-Product-ID": "P.XWA-VFF", + "nhsd-End-User-Organisation-ods": "elid_automation" + }, + "queryParams": { + "conditions": "flu" + }, + "config_filenames": [ + "NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json" + ], + "data": [ + { + "NHS_NUMBER": "9999971513", + "ATTRIBUTE_TYPE": "COHORTS", + "COHORT_MEMBERSHIPS": [ + { + "COHORT_LABEL": "not_a_valid_cohort", + "DATE_JOINED": "20231020" + } + ] + }, + { + "NHS_NUMBER": "9999971513", + "ATTRIBUTE_TYPE": "PERSON", + "DATE_OF_BIRTH": "<>" + }, + { + "NHS_NUMBER": "9999971513", + "ATTRIBUTE_TYPE": "FLU" + } + ] +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A01.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A01.json new file mode 100644 index 00000000..0466cb80 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A01.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2026-04-08T15:04:33.406407+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "BookNBS", + "actionType": "InfoText", + "description": "Eligible to book", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_age_65+", + "cohortStatus": "Actionable", + "cohortText": "are aged 65 or over (including those who will be 65 by 31 March 2027)" + } + ], + "status": "Actionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [] + } + ], + "responseId": "46b91622-5d24-4993-b18f-a9580eed27a5" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A02.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A02.json new file mode 100644 index 00000000..90cb3012 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A02.json @@ -0,0 +1,35 @@ +{ + "meta": { + "lastUpdated": "2026-04-08T15:07:38.774217+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "BookNBS", + "actionType": "InfoText", + "description": "Eligible to book", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_age_65+", + "cohortStatus": "Actionable", + "cohortText": "are aged 65 or over (including those who will be 65 by 31 March 2027)" + }, + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "Actionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "Actionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [] + } + ], + "responseId": "6c8e3952-fa15-4f06-93bc-3024321d3b90" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A03.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A03.json new file mode 100644 index 00000000..50adc0ac --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A03.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2026-04-08T15:08:26.396160+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "BookNBS", + "actionType": "InfoText", + "description": "Eligible to book", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "care_home_residents", + "cohortStatus": "Actionable", + "cohortText": "live in a care home for older adults" + } + ], + "status": "Actionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [] + } + ], + "responseId": "1a4b267e-2a91-4874-8390-06e3f1e5dc1d" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A04.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A04.json new file mode 100644 index 00000000..72a9a160 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_A04.json @@ -0,0 +1,37 @@ +{ + "meta": { + "lastUpdated": "2026-04-08T15:28:30.494332+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "BookNBS", + "actionType": "InfoText", + "description": "Eligible to book", + "urlLabel": "", + "urlLink": "" + }, + { + "actionCode": "AdditionalDoseRequired", + "actionType": "DataValue", + "description": "Yes", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "Actionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "Actionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [] + } + ], + "responseId": "20d8ca03-5fc6-4d4d-ba22-88d4dfc9940b" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA01.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA01.json new file mode 100644 index 00000000..acb7ccfc --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA01.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2026-04-09T14:34:32.617588+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DateOfLastVaccination", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "NotActionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "Vaccinated within the current campaign and aged 9 or over", + "ruleType": "S" + } + ] + } + ], + "responseId": "74bc758e-013e-4e4a-890c-08dfedeeead9" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA02.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA02.json new file mode 100644 index 00000000..e5b22735 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA02.json @@ -0,0 +1,50 @@ +{ + "meta": { + "lastUpdated": "2026-04-09T14:45:16.739724+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DateOfLastVaccination", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + }, + { + "actionCode": "DateOfNextEarliestVaccination", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + }, + { + "actionCode": "AdditionalDoseRequired", + "actionType": "DataValue", + "description": "Yes", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "NotActionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "TooClose", + "ruleText": "Additional dose required but it is too closer to previous dose", + "ruleType": "S" + } + ] + } + ], + "responseId": "00b3b5b8-1b57-4e37-b497-27ff574f5928" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA03.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA03.json new file mode 100644 index 00000000..5bfceab1 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA03.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "2026-04-10T14:40:32.374213+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "DateOfLastVaccination", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "AlreadyVaccinated", + "ruleText": "Vaccinated within the current campaign and aged 9 or over", + "ruleType": "S" + } + ] + } + ], + "responseId": "d34755dd-98f5-42ec-89ae-61a79f73e9c1" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA04.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA04.json new file mode 100644 index 00000000..b038dc50 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA04.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2026-04-12T20:29:05.109710+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "FutureBookingDate", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "NotActionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "FutureBookingNBS", + "ruleText": "Has a future booking on NBS", + "ruleType": "S" + } + ] + } + ], + "responseId": "7ace823d-5617-4b62-b894-653018fee568" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA05.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA05.json new file mode 100644 index 00000000..37315c57 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA05.json @@ -0,0 +1,36 @@ +{ + "meta": { + "lastUpdated": "2026-04-12T20:39:20.855013+00:00" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "FutureBookingDate", + "actionType": "DataValue", + "description": "<>", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "NotActionable", + "cohortText": "have a weakened immune system because of a health condition or treatment" + } + ], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "FutureBookingLocal", + "ruleText": "Has a future local booking", + "ruleType": "S" + } + ] + } + ], + "responseId": "3c6b41c8-09c8-44b3-bb54-e8d1a8cedc75" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA06.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA06.json new file mode 100644 index 00000000..e62a9939 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA06.json @@ -0,0 +1,23 @@ +{ + "meta": { + "lastUpdated": "2026-04-12T20:43:39.364882+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_school_age", + "cohortStatus": "NotActionable", + "cohortText": "are of school age (Reception to Year 11)" + } + ], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [{"ruleCode": "SchoolAge", + "ruleText": "Will be vaccinated at school through a School Age Immunisation Service", + "ruleType": "S"}]} + ], + "responseId": "e71fa8e5-19aa-47b1-89eb-4ca641a91fe6" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA07.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA07.json new file mode 100644 index 00000000..a88954a6 --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA07.json @@ -0,0 +1,7 @@ +{ + "meta": { + "lastUpdated": "2026-04-09T14:45:16.739724+00:00" + }, + "processedSuggestions": [], + "responseId": "00b3b5b8-1b57-4e37-b497-27ff574f5932" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA08.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA08.json new file mode 100644 index 00000000..f6f84fcc --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NA08.json @@ -0,0 +1,30 @@ +{ + "meta": { + "lastUpdated": "" + }, + "processedSuggestions": [ + { + "actions": [ + { + "actionCode": "AdditionalDoseRequired", + "actionType": "DataValue", + "description": "Maybe", + "urlLabel": "", + "urlLink": "" + } + ], + "condition": "FLU", + "eligibilityCohorts": [], + "status": "NotActionable", + "statusText": "You should have the Flu vaccine", + "suitabilityRules": [ + { + "ruleCode": "MayRequireAdditionalDose", + "ruleText": "Already vaccinated but may require an additional dose if a carer or live with someone who is immunosuppressed", + "ruleType": "S" + } + ] + } + ], + "responseId": "" +} diff --git a/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NE01.json b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NE01.json new file mode 100644 index 00000000..c54dfc3c --- /dev/null +++ b/data/responses/nbsIntegrationTestResponses/AUTO_FLU_NBS_INT_NE01.json @@ -0,0 +1,42 @@ +{ + "meta": { + "lastUpdated": "2026-04-09T14:45:16.739724+00:00" + }, + "processedSuggestions": [ + { + "actions": [], + "condition": "FLU", + "eligibilityCohorts": [ + { + "cohortCode": "flu_age_65+", + "cohortStatus": "NotEligible", + "cohortText": "are not aged 65 or over (including those who will be 65 by 31 March 2027)" + }, + { + "cohortCode": "flu_age_2to3", + "cohortStatus": "NotEligible", + "cohortText": "are not aged 2 or 3 years (born between 1 September 2022 and 31 August 2024)" + }, + { + "cohortCode": "flu_school_age", + "cohortStatus": "NotEligible", + "cohortText": "are not of school age (Reception to Year 11)" + }, + { + "cohortCode": "flu_clinical_risk", + "cohortStatus": "NotEligible", + "cohortText": "do not have a weakened immune system because of a health condition or treatment" + }, + { + "cohortCode": "care_home_residents", + "cohortStatus": "NotEligible", + "cohortText": "do not live in a care home for older adults" + } + ], + "status": "NotEligible", + "statusText": "We do not believe you can have it", + "suitabilityRules": [] + } + ], + "responseId": "00b3b5b8-1b57-4e37-b497-27ff574f5933" +} diff --git a/tests/test_config.py b/tests/test_config.py index f65f23c8..25326681 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -43,5 +43,6 @@ INT_TEST_CONFIG_PATHS: list[str] = [ "data/configs/nbsIntegrationTestConfigs/NBS_RSV_Config_April2026_v0.8WIP.json", "data/configs/nbsIntegrationTestConfigs/NBS_COVID_Config_Spring2026_v0.5WIP.json", + "data/configs/nbsIntegrationTestConfigs/NBS_Flu_Config_AutumnWinter2026_v0.6WIP.json", "data/configs/vitaIntegrationTestConfigs/RSV_Config_v2.0WIP_v0.2.json", ]