84 lines
7.1 KiB
JavaScript
84 lines
7.1 KiB
JavaScript
|
testData = {
|
|||
|
"JSON": {
|
|||
|
"ver": "1.0.0",
|
|||
|
"nam": {
|
|||
|
"fn": "Di Caprio",
|
|||
|
"fnt": "DI<CAPRIO",
|
|||
|
"gn": "Maril<69> Teresa",
|
|||
|
"gnt": "MARILU<TERESA"
|
|||
|
},
|
|||
|
"dob": "1977-06-16",
|
|||
|
"v": [{
|
|||
|
"tg": "840539006",
|
|||
|
"vp": "1119349007",
|
|||
|
"mp": "EU/1/20/1528",
|
|||
|
"ma": "ORG-100030215",
|
|||
|
"dn": 2,
|
|||
|
"sd": 2,
|
|||
|
"dt": "2021-04-10",
|
|||
|
"co": "IT",
|
|||
|
"is": "IT",
|
|||
|
"ci": "01ITE7300E1AB2A84C719004F103DCB1F70A#6"
|
|||
|
}]
|
|||
|
},
|
|||
|
"CBOR": "a4617681aa62646e02626d616d4f52472d3130303033303231356276706a313131393334393030376264746a323032312d30342d313062636f62495462636978263031495445373330304531414232413834433731393030344631303344434231463730412336626d706c45552f312f32302f313532386269736249546273640262746769383430353339303036636e616da463666e746944493c43415052494f62666e6944692043617072696f63676e746d4d4152494c553c54455245534162676e6e4d6172696cc3b9205465726573616376657265312e302e3063646f626a313937372d30362d3136",
|
|||
|
"COSE": "d2844da2044839301768cdda05130126a0590101a4041a6194e898061a60a78c8801624954390103a101a4617681aa62646e02626d616d4f52472d3130303033303231356276706a313131393334393030376264746a323032312d30342d313062636f62495462636978263031495445373330304531414232413834433731393030344631303344434231463730412336626d706c45552f312f32302f313532386269736249546273640262746769383430353339303036636e616da463666e746944493c43415052494f62666e6944692043617072696f63676e746d4d4152494c553c54455245534162676e6e4d6172696cc3b9205465726573616376657265312e302e3063646f626a313937372d30362d31365840a4ee9016c1a74ccf9caab905492d698f6992a8fa30c20db6180f06040c4870a845bb4b3a1ce3f4ed529cc78e66322547d62637c74ab17919c0aa52a614795e9e",
|
|||
|
"COMPRESSED": "789cbbd4e2bb88c5c3d2403ce3ec2d566146b505918c8c4b58a412a7bc98c12695b0bca78331c933c492917921e392c4b2c6554929794c49b989b9fe41eeba86060606c6064686a64965055986868696c626960606e6492925594640615d0313a092a4e47ca00149c999156a06869e21aee6c60606ae868e4e468e1626cee686400d266e8606c62ece4e866ee6068eca6649b90539aea1fa86fa4606fa86a646164999c520038a5398924ad2332d4c0c4c8d819acc92f312739724a7e59564ba78da383b060479fa27a5e565ba642a3827161465e627a7e795e4fa3a0679fa84da84b806b9063b26a5e7e5f9261665e61cdea910925a945a9c985c06a40cf50cf40c9253f293b20c2dcdcd750dcc740dcd221c96bc9b207670b9cff939ab76b27aea66f6674e5af1cbe010ef36097e36161e8f8215aebbbdad641e7f791b34e7785f9a91aafb3535f3e35e1b2b250fac0a5a265219370f006c9472ca",
|
|||
|
"BASE45": "6BFOXN%TS3DH0YOJ58S S-W5HDC *M0II5XHC9B5G2+$N IOP-IA%NFQGRJPC%OQHIZC4.OI1RM8ZA.A5:S9MKN4NN3F85QNCY0O%0VZ001HOC9JU0D0HT0HB2PL/IB*09B9LW4T*8+DCMH0LDK2%K:XFE70*LP$V25$0Q:J:4MO1P0%0L0HD+9E/HY+4J6TH48S%4K.GJ2PT3QY:GQ3TE2I+-CPHN6D7LLK*2HG%89UV-0LZ 2ZJJ524-LH/CJTK96L6SR9MU9DHGZ%P WUQRENS431T1XCNCF+47AY0-IFO0500TGPN8F5G.41Q2E4T8ALW.INSV$ 07UV5SR+BNQHNML7 /KD3TU 4V*CAT3ZGLQMI/XI%ZJNSBBXK2:UG%UJMI:TU+MMPZ5$/PMX19UE:-PSR3/$NU44CBE6DQ3D7B0FBOFX0DV2DGMB$YPF62I$60/F$Z2I6IFX21XNI-LM%3/DF/U6Z9FEOJVRLVW6K$UG+BKK57:1+D10%4K83F+1VWD1NE",
|
|||
|
"PREFIX": "HC1:6BFOXN%TS3DH0YOJ58S S-W5HDC *M0II5XHC9B5G2+$N IOP-IA%NFQGRJPC%OQHIZC4.OI1RM8ZA.A5:S9MKN4NN3F85QNCY0O%0VZ001HOC9JU0D0HT0HB2PL/IB*09B9LW4T*8+DCMH0LDK2%K:XFE70*LP$V25$0Q:J:4MO1P0%0L0HD+9E/HY+4J6TH48S%4K.GJ2PT3QY:GQ3TE2I+-CPHN6D7LLK*2HG%89UV-0LZ 2ZJJ524-LH/CJTK96L6SR9MU9DHGZ%P WUQRENS431T1XCNCF+47AY0-IFO0500TGPN8F5G.41Q2E4T8ALW.INSV$ 07UV5SR+BNQHNML7 /KD3TU 4V*CAT3ZGLQMI/XI%ZJNSBBXK2:UG%UJMI:TU+MMPZ5$/PMX19UE:-PSR3/$NU44CBE6DQ3D7B0FBOFX0DV2DGMB$YPF62I$60/F$Z2I6IFX21XNI-LM%3/DF/U6Z9FEOJVRLVW6K$UG+BKK57:1+D10%4K83F+1VWD1NE",
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
// Explanation: https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_dt-specifications_en.pdf
|
|||
|
// Data: https://data.public.lu/fr/datasets/europe-ehealth-network-digital-covid-certificate-payload/#_
|
|||
|
// Github repo with test QR codes / green passes: https://github.com/eu-digital-green-certificates/dgc-testdata/tree/main/IT/png
|
|||
|
// Github for JSON files with official values: https://github.com/ehn-dcc-development/ehn-dcc-schema/tree/release/1.3.0/valuesets
|
|||
|
|
|||
|
fieldsDescriptions =
|
|||
|
{
|
|||
|
'-260':
|
|||
|
{
|
|||
|
1:
|
|||
|
{
|
|||
|
'dob': 'YYYY-MM-DD', // date of birth
|
|||
|
'nam': {
|
|||
|
'fn': 'Family name (surname)', // Family name (surname)
|
|||
|
'fnt': 'xxxxxxxx<xxxxxx', // Family name in special format
|
|||
|
'gn': 'Given name', // Given name
|
|||
|
'gnt': 'xxxxxxxxx', // Given name in special format
|
|||
|
},
|
|||
|
'v': [
|
|||
|
{
|
|||
|
'tg': 'Targeted disease', // Targeted disease (COVID-19 = 840539006), see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/disease-agent-targeted.json
|
|||
|
'vp': 'Vaccine or prophylaxis', // Vaccine or prophylaxis (COVID-19 = 1119349007), see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/vaccine-prophylaxis.json
|
|||
|
'mp': 'Vaccine product id', // Vaccine product id, see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/vaccine-medicinal-product.json
|
|||
|
'ma': 'Vaccine manufacturer', // Vaccine manufacturer, see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/vaccine-mah-manf.json
|
|||
|
'dn': 'Doses received', // Doses received (number)
|
|||
|
'sd': 'Total number of doses', // Total number of doses (number)
|
|||
|
'dt': 'Date of vaccination', // Date of vaccination YYYY-MM-DD (complete date without time)
|
|||
|
'co': 'Country of vaccination', // Country of vaccination, see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/country-2-codes.json
|
|||
|
'is': 'Certificate issuer', // Certificate issuer (plain text)
|
|||
|
'ci': 'Certificate ID', // Certificate ID
|
|||
|
}
|
|||
|
],
|
|||
|
|
|||
|
'r': [
|
|||
|
{
|
|||
|
'tg': 'Targeted disease', // Targeted disease (COVID-19 = 840539006), see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/disease-agent-targeted.json
|
|||
|
'fr': 'Date of first test', // Date of the holder<65>s first positive NAAT test result. YYYY-MM-DD (complete date without time).
|
|||
|
'co': 'Country', // Member State or third country in which test was carried out, see https://github.com/ehn-dcc-development/ehn-dcc-schema/raw/release/1.3.0/valuesets/country-2-codes.json
|
|||
|
'is': 'Certificate issuer', // Certificate issuer (plain text)
|
|||
|
'df': 'Valid from', // Certificate valid from YYYY-MM-DD (complete date without time).
|
|||
|
'du': 'Valid to', // Certificate valid until to YYYY-MM-DD (complete date without time).
|
|||
|
'ci': 'Certificate ID', // Certificate ID
|
|||
|
}
|
|||
|
],
|
|||
|
'ver': '1.2.1'
|
|||
|
}
|
|||
|
}, // schema version
|
|||
|
'1': 'QR code issuer country', // QR code issuer country
|
|||
|
'4': 'QR code expiry date', // QR code expiry date in timestamp format (SECONDS)
|
|||
|
'6': 'QR code generated' // QR code generated in timestamp format (SECONDS)
|
|||
|
};
|
|||
|
|