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 #55 from ehn-digital-green-development/next
Browse files Browse the repository at this point in the history
Prepare for 1.0.0
  • Loading branch information
jschlyter authored Apr 30, 2021
2 parents 7317821 + bc84927 commit 02bf437
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 89 deletions.
3 changes: 1 addition & 2 deletions DGC.Core.Types.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@
"type": "string",
"pattern": "^[A-Z<]*$",
"maxLength": 50,
"$comment": "SematicSG: ICAO transliterated has max length of?",
"examples": [
"JIRINA<MARIA<ALENA"
]
}
}
},
"certificate_id": {
"description": "Certificate Identifier, UVCI",
"description": "Certificate Identifier, format as per UVCI: Annex 2 in https://ec.europa.eu/health/sites/health/files/ehealth/docs/vaccination-proof_interoperability-guidelines_en.pdf",
"type": "string",
"maxLength": 50
}
Expand Down
6 changes: 3 additions & 3 deletions DGC.combined-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$id": "https://id.uvci.eu/DGC.combined-schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate",
"$comment": "Schema version 1.0.0",
"required": [
"ver",
"nam",
Expand All @@ -28,7 +29,7 @@
"description": "Date of Birth of the person addressed in the DGC. ISO 8601 date format restricted to range 1900-2099",
"type": "string",
"format": "date",
"pattern": "[19|20][0-9][0-9]-(0[1-9]|1[0-2])-([0-2][1-9]|3[0|1])",
"pattern": "(19|20)\\d{2}-\\d{2}-\\d{2}",
"examples": [
"1979-04-14"
]
Expand Down Expand Up @@ -116,15 +117,14 @@
"type": "string",
"pattern": "^[A-Z<]*$",
"maxLength": 50,
"$comment": "SematicSG: ICAO transliterated has max length of?",
"examples": [
"JIRINA<MARIA<ALENA"
]
}
}
},
"certificate_id": {
"description": "Certificate Identifier, UVCI",
"description": "Certificate Identifier, format as per UVCI: Annex 2 in https://ec.europa.eu/health/sites/health/files/ehealth/docs/vaccination-proof_interoperability-guidelines_en.pdf",
"type": "string",
"maxLength": 50
},
Expand Down
3 changes: 2 additions & 1 deletion DGC.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$id": "https://id.uvci.eu/DGC.schema.json",
"title": "EU DGC",
"description": "EU Digital Green Certificate",
"$comment": "Schema version 1.0.0",
"required": [
"ver",
"nam",
Expand All @@ -28,7 +29,7 @@
"description": "Date of Birth of the person addressed in the DGC. ISO 8601 date format restricted to range 1900-2099",
"type": "string",
"format": "date",
"pattern": "[19|20][0-9][0-9]-(0[1-9]|1[0-2])-([0-2][1-9]|3[0|1])",
"pattern": "(19|20)\\d{2}-\\d{2}-\\d{2}",
"examples": [
"1979-04-14"
]
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
# Digital Green Certificate Schema

This repository contains a schema for the EU Digital Green Certificate.
This repository contains a JSON schema for the EU Digital Green Certificate.

**Schema version:** 1.0.0
**Release date:** 2020-04-30


## Introduction

The Digital Green Certificate (DGC) JSON schema is provided as a mechanism for supporting the serialization and deserialization of the DGC payload, initially with focus on generation of a 2D barcode (QR Code).

The schema is intended to support different use cases that EU Member States require. The schema shall also support conformity to the [EU legislation](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:52021PC0130) regarding what shall present in a certificate to ensure freedom of movement within EU Member States and also to allow interoperability with countries outside of the EU zone.

The schema in conjunction with business rules (which may also be specific to a Member State) shall ensure conformity to the EU legislation, whereby the burden of conformity lies with the business rules and the DGC JSON schema plays a supporting role in allowing the data to be serialized and deserialized in a flexible, yet structured, manner.

**N.B. The schema is work in progress**

## Files

The main schema file is:

- DGC.schema.json

With the defintions in:
With the definitions in:

- DGC.Core.Types.schema.json
- DGC.Types.schema.json
- DGC.ValueSets.schema.json

For easy testing - they are combined in:
For easy testing, they are combined in:

- DGC.combined-schema.json

Expand All @@ -31,12 +42,14 @@ are examples created in vitro & very artificial.

## Implementation Notes

A list of [Frequently Asked Questions](https://github.com/ehn-digital-green-development/ehn-dgc-schema/wiki/FAQ) for implementors can be found in the [repository wiki](https://github.com/ehn-digital-green-development/ehn-dgc-schema/wiki).

### CBOR Encoding

Concise Binary Object Representation (CBOR), specified in [RFC7049](https://tools.ietf.org/html/rfc7049), defined a number of major data types. The following types are RECOMMENDED to be used by parties creating electronic health certificates payloads:
Concise Binary Object Representation (CBOR), specified in [RFC7049](https://tools.ietf.org/html/rfc7049), defines a number of major data types. The following types are RECOMMENDED to be used by parties creating electronic health certificates payloads:

- Integers are encoded as CBOR major type 0, an unsigned integer.
- Strings are encoded as CBOR major type 3. a text string.
- Strings are encoded as CBOR major type 3, a text string.
- Arrays are encoded as CBOR major type 4, an array of data items.
- Objects are encoded as CBOR major type 5, a map of pairs of data items.

Expand Down
49 changes: 0 additions & 49 deletions examples/contrived-all-options.json

This file was deleted.

Binary file added images/dgc_qr_generate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dgc_qr_verify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions test/invalid/invalid_dob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"ver": "1.0.0",
"nam": {
"fn": "d'Arsøns - van Halen",
"gn": "François-Joan",
"fnt": "DARSONS<VAN<HALEN",
"gnt": "FRANCOIS<JOAN"
},
"dob": "1809-02-28",
"v": [
{
"tg": "840539006",
"vp": "1119349007",
"mp": "EU/1/20/1528",
"ma": "ORG-100030215",
"dn": 2,
"sd": 2,
"dt": "2021-04-21",
"co": "NL",
"is": "Ministry of Public Health, Welfare and Sport",
"ci": "urn:uvci:01:NL:PlA8UWS60Z4RZXVALl6GAZ"
}
]
}
43 changes: 15 additions & 28 deletions valuesets/vaccine-mah-manf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,112 +6,99 @@
"display": "AstraZeneca AB",
"lang": "en",
"active": true,
"version": "",
"system": "https://spor.ema.europa.eu/v1/organisations"
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": ""
},
"ORG-100030215": {
"display": "Biontech Manufacturing GmbH",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100001417": {
"display": "Janssen-Cilag International",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100031184": {
"display": "Moderna Biotech Spain S.L.",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100006270": {
"display": "Curevac AG",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100013793": {
"display": "CanSino Biologics",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100020693": {
"display": "China Sinopharm International Corp. - Beijing location",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100010771": {
"display": "Sinopharm Weiqida Europe Pharmaceutical s.r.o. - Prague location",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100024420": {
"display": "Sinopharm Zhijun (Shenzhen) Pharmaceutical Co. Ltd. - Shenzhen location",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"ORG-100032020": {
"display": "Novavax CZ AS",
"lang": "en",
"active": true,
"system": "https://spor.ema.europa.eu/v1/organisations",
"version": "",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": ""
},
"Gamaleya-Research-Institute": {
"display": "Gamaleya Research Institute",
"lang": "en",
"active": true,
"system": "http://ec.europa.eu/temp/vaccinemanufacturer",
"version": "1.0",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": "1.0"
},
"Vector-Institute": {
"display": "Vector Institute",
"lang": "en",
"active": true,
"system": "http://ec.europa.eu/temp/vaccinemanufacturer",
"version": "1.0",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": "1.0"
},
"Sinovac-Biotech": {
"display": "Sinovac Biotech",
"lang": "en",
"active": true,
"system": "http://ec.europa.eu/temp/vaccinemanufacturer",
"version": "1.0",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": "1.0"
},
"Bharat-Biotech": {
"display": "Bharat Biotech",
"lang": "en",
"active": true,
"system": "http://ec.europa.eu/temp/vaccinemanufacturer",
"version": "1.0",
"valueSetId": "vaccines-covid-19-auth-holders"
"version": "1.0"
}
}
}

0 comments on commit 02bf437

Please sign in to comment.