Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #82 from ehn-digital-green-development/dgc_to_dcc
Browse files Browse the repository at this point in the history
Digital Green Certificate -> Digital Covid Certificate
  • Loading branch information
kruzikh authored May 27, 2021
2 parents f41726f + b554a25 commit 90ff734
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 78 deletions.
6 changes: 3 additions & 3 deletions DGC.Core.Types.schema.json → DCC.Core.Types.schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://id.uvci.eu/DGC.Core.Types.schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate Core Data Types",
"$id": "https://id.uvci.eu/DCC.Core.Types.schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate Core Data Types",
"$defs": {
"dose_posint": {
"description": "Dose Number / Total doses in Series: positive integer, range: [1,9]",
Expand Down
46 changes: 23 additions & 23 deletions DGC.Types.schema.json → DCC.Types.schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://id.uvci.eu/DGC.Types.schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate Composite Data Types",
"$id": "https://id.uvci.eu/DCC.Types.schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate Composite Data Types",
"$defs": {
"vaccination_entry": {
"description": "Vaccination Entry",
Expand All @@ -22,27 +22,27 @@
"properties": {
"tg": {
"description": "disease or agent targeted",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/disease-agent-targeted"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/disease-agent-targeted"
},
"vp": {
"description": "vaccine or prophylaxis",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/vaccine-prophylaxis"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/vaccine-prophylaxis"
},
"mp": {
"description": "vaccine medicinal product",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/vaccine-medicinal-product"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/vaccine-medicinal-product"
},
"ma": {
"description": "Marketing Authorization Holder - if no MAH present, then manufacturer",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/vaccine-mah-manf"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/vaccine-mah-manf"
},
"dn": {
"description": "Dose Number",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/dose_posint"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/dose_posint"
},
"sd": {
"description": "Total Series of Doses",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/dose_posint"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/dose_posint"
},
"dt": {
"description": "Date of Vaccination",
Expand All @@ -52,15 +52,15 @@
},
"co": {
"description": "Country of Vaccination",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/country_vt"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/country_vt"
},
"is": {
"description": "Certificate Issuer",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/issuer"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/issuer"
},
"ci": {
"description": "Unique Certificate Identifier: UVCI",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/certificate_id"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/certificate_id"
}
}
},
Expand All @@ -79,19 +79,19 @@
"type": "object",
"properties": {
"tg": {
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/disease-agent-targeted"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/disease-agent-targeted"
},
"tt": {
"description": "Type of Test",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/test-type"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/test-type"
},
"nm": {
"description": "NAA Test Name",
"type": "string"
},
"ma": {
"description": "RAT Test name and manufacturer",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/test-manf"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/test-manf"
},
"sc": {
"description": "Date/Time of Sample Collection",
Expand All @@ -100,7 +100,7 @@
},
"tr": {
"description": "Test Result",
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/test-result"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/test-result"
},
"tc": {
"description": "Testing Centre",
Expand All @@ -109,15 +109,15 @@
},
"co": {
"description": "Country of Test",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/country_vt"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/country_vt"
},
"is": {
"description": "Certificate Issuer",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/issuer"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/issuer"
},
"ci": {
"description": "Unique Certificate Identifier, UVCI",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/certificate_id"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/certificate_id"
}
}
},
Expand All @@ -135,7 +135,7 @@
"type": "object",
"properties": {
"tg": {
"$ref": "https://id.uvci.eu/DGC.ValueSets.schema.json#/$defs/disease-agent-targeted"
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/disease-agent-targeted"
},
"fr": {
"description": "ISO 8601 Date of First Positive NAA Test Result",
Expand All @@ -144,11 +144,11 @@
},
"co": {
"description": "Country of Test",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/country_vt"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/country_vt"
},
"is": {
"description": "Certificate Issuer",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/issuer"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/issuer"
},
"df": {
"description": "ISO 8601 Date: Certificate Valid From",
Expand All @@ -162,7 +162,7 @@
},
"ci": {
"description": "Unique Certificate Identifier, UVCI",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/certificate_id"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/certificate_id"
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions DGC.ValueSets.schema.json → DCC.ValueSets.schema.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://id.uvci.eu/DGC.ValueSets.schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate Value Set Data Types",
"$id": "https://id.uvci.eu/DCC.ValueSets.schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate Value Set Data Types",
"$defs": {
"disease-agent-targeted": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.1",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.1",
"type": "string",
"valueset-uri": "valuesets/disease-agent-targeted.json"
},
"vaccine-prophylaxis": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.2",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.2",
"type": "string",
"valueset-uri": "valuesets/vaccine-prophylaxis.json"
},
"vaccine-medicinal-product": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.3",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.3",
"type": "string",
"valueset-uri": "valuesets/vaccine-medicinal-product.json"
},
"vaccine-mah-manf": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.4",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.4",
"type": "string",
"valueset-uri": "valuesets/vaccine-mah-manf.json"
},
"test-manf": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.8",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.8",
"type": "string",
"valueset-uri": "valuesets/test-manf.json"
},
"test-result": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.9",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.9",
"type": "string",
"valueset-uri": "valuesets/test-result.json"
},
"test-type": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.7",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.7",
"type": "string",
"valueset-uri": "valuesets/test-type.json"
}
Expand Down
26 changes: 13 additions & 13 deletions DGC.combined-schema.json → DCC.combined-schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://id.uvci.eu/DGC.combined-schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate",
"$comment": "Schema version 1.2.0",
"$id": "https://id.uvci.eu/DCC.combined-schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate",
"$comment": "Schema version 1.2.1",
"required": [
"ver",
"nam",
Expand All @@ -17,7 +17,7 @@
"type": "string",
"pattern": "^\\d+.\\d+.\\d+$",
"examples": [
"1.2.0"
"1.2.1"
]
},
"nam": {
Expand All @@ -26,7 +26,7 @@
},
"dob": {
"title": "Date of birth",
"description": "Date of Birth of the person addressed in the DGC. ISO 8601 date format restricted to range 1900-2099",
"description": "Date of Birth of the person addressed in the DCC. ISO 8601 date format restricted to range 1900-2099",
"type": "string",
"pattern": "^(19|20)\\d\\d(-\\d\\d){0,2}$",
"examples": [
Expand Down Expand Up @@ -292,37 +292,37 @@
}
},
"disease-agent-targeted": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.1",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.1",
"type": "string",
"valueset-uri": "valuesets/disease-agent-targeted.json"
},
"vaccine-prophylaxis": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.2",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.2",
"type": "string",
"valueset-uri": "valuesets/vaccine-prophylaxis.json"
},
"vaccine-medicinal-product": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.3",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.3",
"type": "string",
"valueset-uri": "valuesets/vaccine-medicinal-product.json"
},
"vaccine-mah-manf": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.4",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.4",
"type": "string",
"valueset-uri": "valuesets/vaccine-mah-manf.json"
},
"test-manf": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.8",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.8",
"type": "string",
"valueset-uri": "valuesets/test-manf.json"
},
"test-result": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.9",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.9",
"type": "string",
"valueset-uri": "valuesets/test-result.json"
},
"test-type": {
"description": "EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.7",
"description": "EU eHealthNetwork: Value Sets for Digital Covid Certificates. version 1.0, 2021-04-16, section 2.7",
"type": "string",
"valueset-uri": "valuesets/test-type.json"
}
Expand Down
20 changes: 10 additions & 10 deletions DGC.schema.json → DCC.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://id.uvci.eu/DGC.schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate",
"$comment": "Schema version 1.2.0",
"$id": "https://id.uvci.eu/DCC.schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate",
"$comment": "Schema version 1.2.1",
"required": [
"ver",
"nam",
Expand All @@ -17,16 +17,16 @@
"type": "string",
"pattern": "^\\d+.\\d+.\\d+$",
"examples": [
"1.2.0"
"1.2.1"
]
},
"nam": {
"description": "Surname(s), given name(s) - in that order",
"$ref": "https://id.uvci.eu/DGC.Core.Types.schema.json#/$defs/person_name"
"$ref": "https://id.uvci.eu/DCC.Core.Types.schema.json#/$defs/person_name"
},
"dob": {
"title": "Date of birth",
"description": "Date of Birth of the person addressed in the DGC. ISO 8601 date format restricted to range 1900-2099",
"description": "Date of Birth of the person addressed in the DCC. ISO 8601 date format restricted to range 1900-2099",
"type": "string",
"pattern": "^(19|20)\\d\\d(-\\d\\d){0,2}$",
"examples": [
Expand All @@ -39,23 +39,23 @@
"description": "Vaccination Group",
"type": "array",
"items": {
"$ref": "https://id.uvci.eu/DGC.Types.schema.json#/$defs/vaccination_entry"
"$ref": "https://id.uvci.eu/DCC.Types.schema.json#/$defs/vaccination_entry"
},
"minItems": 1
},
"t": {
"description": "Test Group",
"type": "array",
"items": {
"$ref": "https://id.uvci.eu/DGC.Types.schema.json#/$defs/test_entry"
"$ref": "https://id.uvci.eu/DCC.Types.schema.json#/$defs/test_entry"
},
"minItems": 1
},
"r": {
"description": "Recovery Group",
"type": "array",
"items": {
"$ref": "https://id.uvci.eu/DGC.Types.schema.json#/$defs/recovery_entry"
"$ref": "https://id.uvci.eu/DCC.Types.schema.json#/$defs/recovery_entry"
},
"minItems": 1
}
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BASE_URL= "https://id.uvci.eu"

SCHEMATA= DGC.schema.json \
DGC.Core.Types.schema.json \
DGC.Types.schema.json \
DGC.ValueSets.schema.json
SCHEMATA= DCC.schema.json \
DCC.Core.Types.schema.json \
DCC.Types.schema.json \
DCC.ValueSets.schema.json

MERGED_SCHEMA= DGC.combined-schema.json
MERGED_SCHEMA= DCC.combined-schema.json
MERGED_ID= "$(BASE_URL)/$(MERGED_SCHEMA)"

JSON_FILES= *.json examples/*.json valuesets/*.json
Expand All @@ -22,7 +22,7 @@ merge: $(MERGED_SCHEMA)

compile::
@echo "Compiling schemata..."
$(AJV) compile -r "DGC.*.schema.json" -s "DGC.schema.json"
$(AJV) compile -r "DCC.*.schema.json" -s "DCC.schema.json"

check-formatting::
@echo "Checking JSON formatting..."
Expand All @@ -35,7 +35,7 @@ check-formatting::
done

validate-examples::
$(AJV) validate -r "DGC.*.schema.json" -s "DGC.schema.json" -d "examples/*.json"
$(AJV) validate -r "DCC.*.schema.json" -s "DCC.schema.json" -d "examples/*.json"

validate-valuesets::
$(AJV) validate -s "valueset.json" -d "valuesets/*.json"
Expand Down
Loading

0 comments on commit 90ff734

Please sign in to comment.