This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/deal-with-misssing-GM-archived-data_V2 (#4598)
* feat(municipality-restructuring): change the schema to remove minItems; * feat(municipality-restructuring): create empty graph version * feat(municipality-restructuring): simplified empty data objects approach; fixed TS/compilation issues; Co-authored-by: VWSCoronaDashboard26 <[email protected]>
- Loading branch information
1 parent
4492804
commit 3482369
Showing
4 changed files
with
68 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
packages/app/src/data/gm/vaccinations/empty-coverage-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters