generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathageBasedHub.tsx
More file actions
173 lines (169 loc) · 7.12 KB
/
ageBasedHub.tsx
File metadata and controls
173 lines (169 loc) · 7.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import HubWarningCallout from "@src/app/_components/hub/HubWarningCallout";
import { TransitionLink } from "@src/app/_components/navigation/TransitionLink";
import { AgeGroup } from "@src/models/ageGroup";
import { VaccineInfo, VaccineType } from "@src/models/vaccine";
import { JSX } from "react";
export type VaccineCardDetails = {
vaccineName: VaccineType;
cardLinkDescription: string;
};
export type AgeBasedHubDetails = {
heading: string;
vaccines: VaccineCardDetails[];
showPregnancyHubContent: boolean;
styledWarningCallout?: JSX.Element;
};
const AgeBasedHubInfo: Record<AgeGroup, AgeBasedHubDetails | undefined> = {
AGE_12_to_16: {
heading: "Routine vaccines for children and teenagers aged 12 to 16",
vaccines: [
{ vaccineName: VaccineType.HPV, cardLinkDescription: "School year 8" },
{ vaccineName: VaccineType.MENACWY, cardLinkDescription: "School year 9" },
{ vaccineName: VaccineType.TD_IPV_3_IN_1, cardLinkDescription: "School year 9" },
{
vaccineName: VaccineType.FLU_FOR_SCHOOL_AGED_CHILDREN,
cardLinkDescription: "Annually, during autumn or winter",
},
],
showPregnancyHubContent: true,
},
AGE_17_to_24: {
heading: "Routine vaccines for young people aged 17 to 24",
vaccines: [],
showPregnancyHubContent: true,
styledWarningCallout: (
<HubWarningCallout
heading={"Are you up to date?"}
content={
<>
<p>
People in this age group should make sure they're up to date with their vaccinations. You can ask your
GP about getting vaccines you might have missed. Make sure you've had:
</p>
<ul style={{ marginBottom: 0 }}>
<li>
2 doses of the{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.MMR].urlPath}`}
>
MMR vaccine
</TransitionLink>{" "}
– which protects against measles, mumps and rubella. If you have not previously had 2 doses of MMR, you
can still have the vaccine at any age.
</li>
<li>
The completed course of{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.TD_IPV_3_IN_1].urlPath}`}
>
Td/IPV vaccine
</TransitionLink>{" "}
(also called the 3-in-1 teenage booster) - which protects against tetanus, diphtheria and polio. You can
ask for this at any age.
</li>
<li>
The{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.HPV].urlPath}`}
>
HPV vaccine
</TransitionLink>{" "}
– which helps protect against genital warts and cancers caused by the human papilloma virus (HPV), such
as cervical cancer. You can ask for this until your 25th birthday.
</li>
<li>
The{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.MENACWY].urlPath}`}
>
MenACWY vaccine
</TransitionLink>{" "}
– which protects against serious infections including meningitis. You can ask for this until your 25th
birthday.
</li>
</ul>
</>
}
/>
),
},
AGE_25_to_64: {
heading: "Routine vaccines for adults aged 25 to 64",
vaccines: [],
showPregnancyHubContent: true,
styledWarningCallout: (
<HubWarningCallout
heading={"Are you up to date?"}
content={
<>
<p>
People in this age group should make sure they're up to date with their vaccinations. You can ask your
GP about getting vaccines you might have missed. Make sure you've had:
</p>
<ul style={{ marginBottom: 0 }}>
<li>
2 doses of the{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.MMR].urlPath}`}
>
MMR vaccine
</TransitionLink>{" "}
– which protects against measles, mumps and rubella. If you have not previously had 2 doses of MMR, you
can still have the vaccine at any age.
</li>
<li>
The completed course of{" "}
<TransitionLink
className={"nhsuk-link nhsuk-link--no-visited-state"}
href={`/vaccines/${VaccineInfo[VaccineType.TD_IPV_3_IN_1].urlPath}`}
>
Td/IPV vaccine
</TransitionLink>{" "}
- which protects against tetanus, diphtheria and polio. You can ask for this at any age.
</li>
</ul>
</>
}
/>
),
},
AGE_65_to_74: {
heading: "Adults aged 65 to 74 should get these routine vaccines",
vaccines: [
{ vaccineName: VaccineType.PNEUMOCOCCAL, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.FLU_FOR_ADULTS, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.SHINGLES, cardLinkDescription: "65 to 67 and 70 to 79 years" },
{ vaccineName: VaccineType.RSV, cardLinkDescription: "If living in a care home for older adults" },
{ vaccineName: VaccineType.COVID_19, cardLinkDescription: "If living in a care home for older adults" },
],
showPregnancyHubContent: false,
},
AGE_75_to_80: {
heading: "Adults aged 75 to 80 should get these routine vaccines",
vaccines: [
{ vaccineName: VaccineType.PNEUMOCOCCAL, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.FLU_FOR_ADULTS, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.SHINGLES, cardLinkDescription: "70 to 79 years" },
{ vaccineName: VaccineType.RSV, cardLinkDescription: "75 years and over" },
{ vaccineName: VaccineType.COVID_19, cardLinkDescription: "75 years and over" },
],
showPregnancyHubContent: false,
},
AGE_81_PLUS: {
heading: "Adults aged 81 and over should get these routine vaccines",
vaccines: [
{ vaccineName: VaccineType.PNEUMOCOCCAL, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.FLU_FOR_ADULTS, cardLinkDescription: "65 years and over" },
{ vaccineName: VaccineType.RSV, cardLinkDescription: "75 years and over" },
{ vaccineName: VaccineType.COVID_19, cardLinkDescription: "75 years and over" },
],
showPregnancyHubContent: false,
},
UNKNOWN_AGE_GROUP: undefined,
};
export { AgeGroup, AgeBasedHubInfo };