From 172d7953eb88614657795af130188720ddc153b2 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard18 <93984341+VWSCoronaDashboard18@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:39:39 +0100 Subject: [PATCH 1/6] solve accepting empty array --- packages/app/schema/gm/booster_coverage_archived_20220904.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/app/schema/gm/booster_coverage_archived_20220904.json b/packages/app/schema/gm/booster_coverage_archived_20220904.json index 43cf6de9a7..ef6c3ba31f 100644 --- a/packages/app/schema/gm/booster_coverage_archived_20220904.json +++ b/packages/app/schema/gm/booster_coverage_archived_20220904.json @@ -12,7 +12,6 @@ } } }, - "required": ["values"], "additionalProperties": false, "definitions": { "value": { From 87d25f7c46ad50bd6f82780fdee9042c465b65f6 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard18 <93984341+VWSCoronaDashboard18@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:39:11 +0100 Subject: [PATCH 2/6] feat: Change the schema from unrequired values to no minimum amount. And update the archived section on the GM page to alow for now data. --- .../booster_coverage_archived_20220904.json | 2 +- .../src/pages/gemeente/[code]/vaccinaties.tsx | 106 ++++++++++-------- 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/packages/app/schema/gm/booster_coverage_archived_20220904.json b/packages/app/schema/gm/booster_coverage_archived_20220904.json index ef6c3ba31f..d59085231e 100644 --- a/packages/app/schema/gm/booster_coverage_archived_20220904.json +++ b/packages/app/schema/gm/booster_coverage_archived_20220904.json @@ -5,13 +5,13 @@ "properties": { "values": { "type": "array", - "minItems": 1, "maxItems": 2, "items": { "$ref": "#/definitions/value" } } }, + "required": ["values"], "additionalProperties": false, "definitions": { "value": { diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index d92fd82f21..490b509635 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -107,8 +107,8 @@ export const VaccinationsGmPage = (props: StaticProps) => const filteredArchivedAgeGroup18Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '18+'); const filteredArchivedAgeGroup12Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '12+'); - assert(filteredArchivedAgeGroup18Plus, `[${VaccinationsGmPage.name}] Could not find data for the archived vaccine coverage per age group for the age 18+`); - assert(filteredArchivedAgeGroup12Plus, `[${VaccinationsGmPage.name}] Could not find data for the archived vaccine coverage per age group for the age 12+`); + const hasArchivedAgeGroupData = !!(filteredArchivedAgeGroup12Plus && filteredArchivedAgeGroup18Plus); + const hasArchivedBoosterData = !!(boosterCoverage18PlusArchivedValue && boosterCoverage12PlusArchivedValue); const lastInsertionDateOfPage = getLastInsertionDateOfPage(data, pageMetrics); @@ -210,55 +210,63 @@ export const VaccinationsGmPage = (props: StaticProps) => }, }} /> - - setHideArchivedCharts(!hasHideArchivedCharts)} - /> - {hasHideArchivedCharts && ( + {hasArchivedAgeGroupData && hasArchivedBoosterData && ( <> - - + setHideArchivedCharts(!hasHideArchivedCharts)} /> + {hasHideArchivedCharts && ( + <> + {hasArchivedAgeGroupData && hasArchivedBoosterData && ( + + )} + {hasArchivedBoosterData && ( + + )} + + )} )} From 3e457b89a20e99e22994c7d50c6ec74f9065065a Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard18 <93984341+VWSCoronaDashboard18@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:36:10 +0100 Subject: [PATCH 3/6] feat: create empty graph version --- .../src/pages/gemeente/[code]/vaccinaties.tsx | 191 ++++++++++++------ 1 file changed, 129 insertions(+), 62 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index 490b509635..842ae9ed42 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -98,17 +98,93 @@ export const VaccinationsGmPage = (props: StaticProps) => autumn2022: data.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'autumn_2022'), }; + const emptyArchivedData = { + booster_coverage_archived_20220904: { + values: [ + { + age_group: '12+', + percentage: null, + percentage_label: null, + date_of_insertion_unix: null, + date_unix: null, + }, + { + age_group: '18+', + percentage: null, + percentage_label: null, + date_of_insertion_unix: null, + date_unix: null, + }, + ], + }, + vaccine_coverage_per_age_group_archived: { + values: [ + { + date_unix: null, + age_group_range: '18+', + birthyear_range: '-2003', + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + date_of_insertion_unix: null, + }, + { + date_unix: null, + age_group_range: '12+', + birthyear_range: '-2009', + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + date_of_insertion_unix: null, + }, + ], + }, + vaccine_coverage_per_age_group_archived_20220908: { + values: [ + { + date_unix: null, + age_group_range: '18+', + birthyear_range: '-2004', + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + booster_shot_percentage: null, + booster_shot_percentage_label: null, + date_of_insertion_unix: null, + }, + { + date_unix: null, + age_group_range: '12+', + birthyear_range: '-2010', + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + booster_shot_percentage: null, + booster_shot_percentage_label: null, + date_of_insertion_unix: null, + }, + ], + }, + }; + assert(filteredVaccination.primarySeries, `[${VaccinationsGmPage.name}] Could not find data for the vaccine coverage per age group for the primary series`); assert(filteredVaccination.autumn2022, `[${VaccinationsGmPage.name}] Could not find data for the vaccine coverage per age group for the autumn 2022 series`); - const boosterCoverage18PlusArchivedValue = data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '18+'); - const boosterCoverage12PlusArchivedValue = data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '12+'); - - const filteredArchivedAgeGroup18Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '18+'); - const filteredArchivedAgeGroup12Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '12+'); + const boosterCoverage18PlusArchivedValue = + data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '18+') || emptyArchivedData.booster_coverage_archived_20220904.values[1]; + const boosterCoverage12PlusArchivedValue = + data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '12+') || emptyArchivedData.booster_coverage_archived_20220904.values[0]; - const hasArchivedAgeGroupData = !!(filteredArchivedAgeGroup12Plus && filteredArchivedAgeGroup18Plus); - const hasArchivedBoosterData = !!(boosterCoverage18PlusArchivedValue && boosterCoverage12PlusArchivedValue); + const filteredArchivedAgeGroup18Plus = + data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '18+') || + emptyArchivedData.vaccine_coverage_per_age_group_archived_20220908.values[0]; + const filteredArchivedAgeGroup12Plus = + data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '12+') || + emptyArchivedData.vaccine_coverage_per_age_group_archived_20220908.values[1]; const lastInsertionDateOfPage = getLastInsertionDateOfPage(data, pageMetrics); @@ -210,63 +286,54 @@ export const VaccinationsGmPage = (props: StaticProps) => }, }} /> - {hasArchivedAgeGroupData && hasArchivedBoosterData && ( + + setHideArchivedCharts(!hasHideArchivedCharts)} + /> + {hasHideArchivedCharts && ( <> - - setHideArchivedCharts(!hasHideArchivedCharts)} + + - {hasHideArchivedCharts && ( - <> - {hasArchivedAgeGroupData && hasArchivedBoosterData && ( - - )} - {hasArchivedBoosterData && ( - - )} - - )} )} From 7bac09bd6327255ceaff69f7eeb883cbfb2906b2 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard26 Date: Fri, 6 Jan 2023 15:27:12 +0100 Subject: [PATCH 4/6] feat(municipality-restructuring): simplified empty data objects approach; fixed TS/compilation issues; --- .../vaccine/vaccine-coverage-toggle-tile.tsx | 76 ++++--------------- .../src/pages/gemeente/[code]/vaccinaties.tsx | 58 ++++++-------- 2 files changed, 36 insertions(+), 98 deletions(-) diff --git a/packages/app/src/domain/vaccine/vaccine-coverage-toggle-tile.tsx b/packages/app/src/domain/vaccine/vaccine-coverage-toggle-tile.tsx index b3e291a05f..2b607678c7 100644 --- a/packages/app/src/domain/vaccine/vaccine-coverage-toggle-tile.tsx +++ b/packages/app/src/domain/vaccine/vaccine-coverage-toggle-tile.tsx @@ -13,10 +13,7 @@ import { useIntl } from '~/intl'; import { SiteText } from '~/locale'; import { assert } from '~/utils/assert'; import { replaceVariablesInText } from '~/utils/replace-variables-in-text'; -import { - KeyWithLabel, - useVaccineCoveragePercentageFormatter, -} from './logic/use-vaccine-coverage-percentage-formatter'; +import { KeyWithLabel, useVaccineCoveragePercentageFormatter } from './logic/use-vaccine-coverage-percentage-formatter'; type AgeTypes = { fully_vaccinated: number | null; @@ -49,7 +46,7 @@ interface VaccineCoverageToggleTileProps { descriptionFooter: string; age18Plus: AgeTypes; age12Plus: AgeTypes; - dateUnix: number; + dateUnix: number | null; numFractionDigits?: number; age12PlusToggleText: VaccinationGradeToggleTypes; age18PlusToggleText: VaccinationGradeToggleTypes; @@ -71,7 +68,7 @@ export function VaccineCoverageToggleTile({ const [selectedTab, setSelectedTab] = useState(age18PlusToggleText.label); const metadata: MetadataProps = { - date: dateUnix, + date: dateUnix ?? undefined, source: source, }; @@ -104,21 +101,10 @@ export function VaccineCoverageToggleTile({ description={age18PlusToggleText.description_booster_grade} numFractionDigits={numFractionDigits} > - {age18Plus.dateUnixBoostered && ( - - )} + {age18Plus.dateUnixBoostered && } ) : ( - + )} {metadata && } @@ -145,21 +129,10 @@ export function VaccineCoverageToggleTile({ description={age12PlusToggleText.description_booster_grade} numFractionDigits={numFractionDigits} > - {age12Plus.dateUnixBoostered && ( - - )} + {age12Plus.dateUnixBoostered && } ) : ( - + )} {metadata && } @@ -195,26 +166,13 @@ interface AgeGroupBlockProps { children?: React.ReactNode; } -function AgeGroupBlock({ - title, - data, - property, - secondProperty, - description, - secondDescription, - numFractionDigits, - children, -}: AgeGroupBlockProps) { +function AgeGroupBlock({ title, data, property, secondProperty, description, secondDescription, numFractionDigits, children }: AgeGroupBlockProps) { const { commonTexts } = useIntl(); - const formatCoveragePercentage = - useVaccineCoveragePercentageFormatter(numFractionDigits); + const formatCoveragePercentage = useVaccineCoveragePercentageFormatter(numFractionDigits); const parsedBirthyearRange = parseBirthyearRange(data.birthyear); - assert( - parsedBirthyearRange, - `[${AgeGroupBlock.name}] Something went wrong with parsing the birthyear: ${data.birthyear}` - ); + assert(parsedBirthyearRange, `[${AgeGroupBlock.name}] Something went wrong with parsing the birthyear: ${data.birthyear}`); return ( @@ -228,19 +186,13 @@ function AgeGroupBlock({ {secondDescription && secondProperty && ( diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index 842ae9ed42..1c63d8385d 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -98,74 +98,60 @@ export const VaccinationsGmPage = (props: StaticProps) => autumn2022: data.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'autumn_2022'), }; + const emptyBoosterCoverageValue = { + percentage: null, + percentage_label: null, + date_of_insertion_unix: null, + date_unix: undefined, + }; + + const emptyVaccineCoveragePerAgeGroupValue = { + date_unix: null, + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + date_of_insertion_unix: null, + }; + const emptyArchivedData = { booster_coverage_archived_20220904: { values: [ { age_group: '12+', - percentage: null, - percentage_label: null, - date_of_insertion_unix: null, - date_unix: null, + ...emptyBoosterCoverageValue, }, { age_group: '18+', - percentage: null, - percentage_label: null, - date_of_insertion_unix: null, - date_unix: null, + ...emptyBoosterCoverageValue, }, ], }, vaccine_coverage_per_age_group_archived: { values: [ { - date_unix: null, age_group_range: '18+', birthyear_range: '-2003', - has_one_shot_percentage: null, - has_one_shot_percentage_label: null, - fully_vaccinated_percentage: null, - fully_vaccinated_percentage_label: null, - date_of_insertion_unix: null, + ...emptyVaccineCoveragePerAgeGroupValue, }, { - date_unix: null, age_group_range: '12+', birthyear_range: '-2009', - has_one_shot_percentage: null, - has_one_shot_percentage_label: null, - fully_vaccinated_percentage: null, - fully_vaccinated_percentage_label: null, - date_of_insertion_unix: null, + ...emptyVaccineCoveragePerAgeGroupValue, }, ], }, vaccine_coverage_per_age_group_archived_20220908: { values: [ { - date_unix: null, age_group_range: '18+', birthyear_range: '-2004', - has_one_shot_percentage: null, - has_one_shot_percentage_label: null, - fully_vaccinated_percentage: null, - fully_vaccinated_percentage_label: null, - booster_shot_percentage: null, - booster_shot_percentage_label: null, - date_of_insertion_unix: null, + ...emptyVaccineCoveragePerAgeGroupValue, }, { - date_unix: null, age_group_range: '12+', birthyear_range: '-2010', - has_one_shot_percentage: null, - has_one_shot_percentage_label: null, - fully_vaccinated_percentage: null, - fully_vaccinated_percentage_label: null, - booster_shot_percentage: null, - booster_shot_percentage_label: null, - date_of_insertion_unix: null, + ...emptyVaccineCoveragePerAgeGroupValue, }, ], }, From 28b853f2726a4764f20f3490274464e7bc7ab546 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard26 Date: Fri, 6 Jan 2023 15:34:02 +0100 Subject: [PATCH 5/6] --amend --- .../src/pages/gemeente/[code]/vaccinaties.tsx | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index 1c63d8385d..b3b884a5c9 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -117,42 +117,20 @@ export const VaccinationsGmPage = (props: StaticProps) => const emptyArchivedData = { booster_coverage_archived_20220904: { values: [ - { - age_group: '12+', - ...emptyBoosterCoverageValue, - }, - { - age_group: '18+', - ...emptyBoosterCoverageValue, - }, + { age_group: '12+', ...emptyBoosterCoverageValue }, + { age_group: '18+', ...emptyBoosterCoverageValue }, ], }, vaccine_coverage_per_age_group_archived: { values: [ - { - age_group_range: '18+', - birthyear_range: '-2003', - ...emptyVaccineCoveragePerAgeGroupValue, - }, - { - age_group_range: '12+', - birthyear_range: '-2009', - ...emptyVaccineCoveragePerAgeGroupValue, - }, + { age_group_range: '18+', birthyear_range: '-2003', ...emptyVaccineCoveragePerAgeGroupValue }, + { age_group_range: '12+', birthyear_range: '-2009', ...emptyVaccineCoveragePerAgeGroupValue }, ], }, vaccine_coverage_per_age_group_archived_20220908: { values: [ - { - age_group_range: '18+', - birthyear_range: '-2004', - ...emptyVaccineCoveragePerAgeGroupValue, - }, - { - age_group_range: '12+', - birthyear_range: '-2010', - ...emptyVaccineCoveragePerAgeGroupValue, - }, + { age_group_range: '18+', birthyear_range: '-2004', ...emptyVaccineCoveragePerAgeGroupValue }, + { age_group_range: '12+', birthyear_range: '-2010', ...emptyVaccineCoveragePerAgeGroupValue }, ], }, }; @@ -315,6 +293,7 @@ export const VaccinationsGmPage = (props: StaticProps) => description={textGm.vaccination_coverage.description} sortingOrder={['18+', '12+']} metadata={{ + date: data.vaccine_coverage_per_age_group_archived.values.length ? data.vaccine_coverage_per_age_group_archived.values[0].date_unix : undefined, source: textGm.vaccination_coverage.bronnen.rivm, }} values={data.vaccine_coverage_per_age_group_archived.values} From 9f13d5f2e41d850c083c167fcbd68046abb170cf Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard26 Date: Fri, 6 Jan 2023 17:36:51 +0100 Subject: [PATCH 6/6] feat(municipality-restructuring): applied PR feedback and cleaned up a bit; --- .../gm/vaccinations/empty-coverage-data.ts | 42 +++++++++++++++++ .../src/pages/gemeente/[code]/vaccinaties.tsx | 46 ++----------------- 2 files changed, 47 insertions(+), 41 deletions(-) create mode 100644 packages/app/src/data/gm/vaccinations/empty-coverage-data.ts diff --git a/packages/app/src/data/gm/vaccinations/empty-coverage-data.ts b/packages/app/src/data/gm/vaccinations/empty-coverage-data.ts new file mode 100644 index 0000000000..085807a85b --- /dev/null +++ b/packages/app/src/data/gm/vaccinations/empty-coverage-data.ts @@ -0,0 +1,42 @@ +// This file was introduced as part of COR-1226 which covers the municipality reorganisation of 2023. +// During this reorganisation, three municipalities (GMs) have been merged into a single GM, specifically +// GM0501, GM0530 and GM0614 became GM1992. This reorganisation resulted in missing coverage data +// for both booster vaccinations as well as base vaccinations. This file combats the missing data by +// generating 'empty' data objects with no values. + +const emptyBoosterCoverageValue = { + percentage: null, + percentage_label: null, + date_of_insertion_unix: null, + date_unix: undefined, +}; + +const emptyVaccineCoveragePerAgeGroupValue = { + has_one_shot_percentage: null, + has_one_shot_percentage_label: null, + fully_vaccinated_percentage: null, + fully_vaccinated_percentage_label: null, + date_of_insertion_unix: null, + date_unix: null, +}; + +export const emptyCoverageData = { + booster_coverage_archived_20220904: { + values: [ + { age_group: '12+', ...emptyBoosterCoverageValue }, + { age_group: '18+', ...emptyBoosterCoverageValue }, + ], + }, + vaccine_coverage_per_age_group_archived: { + values: [ + { age_group_range: '18+', birthyear_range: '-2003', ...emptyVaccineCoveragePerAgeGroupValue }, + { age_group_range: '12+', birthyear_range: '-2009', ...emptyVaccineCoveragePerAgeGroupValue }, + ], + }, + vaccine_coverage_per_age_group_archived_20220908: { + values: [ + { age_group_range: '18+', birthyear_range: '-2004', ...emptyVaccineCoveragePerAgeGroupValue }, + { age_group_range: '12+', birthyear_range: '-2010', ...emptyVaccineCoveragePerAgeGroupValue }, + ], + }, +}; diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index b3b884a5c9..9c366b826b 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -18,6 +18,7 @@ import { assert, replaceVariablesInText, useReverseRouter, useFormatLokalizePerc import { getLastInsertionDateOfPage } from '~/utils/get-last-insertion-date-of-page'; import { useDynamicLokalizeTexts } from '~/utils/cms/use-dynamic-lokalize-texts'; import { VaccineCoverageChoroplethVrAndGm } from '~/domain/vaccine/vaccine-coverage-choropleth_vr_and_gm'; +import { emptyCoverageData } from '~/data/gm/vaccinations/empty-coverage-data'; const pageMetrics = ['vaccine_coverage_per_age_group', 'vaccine_coverage_per_age_group_archived', 'booster_coverage_archived_20220904']; @@ -98,57 +99,20 @@ export const VaccinationsGmPage = (props: StaticProps) => autumn2022: data.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'autumn_2022'), }; - const emptyBoosterCoverageValue = { - percentage: null, - percentage_label: null, - date_of_insertion_unix: null, - date_unix: undefined, - }; - - const emptyVaccineCoveragePerAgeGroupValue = { - date_unix: null, - has_one_shot_percentage: null, - has_one_shot_percentage_label: null, - fully_vaccinated_percentage: null, - fully_vaccinated_percentage_label: null, - date_of_insertion_unix: null, - }; - - const emptyArchivedData = { - booster_coverage_archived_20220904: { - values: [ - { age_group: '12+', ...emptyBoosterCoverageValue }, - { age_group: '18+', ...emptyBoosterCoverageValue }, - ], - }, - vaccine_coverage_per_age_group_archived: { - values: [ - { age_group_range: '18+', birthyear_range: '-2003', ...emptyVaccineCoveragePerAgeGroupValue }, - { age_group_range: '12+', birthyear_range: '-2009', ...emptyVaccineCoveragePerAgeGroupValue }, - ], - }, - vaccine_coverage_per_age_group_archived_20220908: { - values: [ - { age_group_range: '18+', birthyear_range: '-2004', ...emptyVaccineCoveragePerAgeGroupValue }, - { age_group_range: '12+', birthyear_range: '-2010', ...emptyVaccineCoveragePerAgeGroupValue }, - ], - }, - }; - assert(filteredVaccination.primarySeries, `[${VaccinationsGmPage.name}] Could not find data for the vaccine coverage per age group for the primary series`); assert(filteredVaccination.autumn2022, `[${VaccinationsGmPage.name}] Could not find data for the vaccine coverage per age group for the autumn 2022 series`); const boosterCoverage18PlusArchivedValue = - data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '18+') || emptyArchivedData.booster_coverage_archived_20220904.values[1]; + data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '18+') || emptyCoverageData.booster_coverage_archived_20220904.values[1]; const boosterCoverage12PlusArchivedValue = - data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '12+') || emptyArchivedData.booster_coverage_archived_20220904.values[0]; + data.booster_coverage_archived_20220904?.values?.find((v) => v.age_group === '12+') || emptyCoverageData.booster_coverage_archived_20220904.values[0]; const filteredArchivedAgeGroup18Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '18+') || - emptyArchivedData.vaccine_coverage_per_age_group_archived_20220908.values[0]; + emptyCoverageData.vaccine_coverage_per_age_group_archived_20220908.values[0]; const filteredArchivedAgeGroup12Plus = data.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '12+') || - emptyArchivedData.vaccine_coverage_per_age_group_archived_20220908.values[1]; + emptyCoverageData.vaccine_coverage_per_age_group_archived_20220908.values[1]; const lastInsertionDateOfPage = getLastInsertionDateOfPage(data, pageMetrics);