Skip to content

Commit c781442

Browse files
added tests for 371 (#298)
1 parent 60583a7 commit c781442

6 files changed

Lines changed: 328 additions & 36 deletions

File tree

.env

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d0",
4+
"Version": 1,
5+
"Name": "EliD RSV example config",
6+
"Type": "V",
7+
"Target": "RSV",
8+
"Manager": [
9+
"person1@nhs.net"
10+
],
11+
"Approver": [
12+
"person1@nhs.net"
13+
],
14+
"Reviewer": [
15+
"person1@nhs.net"
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "20250717",
21+
"EndDate": "20350717",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "PLACEHOLDER_COMMS_ROUTING",
25+
"Iterations": [
26+
{
27+
"ID": "8fcb742b-45fa-4e0d-8f2f-9c2efb1f46d1",
28+
"DefaultCommsRouting": "BOOK_LOCAL|HELP_SUPPORT",
29+
"DefaultNotActionableRouting": "",
30+
"DefaultNotEligibleRouting": "CHECK_CORRECT_X",
31+
"Version": 1,
32+
"Name": "EliD RSV example config",
33+
"IterationDate": "20250717",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"IterationCohorts": [
40+
{
41+
"CohortLabel": "rsv_75to79",
42+
"CohortGroup": "rsv_age",
43+
"PositiveDescription": "are aged 75 to 79 years old",
44+
"NegativeDescription": "are not aged 75 to 79 years old",
45+
"Priority": 0
46+
},
47+
{
48+
"CohortLabel": "rsv_80_since_02_Sept_2024",
49+
"CohortGroup": "rsv_age_catchup",
50+
"PositiveDescription": "turned 80 after 1st September 2024",
51+
"NegativeDescription": "did not turn 80 after 1 September 2024",
52+
"Priority": 10
53+
}
54+
],
55+
"IterationRules": [
56+
{
57+
"Type": "S",
58+
"Name": "Testing of AND rules where names are different",
59+
"Description": "Testing of AND rules where names are different",
60+
"Operator": "=",
61+
"Comparator": "19800501",
62+
"AttributeLevel": "PERSON",
63+
"AttributeName": "DATE_OF_BIRTH",
64+
"CohortLabel": "rsv_75to79",
65+
"Priority": 100
66+
},
67+
{
68+
"Type": "S",
69+
"Name": "This name is completely different but should still be AND to the one above",
70+
"Description": "Testing of AND rules where names are different",
71+
"Operator": "=",
72+
"Comparator": "AAA",
73+
"AttributeLevel": "PERSON",
74+
"AttributeName": "ICB",
75+
"CohortLabel": "rsv_75to79",
76+
"Priority": 100
77+
},
78+
{
79+
"Type": "S",
80+
"Name": "This is a rule on it's own and not part of the AND rules above",
81+
"Description": "Testing of AND rules where names are different",
82+
"Operator": "=",
83+
"Comparator": "19820501",
84+
"AttributeLevel": "PERSON",
85+
"AttributeName": "DATE_OF_BIRTH",
86+
"CohortLabel": "rsv_75to79",
87+
"Priority": 1000
88+
},
89+
{
90+
"Type": "R",
91+
"Name": "Actionable Future Booked NBS Appointment",
92+
"Description": "Amend NBS future booking",
93+
"Priority": 1000,
94+
"Operator": "D>=",
95+
"Comparator": "0",
96+
"AttributeTarget": "RSV",
97+
"AttributeLevel": "TARGET",
98+
"AttributeName": "BOOKED_APPOINTMENT_DATE",
99+
"CommsRouting": "AMEND_NBS"
100+
},
101+
{
102+
"Type": "R",
103+
"Name": "Actionable Future Booked NBS Appointment",
104+
"Description": "Amend NBS future booking",
105+
"Priority": 1000,
106+
"Operator": "=",
107+
"Comparator": "NBS",
108+
"AttributeTarget": "RSV",
109+
"AttributeLevel": "TARGET",
110+
"AttributeName": "BOOKED_APPOINTMENT_PROVIDER",
111+
"CommsRouting": "AMEND_NBS"
112+
}
113+
],
114+
"ActionsMapper": {
115+
"BOOK_NBS": {
116+
"ExternalRoutingCode": "BookNBS",
117+
"ActionDescription": "",
118+
"ActionType": "ButtonWithAuthLink",
119+
"UrlLink": "http://www.nhs.uk/book-rsv",
120+
"UrlLabel": "Continue to booking"
121+
},
122+
"AMEND_NBS": {
123+
"ExternalRoutingCode": "AmendNBS",
124+
"ActionDescription": "##You have an RSV vaccination appointment\nYou can view, change or cancel your appointment below.",
125+
"ActionType": "ButtonWithAuthLink",
126+
"UrlLink": "http://www.nhs.uk/book-rsv",
127+
"UrlLabel": "Manage your appointment"
128+
},
129+
"CONTACT_GP": {
130+
"ExternalRoutingCode": "ContactGP",
131+
"ActionDescription": "Contact your GP",
132+
"ActionType": "InfoText",
133+
"UrlLink": null,
134+
"UrlLabel": ""
135+
},
136+
"BOOK_LOCAL": {
137+
"ExternalRoutingCode": "BookLocal",
138+
"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.",
139+
"ActionType": "InfoText",
140+
"UrlLink": null,
141+
"UrlLabel": ""
142+
},
143+
"MANAGE_LOCAL": {
144+
"ExternalRoutingCode": "ManageLocal",
145+
"ActionDescription": "##You have an RSV vaccination appointment\n\nContact your healthcare provider to change or cancel your appointment.",
146+
"ActionType": "CardWithText",
147+
"UrlLink": null,
148+
"UrlLabel": ""
149+
},
150+
"HELP_SUPPORT": {
151+
"ExternalRoutingCode": "HelpSupportInfo",
152+
"ActionDescription": "## CONTENT TBC\n\nBlah blah blah.",
153+
"ActionType": "InfoText",
154+
"UrlLink": null,
155+
"UrlLabel": ""
156+
},
157+
"CHECK_CORRECT_X": {
158+
"ExternalRoutingCode": "HealthcareProInfo",
159+
"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)",
160+
"ActionType": "InfoText",
161+
"UrlLink": null,
162+
"UrlLabel": ""
163+
},
164+
"CHECK_CORRECT_ALREADY_VACCINATED": {
165+
"ExternalRoutingCode": "AlreadyVaccinatedInfo",
166+
"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).",
167+
"ActionType": "InfoText",
168+
"UrlLink": null,
169+
"UrlLabel": ""
170+
},
171+
"CHECK_CORRECT_OTHER_SETTING": {
172+
"ExternalRoutingCode": "ManagedSettingInfo",
173+
"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).",
174+
"ActionType": "InfoText",
175+
"UrlLink": null,
176+
"UrlLabel": ""
177+
}
178+
}
179+
}
180+
]
181+
}
182+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"scenario_name": "RSV - Ineligible - Suppressed by AND rule with different rule names",
3+
"request_headers": {
4+
"nhs-login-nhs-number": "9900037101"
5+
},
6+
"config_filenames": [
7+
"AUTO_RSV_ELI-371.json"
8+
],
9+
"data": [
10+
{
11+
"NHS_NUMBER": "9900037101",
12+
"ATTRIBUTE_TYPE": "COHORTS",
13+
"COHORT_MEMBERSHIPS": [
14+
{
15+
"COHORT_LABEL": "rsv_75to79",
16+
"DATE_JOINED": "20231020"
17+
}
18+
]
19+
},
20+
{
21+
"NHS_NUMBER": "9900037101",
22+
"ATTRIBUTE_TYPE": "PERSON",
23+
"DATE_OF_BIRTH": "19800501",
24+
"GENDER": "0",
25+
"POSTCODE": "SG8 6EG",
26+
"POSTCODE_SECTOR": "SG86",
27+
"POSTCODE_OUTCODE": "SG8",
28+
"MSOA": "E02003792",
29+
"LSOA": "E01018267",
30+
"GP_PRACTICE_CODE": "D81046",
31+
"PCN": "U75549",
32+
"ICB": "AAA",
33+
"COMMISSIONING_REGION": "Y61",
34+
"13Q_FLAG": "N",
35+
"CARE_HOME_FLAG": "N",
36+
"DE_FLAG": "N"
37+
},
38+
{
39+
"NHS_NUMBER": "9900037101",
40+
"ATTRIBUTE_TYPE": "RSV",
41+
"BOOKED_APPOINTMENT_DATE": "<<DATE_DAY_+7>>",
42+
"BOOKED_APPOINTMENT_PROVIDER": "NBS"
43+
}
44+
]
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"scenario_name": "RSV - Ineligible - Suppressed by single rule using a different D.O.B.",
3+
"request_headers": {
4+
"nhs-login-nhs-number": "9900037101"
5+
},
6+
"config_filenames": [
7+
"AUTO_RSV_ELI-371.json"
8+
],
9+
"data": [
10+
{
11+
"NHS_NUMBER": "9900037101",
12+
"ATTRIBUTE_TYPE": "COHORTS",
13+
"COHORT_MEMBERSHIPS": [
14+
{
15+
"COHORT_LABEL": "rsv_75to79",
16+
"DATE_JOINED": "20231020"
17+
}
18+
]
19+
},
20+
{
21+
"NHS_NUMBER": "9900037101",
22+
"ATTRIBUTE_TYPE": "PERSON",
23+
"DATE_OF_BIRTH": "19810501",
24+
"GENDER": "0",
25+
"POSTCODE": "SG8 6EG",
26+
"POSTCODE_SECTOR": "SG86",
27+
"POSTCODE_OUTCODE": "SG8",
28+
"MSOA": "E02003792",
29+
"LSOA": "E01018267",
30+
"GP_PRACTICE_CODE": "D81046",
31+
"PCN": "U75549",
32+
"ICB": "AAA",
33+
"COMMISSIONING_REGION": "Y61",
34+
"13Q_FLAG": "N",
35+
"CARE_HOME_FLAG": "N",
36+
"DE_FLAG": "N"
37+
},
38+
{
39+
"NHS_NUMBER": "9900037101",
40+
"ATTRIBUTE_TYPE": "RSV",
41+
"BOOKED_APPOINTMENT_DATE": "<<DATE_DAY_+7>>",
42+
"BOOKED_APPOINTMENT_PROVIDER": "NBS"
43+
}
44+
]
45+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"meta": {
3+
"lastUpdated": "<ignored>"
4+
},
5+
"processedSuggestions": [
6+
{
7+
"actions": [],
8+
"condition": "RSV",
9+
"eligibilityCohorts": [
10+
{
11+
"cohortCode": "rsv_age",
12+
"cohortStatus": "NotActionable",
13+
"cohortText": "are aged 75 to 79 years old"
14+
}
15+
],
16+
"status": "NotActionable",
17+
"statusText": "You should have the RSV vaccine",
18+
"suitabilityRules": [
19+
{
20+
"ruleCode": "Testing of AND rules where names are different",
21+
"ruleText": "Testing of AND rules where names are different",
22+
"ruleType": "S"
23+
}
24+
]
25+
}
26+
],
27+
"responseId": "<ignored>"
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"meta": {
3+
"lastUpdated": "<ignored>"
4+
},
5+
"processedSuggestions": [
6+
{
7+
"actions": [],
8+
"condition": "RSV",
9+
"eligibilityCohorts": [
10+
{
11+
"cohortCode": "rsv_age",
12+
"cohortStatus": "NotActionable",
13+
"cohortText": "are aged 75 to 79 years old"
14+
}
15+
],
16+
"status": "NotActionable",
17+
"statusText": "You should have the RSV vaccine",
18+
"suitabilityRules": [
19+
{
20+
"ruleCode": "Testing of AND rules where names are different",
21+
"ruleText": "Testing of AND rules where names are different",
22+
"ruleType": "S"
23+
}
24+
]
25+
}
26+
],
27+
"responseId": "<ignored>"
28+
}

0 commit comments

Comments
 (0)