Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
feat: update vr and gm schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-ozaynaci committed Nov 23, 2022
1 parent 1aaac6a commit b4f33c1
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 60 deletions.
51 changes: 31 additions & 20 deletions packages/app/schema/gm/vaccine_coverage_per_age_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,53 @@
"additionalProperties": false,
"type": "object",
"required": [
"age_group_range",
"autumn_2022_vaccinated_percentage",
"fully_vaccinated_percentage",
"autumn_2022_vaccinated_percentage_label",
"fully_vaccinated_percentage_label",
"birthyear_range",
"vaccination_type",
"birthyear_range_12_plus",
"birthyear_range_18_plus",
"birthyear_range_60_plus",
"vaccinated_percentage_12_plus",
"vaccinated_percentage_12_plus_label",
"vaccinated_percentage_18_plus",
"vaccinated_percentage_18_plus_label",
"vaccinated_percentage_60_plus",
"vaccinated_percentage_60_plus_label",
"date_of_insertion_unix",
"date_unix"
],
"properties": {
"age_group_range": {
"type": "string",
"enum": ["12+", "18+", "60+"]
},
"autumn_2022_vaccinated_percentage": {
"type": ["integer", "null"]
"vaccination_type": {
"type": "string"
},
"fully_vaccinated_percentage": {
"type": ["integer", "null"]
"birthyear_range_12_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"booster_shot_percentage": {
"type": ["integer", "null"]
"birthyear_range_18_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"birthyear_range": {
"birthyear_range_60_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"autumn_2022_vaccinated_percentage_label": {
"vaccinated_percentage_12_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_12_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"fully_vaccinated_percentage_label": {
"vaccinated_percentage_18_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_18_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"booster_shot_percentage_label": {
"vaccinated_percentage_60_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_60_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
Expand Down
51 changes: 31 additions & 20 deletions packages/app/schema/vr/vaccine_coverage_per_age_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,53 @@
"additionalProperties": false,
"type": "object",
"required": [
"age_group_range",
"autumn_2022_vaccinated_percentage",
"fully_vaccinated_percentage",
"autumn_2022_vaccinated_percentage_label",
"fully_vaccinated_percentage_label",
"birthyear_range",
"vaccination_type",
"birthyear_range_12_plus",
"birthyear_range_18_plus",
"birthyear_range_60_plus",
"vaccinated_percentage_12_plus",
"vaccinated_percentage_12_plus_label",
"vaccinated_percentage_18_plus",
"vaccinated_percentage_18_plus_label",
"vaccinated_percentage_60_plus",
"vaccinated_percentage_60_plus_label",
"date_of_insertion_unix",
"date_unix"
],
"properties": {
"age_group_range": {
"type": "string",
"enum": ["12+", "18+", "60+"]
},
"autumn_2022_vaccinated_percentage": {
"type": ["integer", "null"]
"vaccination_type": {
"type": "string"
},
"fully_vaccinated_percentage": {
"type": ["integer", "null"]
"birthyear_range_12_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"booster_shot_percentage": {
"type": ["integer", "null"]
"birthyear_range_18_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"birthyear_range": {
"birthyear_range_60_plus": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}$|^-[0-9]{4}$|^[0-9]{4}-$"
},
"autumn_2022_vaccinated_percentage_label": {
"vaccinated_percentage_12_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_12_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"fully_vaccinated_percentage_label": {
"vaccinated_percentage_18_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_18_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
"booster_shot_percentage_label": {
"vaccinated_percentage_60_plus": {
"type": ["number", "null"]
},
"vaccinated_percentage_60_plus_label": {
"type": ["string", "null"],
"pattern": "^([><][=][0-9]{1,2})$"
},
Expand Down
44 changes: 24 additions & 20 deletions packages/common/src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,16 @@ export interface GmVaccineCoveragePerAgeGroup {
values: GmVaccineCoveragePerAgeGroupValue[];
}
export interface GmVaccineCoveragePerAgeGroupValue {
age_group_range: '12+' | '18+' | '60+';
autumn_2022_vaccinated_percentage: number | null;
fully_vaccinated_percentage: number | null;
booster_shot_percentage?: number | null;
birthyear_range: string;
autumn_2022_vaccinated_percentage_label: string | null;
fully_vaccinated_percentage_label: string | null;
booster_shot_percentage_label?: string | null;
vaccination_type: string;
birthyear_range_12_plus: string;
birthyear_range_18_plus: string;
birthyear_range_60_plus: string;
vaccinated_percentage_12_plus: number | null;
vaccinated_percentage_12_plus_label: string | null;
vaccinated_percentage_18_plus: number | null;
vaccinated_percentage_18_plus_label: string | null;
vaccinated_percentage_60_plus: number | null;
vaccinated_percentage_60_plus_label: string | null;
date_unix: number;
date_of_insertion_unix: number;
}
Expand Down Expand Up @@ -208,9 +210,9 @@ export interface GmCollectionVaccineCoveragePerAgeGroup {
vaccinated_percentage_12_plus: number | null;
vaccinated_percentage_12_plus_label: string | null;
vaccinated_percentage_18_plus: number | null;
vaccinated_percentage_18_plus_label?: string | null;
vaccinated_percentage_18_plus_label: string | null;
vaccinated_percentage_60_plus: number | null;
vaccinated_percentage_60_plus_label?: string | null;
vaccinated_percentage_60_plus_label: string | null;
date_unix: number;
date_of_insertion_unix: number;
}
Expand Down Expand Up @@ -1637,14 +1639,16 @@ export interface VrVaccineCoveragePerAgeGroup {
values: VrVaccineCoveragePerAgeGroupValue[];
}
export interface VrVaccineCoveragePerAgeGroupValue {
age_group_range: '12+' | '18+' | '60+';
autumn_2022_vaccinated_percentage: number | null;
fully_vaccinated_percentage: number | null;
booster_shot_percentage?: number | null;
birthyear_range: string;
autumn_2022_vaccinated_percentage_label: string | null;
fully_vaccinated_percentage_label: string | null;
booster_shot_percentage_label?: string | null;
vaccination_type: string;
birthyear_range_12_plus: string;
birthyear_range_18_plus: string;
birthyear_range_60_plus: string;
vaccinated_percentage_12_plus: number | null;
vaccinated_percentage_12_plus_label: string | null;
vaccinated_percentage_18_plus: number | null;
vaccinated_percentage_18_plus_label: string | null;
vaccinated_percentage_60_plus: number | null;
vaccinated_percentage_60_plus_label: string | null;
date_unix: number;
date_of_insertion_unix: number;
}
Expand Down Expand Up @@ -1822,9 +1826,9 @@ export interface VrCollectionVaccineCoveragePerAgeGroup {
vaccinated_percentage_12_plus: number | null;
vaccinated_percentage_12_plus_label: string | null;
vaccinated_percentage_18_plus: number | null;
vaccinated_percentage_18_plus_label?: string | null;
vaccinated_percentage_18_plus_label: string | null;
vaccinated_percentage_60_plus: number | null;
vaccinated_percentage_60_plus_label?: string | null;
vaccinated_percentage_60_plus_label: string | null;
date_unix: number;
date_of_insertion_unix: number;
}

0 comments on commit b4f33c1

Please sign in to comment.