Skip to content

Commit e7e0d9e

Browse files
Chore: [ELI-727] - status text override (#284)
* first commit with the 1st scenario * Chore: [ELI-727] - Added more scenarios for Override text * Chore: [ELI-727] - Added more scenarios for Override text * updated config and tests to standardise * Chore: [ELI-727] - Added the working responses * Chore: [ELI-727] - Added the working responses for status text --------- Co-authored-by: Adam Waller <176666249+adam-wallernhs1@users.noreply.github.com>
1 parent 9285ece commit e7e0d9e

18 files changed

Lines changed: 846 additions & 0 deletions
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "Story_Campaign_Config_ID",
4+
"Version": 1,
5+
"Name": "Status Text Override Campaign Config - Empty Status Text",
6+
"Type": "V",
7+
"Target": "COVID",
8+
"Manager": [
9+
"example@nhs.net"
10+
],
11+
"Approver": [
12+
"example@nhs.net"
13+
],
14+
"Reviewer": [
15+
"example@nhs.net"
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "<<DATE_DAY_-7>>",
21+
"EndDate": "<<DATE_DAY_7>>",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "DEFAULT_CONFIG_LEVEL_ROUTING",
25+
"Iterations": [
26+
{
27+
"ID": "8ecb742b-45ea-4f0d-8e2e-9c2feb1e46d1",
28+
"DefaultCommsRouting": "DEFAULT_ACTIONABLE_ROUTING",
29+
"DefaultNotActionableRouting": "DEFAULT_NOTACTIONABLE_ROUTING",
30+
"DefaultNotEligibleRouting": "",
31+
"Version": 1,
32+
"Name": "Status Text Override Campaign Config - Iteration",
33+
"IterationDate": "<<DATE_DAY_-1>>",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"StatusText": {
40+
"NotEligible": "NotEligible - Iteration Status Text",
41+
"NotActionable": "NotActionable - Iteration Status Text",
42+
"Actionable": ""
43+
},
44+
"IterationCohorts": [
45+
{
46+
"CohortLabel": "cohort_1",
47+
"CohortGroup": "cohort_1_group",
48+
"PositiveDescription": "are in cohort 1 group",
49+
"NegativeDescription": "are NOT in cohort 1 group",
50+
"Priority": 10
51+
}
52+
],
53+
"IterationRules": [
54+
{
55+
"Type": "F",
56+
"Name": "Filter if already vaccinated",
57+
"Description": "Filter if already vaccinated",
58+
"Operator": "is_not_null",
59+
"Comparator": "",
60+
"AttributeTarget": "COVID",
61+
"AttributeLevel": "TARGET",
62+
"AttributeName": "LAST_SUCCESSFUL_DATE",
63+
"Priority": 100
64+
},
65+
{
66+
"Type": "S",
67+
"Name": "TriggerSRuleViaICB",
68+
"Description": "You have been made NotActionable by this S rule",
69+
"Priority": 500,
70+
"AttributeLevel": "PERSON",
71+
"AttributeName": "ICB",
72+
"Operator": "=",
73+
"Comparator": "Scenario_2",
74+
"RuleStop": "Y"
75+
},
76+
{
77+
"Type": "S",
78+
"Name": "TriggerSRuleViaICB_2",
79+
"Description": "You have been made NotActionable by this S other rule",
80+
"Priority": 510,
81+
"AttributeLevel": "PERSON",
82+
"AttributeName": "ICB",
83+
"Operator": "=",
84+
"Comparator": "Scenario_3",
85+
"RuleStop": "Y"
86+
},
87+
{
88+
"Type": "R",
89+
"Name": "Trigger the Override Text if Actionable",
90+
"Description": "If person has the ICB value Scenario_1",
91+
"Priority": 1000,
92+
"Operator": "=",
93+
"Comparator": "Scenario_1",
94+
"AttributeLevel": "PERSON",
95+
"AttributeName": "ICB",
96+
"CommsRouting": "STATUS_TEXT_OVERRIDE_ACTIONABLE|OTHER_NORMAL_ACTION"
97+
},
98+
{
99+
"Type": "Y",
100+
"Name": "Trigger the Override Text if NotActionable",
101+
"Description": "If person has the ICB value Scenario_2",
102+
"Priority": 3000,
103+
"AttributeLevel": "PERSON",
104+
"AttributeName": "ICB",
105+
"Operator": "=",
106+
"Comparator": "Scenario_2",
107+
"CommsRouting": "STATUS_TEXT_OVERRIDE_NOT_ACTIONABLE"
108+
},
109+
{
110+
"Type": "X",
111+
"Name": "Trigger the Override Text if NotEligible",
112+
"Description": "If they are a member of one of the cohorts in the Comparator",
113+
"Priority": 4000,
114+
"AttributeLevel": "COHORT",
115+
"AttributeName": "COHORT_LABEL",
116+
"Operator": "MemberOf",
117+
"Comparator": "covid_16+_immunosuppression,covid_under16_immunosuppression",
118+
"CommsRouting": "STATUS_TEXT_OVERRIDE_NOT_ELIGIBLE|OTHER_NORMAL_ACTION"
119+
}
120+
],
121+
"ActionsMapper": {
122+
"OTHER_NORMAL_ACTION": {
123+
"ExternalRoutingCode": "OtherNormalAction",
124+
"ActionDescription": "Other Normal Action",
125+
"ActionType": "InfoText",
126+
"UrlLink": null,
127+
"UrlLabel": ""
128+
},
129+
"DEFAULT_CONFIG_LEVEL_ROUTING": {
130+
"ExternalRoutingCode": "CONFIG_LEVEL_ROUTING_ExternalRoutingCode",
131+
"ActionDescription": "CONFIG_LEVEL_ROUTING_ActionDescription",
132+
"ActionType": "CONFIG_LEVEL_ROUTING_UrlLabel",
133+
"UrlLink": "https://www.nhs.uk/default_url/",
134+
"UrlLabel": "CONFIG_LEVEL_ROUTING_UrlLabel"
135+
},
136+
"DEFAULT_ACTIONABLE_ROUTING": {
137+
"ExternalRoutingCode": "DEFAULT_ACTIONABLE_ExternalRoutingCode",
138+
"ActionDescription": "DEFAULT_ACTIONABLE_ActionDescription",
139+
"ActionType": "DEFAULT_ACTIONABLE__UrlLabel",
140+
"UrlLink": "https://www.nhs.uk/default_url/",
141+
"UrlLabel": "DEFAULT_ACTIONABLE__UrlLabel"
142+
},
143+
"DEFAULT_NOTACTIONABLE_ROUTING": {
144+
"ExternalRoutingCode": "DEFAULT_NOTACTIONABLE_ExternalRoutingCode",
145+
"ActionDescription": "DEFAULT_NOTACTIONABLE_ActionDescription",
146+
"ActionType": "DEFAULT_NOTACTIONABLE_UrlLabel",
147+
"UrlLink": "https://www.nhs.uk/default_url/",
148+
"UrlLabel": "DEFAULT_NOTACTIONABLE_UrlLabel"
149+
},
150+
"STATUS_TEXT_OVERRIDE_ACTIONABLE": {
151+
"ExternalRoutingCode": "StatusTextOverrideActionable",
152+
"ActionDescription": "Status Text Override Actionable",
153+
"ActionType": "norender_StatusTextOverride",
154+
"UrlLink": "https://www.nhs.uk/actionable_overide/",
155+
"UrlLabel": "actionable_overide"
156+
},
157+
"STATUS_TEXT_OVERRIDE_NOT_ACTIONABLE": {
158+
"ExternalRoutingCode": "StatusTextOverrideNotActionable",
159+
"ActionDescription": "Status Text Override Not Actionable",
160+
"ActionType": "norender_StatusTextOverride",
161+
"UrlLink": "https://www.nhs.uk/notactionable_overide/",
162+
"UrlLabel": "notactionable_overide"
163+
},
164+
"STATUS_TEXT_OVERRIDE_NOT_ELIGIBLE": {
165+
"ExternalRoutingCode": "StatusTextOverrideNotEligible",
166+
"ActionDescription": "Status Text Override Not Eligible",
167+
"ActionType": "norender_StatusTextOverride",
168+
"UrlLink": "https://www.nhs.uk/noteligible_overide/",
169+
"UrlLabel": "noteligible_overide"
170+
}
171+
}
172+
}
173+
]
174+
}
175+
}
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "Story_Campaign_Config_ID",
4+
"Version": 1,
5+
"Name": "Status Text Override Campaign Config",
6+
"Type": "V",
7+
"Target": "COVID",
8+
"Manager": [
9+
"example@nhs.net"
10+
],
11+
"Approver": [
12+
"example@nhs.net"
13+
],
14+
"Reviewer": [
15+
"example@nhs.net"
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "<<DATE_DAY_-7>>",
21+
"EndDate": "<<DATE_DAY_7>>",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "DEFAULT_CONFIG_LEVEL_ROUTING",
25+
"Iterations": [
26+
{
27+
"ID": "8ecb742b-45ea-4f0d-8e2e-9c2feb1e46d1",
28+
"DefaultCommsRouting": "DEFAULT_ACTIONABLE_ROUTING",
29+
"DefaultNotActionableRouting": "DEFAULT_NOTACTIONABLE_ROUTING",
30+
"DefaultNotEligibleRouting": "",
31+
"Version": 1,
32+
"Name": "Status Text Override Campaign Config - Iteration",
33+
"IterationDate": "<<DATE_DAY_-1>>",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"StatusText": {
40+
"NotEligible": "NotEligible - Iteration Status Text",
41+
"NotActionable": "NotActionable - Iteration Status Text",
42+
"Actionable": "Actionable - Iteration Status Text"
43+
},
44+
"IterationCohorts": [
45+
{
46+
"CohortLabel": "cohort_1",
47+
"CohortGroup": "cohort_1_group",
48+
"PositiveDescription": "are in cohort 1 group",
49+
"NegativeDescription": "are NOT in cohort 1 group",
50+
"Priority": 10
51+
}
52+
],
53+
"IterationRules": [
54+
{
55+
"Type": "F",
56+
"Name": "Filter if already vaccinated",
57+
"Description": "Filter if already vaccinated",
58+
"Operator": "is_not_null",
59+
"Comparator": "",
60+
"AttributeTarget": "COVID",
61+
"AttributeLevel": "TARGET",
62+
"AttributeName": "LAST_SUCCESSFUL_DATE",
63+
"Priority": 100
64+
},
65+
{
66+
"Type": "S",
67+
"Name": "TriggerSRuleViaICB",
68+
"Description": "You have been made NotActionable by this S rule",
69+
"Priority": 500,
70+
"AttributeLevel": "PERSON",
71+
"AttributeName": "ICB",
72+
"Operator": "=",
73+
"Comparator": "Scenario_2",
74+
"RuleStop": "Y"
75+
},
76+
{
77+
"Type": "S",
78+
"Name": "TriggerSRuleViaICB_2",
79+
"Description": "You have been made NotActionable by this S other rule",
80+
"Priority": 510,
81+
"AttributeLevel": "PERSON",
82+
"AttributeName": "ICB",
83+
"Operator": "=",
84+
"Comparator": "Scenario_3",
85+
"RuleStop": "Y"
86+
},
87+
{
88+
"Type": "R",
89+
"Name": "Trigger the Override Text if Actionable",
90+
"Description": "If person has the ICB value Scenario_1",
91+
"Priority": 1000,
92+
"Operator": "=",
93+
"Comparator": "Scenario_1",
94+
"AttributeLevel": "PERSON",
95+
"AttributeName": "ICB",
96+
"CommsRouting": "STATUS_TEXT_OVERRIDE_ACTIONABLE|OTHER_NORMAL_ACTION"
97+
},
98+
{
99+
"Type": "Y",
100+
"Name": "Trigger the Override Text if NotActionable",
101+
"Description": "If person has the ICB value Scenario_2",
102+
"Priority": 3000,
103+
"AttributeLevel": "PERSON",
104+
"AttributeName": "ICB",
105+
"Operator": "=",
106+
"Comparator": "Scenario_2",
107+
"CommsRouting": "STATUS_TEXT_OVERRIDE_NOT_ACTIONABLE"
108+
},
109+
{
110+
"Type": "X",
111+
"Name": "Trigger the Override Text if NotEligible",
112+
"Description": "If they are a member of one of the cohorts in the Comparator",
113+
"Priority": 4000,
114+
"AttributeLevel": "COHORT",
115+
"AttributeName": "COHORT_LABEL",
116+
"Operator": "MemberOf",
117+
"Comparator": "covid_16+_immunosuppression,covid_under16_immunosuppression",
118+
"CommsRouting": "STATUS_TEXT_OVERRIDE_NOT_ELIGIBLE|OTHER_NORMAL_ACTION"
119+
}
120+
],
121+
"ActionsMapper": {
122+
"OTHER_NORMAL_ACTION": {
123+
"ExternalRoutingCode": "OtherNormalAction",
124+
"ActionDescription": "Other Normal Action",
125+
"ActionType": "InfoText",
126+
"UrlLink": null,
127+
"UrlLabel": ""
128+
},
129+
"DEFAULT_CONFIG_LEVEL_ROUTING": {
130+
"ExternalRoutingCode": "CONFIG_LEVEL_ROUTING_ExternalRoutingCode",
131+
"ActionDescription": "CONFIG_LEVEL_ROUTING_ActionDescription",
132+
"ActionType": "CONFIG_LEVEL_ROUTING_UrlLabel",
133+
"UrlLink": "https://www.nhs.uk/default_url/",
134+
"UrlLabel": "CONFIG_LEVEL_ROUTING_UrlLabel"
135+
},
136+
"DEFAULT_ACTIONABLE_ROUTING": {
137+
"ExternalRoutingCode": "DEFAULT_ACTIONABLE_ExternalRoutingCode",
138+
"ActionDescription": "DEFAULT_ACTIONABLE_ActionDescription",
139+
"ActionType": "DEFAULT_ACTIONABLE__UrlLabel",
140+
"UrlLink": "https://www.nhs.uk/default_url/",
141+
"UrlLabel": "DEFAULT_ACTIONABLE__UrlLabel"
142+
},
143+
"DEFAULT_NOTACTIONABLE_ROUTING": {
144+
"ExternalRoutingCode": "DEFAULT_NOTACTIONABLE_ExternalRoutingCode",
145+
"ActionDescription": "DEFAULT_NOTACTIONABLE_ActionDescription",
146+
"ActionType": "DEFAULT_NOTACTIONABLE_UrlLabel",
147+
"UrlLink": "https://www.nhs.uk/default_url/",
148+
"UrlLabel": "DEFAULT_NOTACTIONABLE_UrlLabel"
149+
},
150+
"STATUS_TEXT_OVERRIDE_ACTIONABLE": {
151+
"ExternalRoutingCode": "StatusTextOverrideActionable",
152+
"ActionDescription": "Status Text Override Actionable",
153+
"ActionType": "norender_StatusTextOverride",
154+
"UrlLink": "https://www.nhs.uk/actionable_overide/",
155+
"UrlLabel": "actionable_overide"
156+
},
157+
"STATUS_TEXT_OVERRIDE_NOT_ACTIONABLE": {
158+
"ExternalRoutingCode": "StatusTextOverrideNotActionable",
159+
"ActionDescription": "Status Text Override Not Actionable",
160+
"ActionType": "norender_StatusTextOverride",
161+
"UrlLink": "https://www.nhs.uk/notactionable_overide/",
162+
"UrlLabel": "notactionable_overide"
163+
},
164+
"STATUS_TEXT_OVERRIDE_NOT_ELIGIBLE": {
165+
"ExternalRoutingCode": "StatusTextOverrideNotEligible",
166+
"ActionDescription": "Status Text Override Not Eligible",
167+
"ActionType": "norender_StatusTextOverride",
168+
"UrlLink": "https://www.nhs.uk/noteligible_overide/",
169+
"UrlLabel": "noteligible_overide"
170+
}
171+
}
172+
}
173+
]
174+
}
175+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"scenario_name": "ELI-727 - Actionable - Status Override - includeActions Y",
3+
"request_headers": {
4+
"nhs-login-nhs-number": "9000072701",
5+
"nhsd-End-User-Organisation-ods": "elid_automation_status_text_override"
6+
},
7+
"query_params": {
8+
"includeActions": "Y"
9+
},
10+
"config_filenames": [
11+
"AUTO_ELI-727.json"
12+
],
13+
"data": [
14+
{
15+
"NHS_NUMBER": "9000072701",
16+
"ATTRIBUTE_TYPE": "PERSON",
17+
"DATE_OF_BIRTH": "<<DATE_AGE_75>>",
18+
"ICB": "Scenario_1"
19+
},
20+
{
21+
"NHS_NUMBER": "9000072701",
22+
"ATTRIBUTE_TYPE": "COHORTS",
23+
"COHORT_MEMBERSHIPS": [
24+
{
25+
"COHORT_LABEL": "cohort_1",
26+
"DATE_JOINED": "20240101"
27+
}
28+
]
29+
},
30+
{
31+
"NHS_NUMBER": "9000072701",
32+
"ATTRIBUTE_TYPE": "COVID"
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)