diff --git a/examples/Scenario1Bundle-file.smart-health-card b/examples/Scenario1Bundle-file.smart-health-card index 1e5131ff..92c735a8 100644 --- a/examples/Scenario1Bundle-file.smart-health-card +++ b/examples/Scenario1Bundle-file.smart-health-card @@ -1 +1 @@ -{"verifiableCredential":["eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZLLTsMwEEX_ZdimzYNHaXYUNrBCorBBXTjOtDGynciPqqXKvzN2iqhaKtZkN8mdM_fOZAfCWiihca6zZZraDvnYKmZcg0y6ZsyZqW2KG6Y6iTYltUcDCehqCWV-U9wWk-zyapLAmkO5A7ftEMr3H94x6mIoRqEgzHmdZJVB66WDRQLcYI3aCSZffPWB3IVZy0aYNzRWtBpK7aVM4quZ17XEHzPAWympJcgSIIrZkkNqp45XI0lAc1pvOJYZCb6LANBM4aBlSkhqgztNTGMjaiXWqEPYp7YJ9WwMi57MVoKiPDAXZufT63yU5aPiED0ffD0zJ8gO9H3yq5v8yI11zHkbA4VjOAwLXDPOhcb7to4a3tZCr6Jnu7UO1f62tOJGTsatWaVhR6kVdcrXGwLw2AlFNoF-0SfQ7V0RzOASDeow_XBHJGo59yZ-CjnnQg2IImbN8tOsj0p5LT5ZvMK5wMU_DVxM_wy8OBHsf9Oeni8.Tf8PC5d4Td_AgZswRHRbGArbDgQqUIWpqPRuE1zKzWb4-DL74t8t6erulw2yvha7oRw0aOCpjTtGVguo_oTZLw"]} \ No newline at end of file +{"verifiableCredential":["eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZI_T8MwEMW_y7Gm-SdK2mwUFpiQKCwog-tcGyPHjmwnaqny3TknRVQthZlsF7_73Xtn70FYCzlUzjU2jyLbIA9tzYyrkElXhZyZ0ka4ZXUj0UakbtFAAGq1hjy5SWezLM6m8wA6Dvke3K5ByN--eaeoq7GY-IIwl3WirlslPpgTWv0q5LoTZTKHIgBusETlBJPP7eodufOW1pUwr2is5-RwHcZhQjz_d9GqUuK3beBaSuoaJxLI7CgLEVopX4wkgUGrW8Mxj0nwVXiAYjWOWlYLSW1wq4hp7IDaiA6VX8ujrny9CKHoye9KUJZ75vzsZD5NJnEySY_Ry9HXE22B7EDfBz-6SU7cWMdca4dA_toc-lV3jHOh8E6Xg4brUqjN4NnurMP68Apox5XMQm02kd9RZEUZ8W5LAD50Qhpn0Bd9AM3BFcEMrtGg8tOPd0QizXlrhiOfcynqEZEOWePkPOvD8b1fCpz-08Dp_M_AxZng8Ex7-j4B.RmSBzFfFKCYVcA7Pyzdll4rG4WJpdiqXbE4wr6f7boXYdqDpYr7zGUmKV8Idz66ZaYfJnglkQPSVmjFWmlVLCA"]} \ No newline at end of file diff --git a/examples/Scenario1Bundle-jws-payload-expanded.json b/examples/Scenario1Bundle-jws-payload-expanded.json index a57725f1..52bea426 100644 --- a/examples/Scenario1Bundle-jws-payload-expanded.json +++ b/examples/Scenario1Bundle-jws-payload-expanded.json @@ -1,13 +1,14 @@ { "iss": "https://spec.smarthealth.cards/examples/issuer", - "nbf": 1628270347, + "nbf": 1628870759, "vc": { "type": [ "https://smarthealth.cards#health-card", - "https://smarthealth.cards#labresult" + "https://smarthealth.cards#immunization", + "https://smarthealth.cards#covid19" ], "credentialSubject": { - "fhirVersion": null, + "fhirVersion": "4.0.1", "fhirBundle": { "type": "collection", "entry": [ diff --git a/examples/Scenario1Bundle-jws-payload-minified.json b/examples/Scenario1Bundle-jws-payload-minified.json index 5f5641e4..74775a6d 100644 --- a/examples/Scenario1Bundle-jws-payload-minified.json +++ b/examples/Scenario1Bundle-jws-payload-minified.json @@ -1 +1 @@ -{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628270347,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#labresult"],"credentialSubject":{"fhirVersion":null,"fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["John","B."]}],"birthDate":"1951-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"207"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-01","resourceType":"Immunization"}},{"fullUrl":"resource:2","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"207"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-29","resourceType":"Immunization"}}],"resourceType":"Bundle"}}}} \ No newline at end of file +{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628870759,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#immunization","https://smarthealth.cards#covid19"],"credentialSubject":{"fhirVersion":"4.0.1","fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["John","B."]}],"birthDate":"1951-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"207"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-01","resourceType":"Immunization"}},{"fullUrl":"resource:2","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"207"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-29","resourceType":"Immunization"}}],"resourceType":"Bundle"}}}} \ No newline at end of file diff --git a/examples/Scenario1Bundle-jws.txt b/examples/Scenario1Bundle-jws.txt index 0e5a4dd1..08577760 100644 --- a/examples/Scenario1Bundle-jws.txt +++ b/examples/Scenario1Bundle-jws.txt @@ -1 +1 @@ -eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VW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B7EDfBz-6SU7cWMdca4dA_toc-lV3jHOh8E6Xg4brUqjN4NnurMP68Apox5XMQm02kd9RZEUZ8W5LAD50Qhpn0Bd9AM3BFcEMrtGg8tOPd0QizXlrhiOfcynqEZEOWePkPOvD8b1fCpz-08Dp_M_AxZng8Ex7-j4B.RmSBzFfFKCYVcA7Pyzdll4rG4WJpdiqXbE4wr6f7boXYdqDpYr7zGUmKV8Idz66ZaYfJnglkQPSVmjFWmlVLCA \ No newline at end of file diff --git a/examples/Scenario1Bundle-qr-code-0.png b/examples/Scenario1Bundle-qr-code-0.png index 3e44afec..df2ad9a5 100644 Binary files a/examples/Scenario1Bundle-qr-code-0.png and b/examples/Scenario1Bundle-qr-code-0.png differ diff --git a/examples/Scenario1Bundle-qr-code-numeric-value-0.txt b/examples/Scenario1Bundle-qr-code-numeric-value-0.txt index 082ca48b..9adec5b3 100644 --- a/examples/Scenario1Bundle-qr-code-numeric-value-0.txt +++ b/examples/Scenario1Bundle-qr-code-numeric-value-0.txt @@ -1 +1 @@ -shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736010445313139703274242443504555606477443327524344403369212266692121433961347123267665546035686843307377330560685952307145623311645532505734452057224260605954520977454569522373654430644554580376094570764568420530260944096039446371405423225659682242410040127442620077765267312064623408201057712432690627120775096428663768245877276455452941210909422337363154442806522238455757354221062841457603524433773742712167301052413207687245041043242777352042766467295458382828694562623368670708432803632054046773342944452253093120332132075221633862596858777133392632615260434268243544671044291242743260081032416630603523204345725739090676400852356024230357572303772911583412270676680873117628040477276253200741613420743143233534595453107166075206714522690929657210403404570905713429263970527142524159370962415554694326743174052063253366250003385736104103377734203823566674504321272926660812764500226165653658052828645333117134706103670831390845733230087432405023417532507476113421277057123456656011013957113522085507395550205845707437273753262069532358366840284267683537722404773077425307002331100771117109566972637405767359521066377403523422676139712641587266506639453174 \ No newline at end of file +shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736010445285039113274243242507610266400385530056474402567603630227466580071542676352761647465526865760639626537413671594563702510501006437165100325442277634077614005617631532820127177447669622463435945764503625207454340610340526253712520202668045961760838425677313209641174200923736256063008217633000056525666681026440028287463064260696370633567583942730368083166394539302728582172702439632129353510566655725734420467407469056070080037742754455936617750551226684072300653562152387266522975312810225831244166674307746258402669421132756103657441436020446142344263443138420474680759671028235260200941431172616965761222302766765612304029451008737770452308332965247638445037761227432405052110242357217700093840105442325554520755205071665400634106612734591124094358075369406861330733657269323509112067667508433236640305625512374524404511420831202308033659676503215512203206212554243269712658117134355503366077436369596034575476656824452434425635623534732311530457226777000311236750325020754565581124751000610721013764382177255725302244415420103576775563630769260742296755606843532407746909571053664344556823674469107726406430411128557709094552445729655863623635384164612542646341312220 \ No newline at end of file diff --git a/examples/Scenario2Bundle-file.smart-health-card b/examples/Scenario2Bundle-file.smart-health-card index ebc35210..55303489 100644 --- a/examples/Scenario2Bundle-file.smart-health-card +++ b/examples/Scenario2Bundle-file.smart-health-card @@ -1 +1 @@ -{"verifiableCredential":["eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZLLTsNADEX_xWzTvEB9ZAdlAyskChuUxXTiNoMmk2geUUuVf8czLWrVUrEmOyfXx_fa2YEwBgqore1MkSSmQx6bhmlbI5O2jjnTlUlww5pOoklI7VBDBGq5giIb59N8kt7ejSPoORQ7sNsOofg48s5RN_ti5AvCXNdJttRonLRQRsA1VqisYPLVLT-RWz9rVQv9jtqIVkGhnJRRePXgVCXxaAZ4KyW1eFkERNFbckjt1PGmJQloTus0xyIlwU_hAYo1uNeyRkhqg3tFTG0Cai16VD7sM1NI9TyGciCzS0FRHpn1s7PZOBul2Sg_RS_2vl6YFWQHhiH61U125sZYZp0JgfwxLPoF9oxzoXDeVkHD20qodfBstsZic7gtrbiWk7jV68TvKDGiSni_IQAPnZCnUxjKIYLu4IpgGleoUfnppzsiUcu50-GTz7kQzR6Rh6xpdpn1qWmcEl8sXOFa4PyfBs5nfwYuLwSH33Sg5xs.U79Q6I8shYRKKIWU_uPVRM3vzuIoCUBCcUKM2vbM6D_le5ww9DJc0wMAePFasI_sHngnxyAu6M43ineZA7xYBQ"]} \ No newline at end of file +{"verifiableCredential":["eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZJBU4MwEIX_y3qlQBhtCzetFz05Y_XicEjDtsQJgUkC09rhv7uBOnZaq2e5LXn77Xub7EFaCxmUzjU2iyLboAhtxY0rkStXhoKbwka45VWj0EakbtFAAHq1hoxNk_l8Fs9u0gA6Adke3K5ByN6-eaeoq7GY-IIwl3WyqlotP7iTtf5VKOpOFiyFPABhsEDtJFfP7eodhfOW1qU0r2is52RwHcYhI57_e9fqQuG3bRC1UtQ1TiSQ2VEWIrRKvRhFAoO2bo3ALCbBV-EBmlc4anklFbXBrSamsQNqIzvUfi2PXCPVixDynvyuJGW5587PZumUTWI2SY7Ry9HXE22B7EDfBz-6YSdurOOutUMgf20O_ao7LoTUuKiLQSPqQurN4NnurMPq8Apox6WahbXZRH5HkZVFJLotAcTQCUk8hz7vA2gOrghmcI0GtZ9-vCMS1UK0ZjjyOZeyGhHJkDVm51kfju_9UuDknwZO0j8D52eCwzPt6fsE.r2Ps9XWgZdFNNaUrzMcg2qSL8aozD6RPcmI51lbAW0TBpRgxvvi8KSYpTkReAlzLgX2TwNEpA1ei2Gixfzneeg"]} \ No newline at end of file diff --git a/examples/Scenario2Bundle-jws-payload-expanded.json b/examples/Scenario2Bundle-jws-payload-expanded.json index 4a1ac03d..d6022477 100644 --- a/examples/Scenario2Bundle-jws-payload-expanded.json +++ b/examples/Scenario2Bundle-jws-payload-expanded.json @@ -1,13 +1,14 @@ { "iss": "https://spec.smarthealth.cards/examples/issuer", - "nbf": 1628270346, + "nbf": 1628870759, "vc": { "type": [ "https://smarthealth.cards#health-card", - "https://smarthealth.cards#labresult" + "https://smarthealth.cards#immunization", + "https://smarthealth.cards#covid19" ], "credentialSubject": { - "fhirVersion": null, + "fhirVersion": "4.0.1", "fhirBundle": { "type": "collection", "entry": [ diff --git a/examples/Scenario2Bundle-jws-payload-minified.json b/examples/Scenario2Bundle-jws-payload-minified.json index 5ee74055..93b775d5 100644 --- a/examples/Scenario2Bundle-jws-payload-minified.json +++ b/examples/Scenario2Bundle-jws-payload-minified.json @@ -1 +1 @@ -{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628270346,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#labresult"],"credentialSubject":{"fhirVersion":null,"fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["Jane","C."]}],"birthDate":"1961-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"208"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-01","resourceType":"Immunization"}},{"fullUrl":"resource:2","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"208"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-29","resourceType":"Immunization"}}],"resourceType":"Bundle"}}}} \ No newline at end of file +{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628870759,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#immunization","https://smarthealth.cards#covid19"],"credentialSubject":{"fhirVersion":"4.0.1","fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["Jane","C."]}],"birthDate":"1961-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"208"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-01","resourceType":"Immunization"}},{"fullUrl":"resource:2","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"208"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-29","resourceType":"Immunization"}}],"resourceType":"Bundle"}}}} \ No newline at end of file diff --git a/examples/Scenario2Bundle-jws.txt b/examples/Scenario2Bundle-jws.txt index 38615817..39889541 100644 --- a/examples/Scenario2Bundle-jws.txt +++ b/examples/Scenario2Bundle-jws.txt @@ -1 +1 @@ -eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZLLTsNADEX_xWzTvEB9ZAdlAyskChuUxXTiNoMmk2geUUuVf8czLWrVUrEmOyfXx_fa2YEwBgqore1MkSSmQx6bhmlbI5O2jjnTlUlww5pOoklI7VBDBGq5giIb59N8kt7ejSPoORQ7sNsOofg48s5RN_ti5AvCXNdJttRonLRQRsA1VqisYPLVLT-RWz9rVQv9jtqIVkGhnJRRePXgVCXxaAZ4KyW1eFkERNFbckjt1PGmJQloTus0xyIlwU_hAYo1uNeyRkhqg3tFTG0Cai16VD7sM1NI9TyGciCzS0FRHpn1s7PZOBul2Sg_RS_2vl6YFWQHhiH61U125sZYZp0JgfwxLPoF9oxzoXDeVkHD20qodfBstsZic7gtrbiWk7jV68TvKDGiSni_IQAPnZCnUxjKIYLu4IpgGleoUfnppzsiUcu50-GTz7kQzR6Rh6xpdpn1qWmcEl8sXOFa4PyfBs5nfwYuLwSH33Sg5xs.U79Q6I8shYRKKIWU_uPVRM3vzuIoCUBCcUKM2vbM6D_le5ww9DJc0wMAePFasI_sHngnxyAu6M43ineZA7xYBQ \ No newline at end of file +eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1ZJBU4MwEIX_y3qlQBhtCzetFz05Y_XicEjDtsQJgUkC09rhv7uBOnZaq2e5LXn77Xub7EFaCxmUzjU2iyLboAhtxY0rkStXhoKbwka45VWj0EakbtFAAHq1hoxNk_l8Fs9u0gA6Adke3K5ByN6-eaeoq7GY-IIwl3WyqlotP7iTtf5VKOpOFiyFPABhsEDtJFfP7eodhfOW1qU0r2is52RwHcYhI57_e9fqQuG3bRC1UtQ1TiSQ2VEWIrRKvRhFAoO2bo3ALCbBV-EBmlc4anklFbXBrSamsQNqIzvUfi2PXCPVixDynvyuJGW5587PZumUTWI2SY7Ry9HXE22B7EDfBz-6YSdurOOutUMgf20O_ao7LoTUuKiLQSPqQurN4NnurMPq8Apox6WahbXZRH5HkZVFJLotAcTQCUk8hz7vA2gOrghmcI0GtZ9-vCMS1UK0ZjjyOZeyGhHJkDVm51kfju_9UuDknwZO0j8D52eCwzPt6fsE.r2Ps9XWgZdFNNaUrzMcg2qSL8aozD6RPcmI51lbAW0TBpRgxvvi8KSYpTkReAlzLgX2TwNEpA1ei2Gixfzneeg \ No newline at end of file diff --git a/examples/Scenario2Bundle-qr-code-0.png b/examples/Scenario2Bundle-qr-code-0.png index 735517d4..fc83c629 100644 Binary files a/examples/Scenario2Bundle-qr-code-0.png and b/examples/Scenario2Bundle-qr-code-0.png differ diff --git a/examples/Scenario2Bundle-qr-code-numeric-value-0.txt b/examples/Scenario2Bundle-qr-code-numeric-value-0.txt index 7dd1323f..46640850 100644 --- a/examples/Scenario2Bundle-qr-code-numeric-value-0.txt +++ b/examples/Scenario2Bundle-qr-code-numeric-value-0.txt @@ -1 +1 @@ -shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736010445313139703320232443507542773973242112452055632076706222597240754339603366326462055856404072415711547731426941406924643476574375505752054424742158686669560432623838643675095359646353280834056161653963406374740867346662632810412123212668085860285308123311627110566138356634373610703370346657580711700837335071600820732243335529717137666531373637702004416860704435314131390037427712694136731261716828416226596529373756354358412243755220450730764204562562243733255354626171043526642936636639727003757628637440505920446604723356763762596858067125392603225260040941231070320433281239762654602277380325372767650470103545342172630538585037385005736309442542362759602709044004050870454445670329585774753135662512667577664323564162272305036866555721707170456054105871695360426210614109113973302326603865605028362035654522654075613028443172072867582663566640576567677770604054720803002639771062367737093759097567556765046842645424631170433425520735765721700865577444723174382706063858087570014010123609281170594437303028424050723541373206737772286622402122544030320573533209235063560874741223295403743220563525527028507027655865757620720932070660655645201075442136 \ No newline at end of file +shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736010445292140073274242843507606686336215971227756712577030844504360542461237170362958406222031269597310722134654552680556083143651010437253102425522275644077614005607631536620597175440369623871435966305374625207084142610324526253712520202768045966753362506311257012720358200920556256063008217633090056525666681026440028287463064276686366713510603971570841303467342560762535202159702423712925573510566655595734420468400369056070080537742754445928081050561257683672260653372204407136043960383605412442286937307337592520663405536606203122532141002421646354075265626325534321693852647036336828777340576005354322354160752376657376722926420808111035457264403942280538441037761227432405052110242357217700094438557269343472714032585705033450526610316639407230603136383568367269330733657269323568112067667509425259534345372708276245412529316671205439362240621159771073200558346958596454280326714512007322323804403003456161763445567626592729622341640804625761725012407223626574453403611123080556227477357109577024016905357012434258455525333352406977325458056838311152667723093735546428080463532042033921673758757373601130384467396237562063773158430539743324672004566005266075577765565658 \ No newline at end of file diff --git a/examples/Scenario3Bundle-file.smart-health-card b/examples/Scenario3Bundle-file.smart-health-card index fb33b96c..95d80e7d 100644 --- a/examples/Scenario3Bundle-file.smart-health-card +++ b/examples/Scenario3Bundle-file.smart-health-card @@ -1 +1 @@ -{"verifiableCredential":["eyJ6aXAiOiJERUYiL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1_oCftLNtcZEUmmC_e3g62MXgWDcoZw68iMgEm4s7VMzMMxnz3hgEeyQ1eYVUw4O0QCazs8ISVnTb8DD5b5vQ0U-31iDaG8sAw4ottBruJBdeazXyRITYXm6VIC5GWH7m3J2GPMmjWA9OU_FGOuJBDQYYhTrXVVhouKtfMBd613c9K6UgBu9fJc7LGaasy5_fvcNgslst1uoBpNyVA50g9tujRxl4fI2EQtm0McMRoaqtjKFAWJRsrU7FiZs6kdb7jHxQ1NJp6I-e4bu-uvqJFL83VvaNeB9YdIxqlGfCO9cja8M5N-_AfJ2Rdh02mbetyYsXvfsqb4np1XRTi5Ogi5G81oR_lPP4ptr6ov36Xiddv.rAHPz_02as6d1Qk0VFtCKgbsaT_Xf30fd2wPU0eNOm04_3n7j0JtytSS5EA0hFh3aqJibNLhWamrYe_LjgtydQ"]} \ No newline at end of file diff --git a/examples/Scenario3Bundle-jws-payload-expanded.json b/examples/Scenario3Bundle-jws-payload-expanded.json index 172b8345..8d3dafa3 100644 --- a/examples/Scenario3Bundle-jws-payload-expanded.json +++ b/examples/Scenario3Bundle-jws-payload-expanded.json @@ -1,13 +1,14 @@ { "iss": "https://spec.smarthealth.cards/examples/issuer", - "nbf": 1628270347, + "nbf": 1628870759, "vc": { "type": [ "https://smarthealth.cards#health-card", - "https://smarthealth.cards#labresult" + "https://smarthealth.cards#laboratory", + "https://smarthealth.cards#covid19" ], "credentialSubject": { - "fhirVersion": null, + "fhirVersion": "4.0.1", "fhirBundle": { "type": "collection", "entry": [ diff --git a/examples/Scenario3Bundle-jws-payload-minified.json b/examples/Scenario3Bundle-jws-payload-minified.json index 6b0c3b92..2b8e9ab4 100644 --- a/examples/Scenario3Bundle-jws-payload-minified.json +++ b/examples/Scenario3Bundle-jws-payload-minified.json @@ -1 +1 @@ -{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628270347,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#labresult"],"credentialSubject":{"fhirVersion":null,"fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["James","T."]}],"birthDate":"1951-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"94558-4"}]},"subject":{"reference":"resource:0"},"effectiveDateTime":"2021-02-17","performer":[{"display":"ABC General Hospital"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001"}]},"resourceType":"Observation"}}],"resourceType":"Bundle"}}}} \ No newline at end of file +{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628870759,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#laboratory","https://smarthealth.cards#covid19"],"credentialSubject":{"fhirVersion":"4.0.1","fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Anyperson","given":["James","T."]}],"birthDate":"1951-01-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"94558-4"}]},"subject":{"reference":"resource:0"},"effectiveDateTime":"2021-02-17","performer":[{"display":"ABC General Hospital"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001"}]},"resourceType":"Observation"}}],"resourceType":"Bundle"}}}} \ No newline at end of file diff --git a/examples/Scenario3Bundle-jws.txt b/examples/Scenario3Bundle-jws.txt index b817116d..308d0dd5 100644 --- a/examples/Scenario3Bundle-jws.txt +++ b/examples/Scenario3Bundle-jws.txt @@ -1 +1 @@ -eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.hVLLbtswEPyVYHvV23ac6NakQIteWqBuL4UPFLWyWaxIgUsJNQL9e5dyEgdGi_JCkDs7OzPkExhmqOEYwsB1nvOAOuNe-XBEReGYaeVbzvG36gdCzgU9oocEbNNBXd5Wd9W2WK23CUwa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iZs6kdb7jHxQ1NJp6I-e4bu-uvqJFL83VvaNeB9YdIxqlGfCO9cja8M5N-_AfJ2Rdh02mbetyYsXvfsqb4np1XRTi5Ogi5G81oR_lPP4ptr6ov36Xiddv.rAHPz_02as6d1Qk0VFtCKgbsaT_Xf30fd2wPU0eNOm04_3n7j0JtytSS5EA0hFh3aqJibNLhWamrYe_LjgtydQ \ No newline at end of file diff --git a/examples/Scenario3Bundle-qr-code-0.png b/examples/Scenario3Bundle-qr-code-0.png index 8fc81524..fbf5ebe0 100644 Binary files a/examples/Scenario3Bundle-qr-code-0.png and b/examples/Scenario3Bundle-qr-code-0.png differ diff --git a/examples/Scenario3Bundle-qr-code-numeric-value-0.txt b/examples/Scenario3Bundle-qr-code-numeric-value-0.txt index 80fa1e89..0806b806 100644 --- a/examples/Scenario3Bundle-qr-code-numeric-value-0.txt +++ b/examples/Scenario3Bundle-qr-code-numeric-value-0.txt @@ -1 +1 @@ -shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736015941313153717074243576414427734105065254093352623628715642682172310740352531427642527528584070293336311256085576245855266050292262237010347735622475596468342444747021046573342034723356004321243756264452564153777326060958552277584012666654245333332143550842551242054230050622407452096054286774265950656559720945095577096211382003501152375261777638202705224260353155675825270353640400663608774127440650584509337004235362385945695908260575295675282105373328384436622860770029366464436172005621222177063458040466402043580937743066567704614126082805562600250350332255392039056461057011214431654445102655370575617511622625343176110608376740525341420010554255594325447766584363345060686573293123364440757363456569222867527154722155643335387530005436210000544363422329265270770874007354315957537745060937696450457420435031030530252726055612614037200527407574206461684505296640214141263070387072713224706465573412502876666639401162256960566560110044584273523053390707272403370661265938333430610925243376380823595020572905755561050464533455762570427357686953446941552540410855653641116756260340126856570708616909683506004342554457010633292345696806774375696372222574315826346944697342090876687429705003667553557152433060250506576505333174646904655963665660327476435022443940695252213834294423644410434258 \ No newline at end of file +shc:/5676290952432060346029243740446031222959532654603460292540772804336028702864716745222809286133314564376531415906402203064504590856435503414245413640370636654171372412363803043756220467374075323239254334433260573601594131315371707424357641442773416007665505106604305520586374522805037358200342715321444030432067664052585700123839723120092832435871775910327470430320393636422724276868116775094121630403665423385932346445300066377550765207063823646121503836583004536832373372410973607141766211226666276821543474376872547706764341671232596136566400397334763367082645745050593464063058537044255520706761587745665245092600605668242042042100045066225771313371544524406464225056065809053243584223546645740911603258246407701041327732327565770659582456763604564441407407340336225277701128384165395311232308530873360340000604602352261170207407667171216972292155565277437637283944436409412822082642271064062905263532646142201234405025263472292123364444593969434141596672307157322155090406541230094058217212572954103126525270760850577354335870637071047266216733764120080358127172613775630757280524367164033254323766526871613025204229377069401025604570096255531061277536043329670928005607537200727368292531110641735233562112445528756863265722341254615211320833005020572905375559030564535671764470437357706853076567044337396008345860082611046637506335350767716909667306094360555573016920273577500305527009550436620341257122305853705239504357060357550574354003563334640307500665106103297176713838082420035925590652682960533331594252646944565031615871765536 \ No newline at end of file diff --git a/examples/Scenario4Bundle-file.smart-health-card b/examples/Scenario4Bundle-file.smart-health-card new file mode 100644 index 00000000..9d5b8957 --- /dev/null +++ b/examples/Scenario4Bundle-file.smart-health-card @@ -0,0 +1 @@ +{"verifiableCredential":["eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1VLLTsMwEPyX5Zo3LaU5Fi5wQuIhIdSD62wTI9uJ_IgoKP_OOimi4lHO-Lb27OzMeN9AWAslNM51tkxT2yFPrGLGNcikaxLOTGVTfGGqk2hTQns0EIHebKHMz4rz80W2mC8j6DmUb-B2HUL59Mn3lepkKuJQEM3vOKGU1-KVOdHqo0ClzNH3nhnBUUoG6wi4wQq1E0ze-s0zchdEbxthHtDYMKmEWZIlOTGG25XXlcRPY8BbKalr0kREZkduicFLeW8kAQza1huOZUaAjyIQaKZwwjIlJLXBY-t1bd0YZy161CG4a6bR0cUqgfVAgjeC7FwyF4YXWX4WZ6dxcch9Nwm7oaBIDwxD9KOc_Isc65jzdnQUftZh-I2ecS40XrTViOFtJXQ9irY7Eqr2i0IxN3KRtKZOQ0ipFVXK-xci4GMnLGcwrIcIur0o4jK4RYM6DD_MiEAt596MT8HmnVB7q4s4m8f5D1avDjfjN7_Ff_Nb5HGWx8XyT7_rb4D9lg503gE.9mWnszJEm8uEIGelBWN47iEJtn253GaepKARC8EDllX59xgUP2vCXIDEaKJsCiyy_pIgKSD2ua_J6lfxunCaAg"]} \ No newline at end of file diff --git a/examples/Scenario4Bundle-jws-payload-expanded.json b/examples/Scenario4Bundle-jws-payload-expanded.json new file mode 100644 index 00000000..40795927 --- /dev/null +++ b/examples/Scenario4Bundle-jws-payload-expanded.json @@ -0,0 +1,75 @@ +{ + "iss": "https://spec.smarthealth.cards/examples/issuer", + "nbf": 1628870759, + "vc": { + "type": [ + "https://smarthealth.cards#health-card", + "https://smarthealth.cards#immunization", + "https://smarthealth.cards#mmr", + "https://smarthealth.cards#varicella" + ], + "credentialSubject": { + "fhirVersion": "4.0.1", + "fhirBundle": { + "type": "collection", + "entry": [ + { + "fullUrl": "resource:0", + "resource": { + "name": [ + { + "family": "Youngster", + "given": [ + "Janet", + "B." + ] + } + ], + "birthDate": "2016-03-20", + "resourceType": "Patient" + } + }, + { + "fullUrl": "resource:1", + "resource": { + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/cvx", + "code": "94" + } + ] + }, + "patient": { + "reference": "resource:0" + }, + "occurrenceDateTime": "2017-05-10", + "resourceType": "Immunization" + } + }, + { + "fullUrl": "resource:2", + "resource": { + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/cvx", + "code": "94" + } + ] + }, + "patient": { + "reference": "resource:0" + }, + "occurrenceDateTime": "2021-01-29", + "resourceType": "Immunization" + } + } + ], + "resourceType": "Bundle" + } + } + } +} \ No newline at end of file diff --git a/examples/Scenario4Bundle-jws-payload-minified.json b/examples/Scenario4Bundle-jws-payload-minified.json new file mode 100644 index 00000000..9f58b694 --- /dev/null +++ b/examples/Scenario4Bundle-jws-payload-minified.json @@ -0,0 +1 @@ +{"iss":"https://spec.smarthealth.cards/examples/issuer","nbf":1628870759,"vc":{"type":["https://smarthealth.cards#health-card","https://smarthealth.cards#immunization","https://smarthealth.cards#mmr","https://smarthealth.cards#varicella"],"credentialSubject":{"fhirVersion":"4.0.1","fhirBundle":{"type":"collection","entry":[{"fullUrl":"resource:0","resource":{"name":[{"family":"Youngster","given":["Janet","B."]}],"birthDate":"2016-03-20","resourceType":"Patient"}},{"fullUrl":"resource:1","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"94"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2017-05-10","resourceType":"Immunization"}},{"fullUrl":"resource:2","resource":{"status":"completed","vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"94"}]},"patient":{"reference":"resource:0"},"occurrenceDateTime":"2021-01-29","resourceType":"Immunization"}}],"resourceType":"Bundle"}}}} \ No newline at end of file diff --git a/examples/Scenario4Bundle-jws.txt b/examples/Scenario4Bundle-jws.txt new file mode 100644 index 00000000..8f6054d0 --- /dev/null +++ b/examples/Scenario4Bundle-jws.txt @@ -0,0 +1 @@ +eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.1VLLTsMwEPyX5Zo3LaU5Fi5wQuIhIdSD62wTI9uJ_IgoKP_OOimi4lHO-Lb27OzMeN9AWAslNM51tkxT2yFPrGLGNcikaxLOTGVTfGGqk2hTQns0EIHebKHMz4rz80W2mC8j6DmUb-B2HUL59Mn3lepkKuJQEM3vOKGU1-KVOdHqo0ClzNH3nhnBUUoG6wi4wQq1E0ze-s0zchdEbxthHtDYMKmEWZIlOTGG25XXlcRPY8BbKalr0kREZkduicFLeW8kAQza1huOZUaAjyIQaKZwwjIlJLXBY-t1bd0YZy161CG4a6bR0cUqgfVAgjeC7FwyF4YXWX4WZ6dxcch9Nwm7oaBIDwxD9KOc_Isc65jzdnQUftZh-I2ecS40XrTViOFtJXQ9irY7Eqr2i0IxN3KRtKZOQ0ipFVXK-xci4GMnLGcwrIcIur0o4jK4RYM6DD_MiEAt596MT8HmnVB7q4s4m8f5D1avDjfjN7_Ff_Nb5HGWx8XyT7_rb4D9lg503gE.9mWnszJEm8uEIGelBWN47iEJtn253GaepKARC8EDllX59xgUP2vCXIDEaKJsCiyy_pIgKSD2ua_J6lfxunCaAg \ No newline at end of file diff --git a/examples/Scenario4Bundle-qr-code-0.png b/examples/Scenario4Bundle-qr-code-0.png new file mode 100644 index 00000000..eed327b9 Binary files /dev/null and b/examples/Scenario4Bundle-qr-code-0.png differ diff --git a/examples/Scenario4Bundle-qr-code-numeric-value-0.txt b/examples/Scenario4Bundle-qr-code-numeric-value-0.txt new file mode 100644 index 00000000..e18ba790 --- /dev/null +++ b/examples/Scenario4Bundle-qr-code-numeric-value-0.txt @@ -0,0 +1 @@ +shc:/56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736010441313139703274243576430845660631524008256008743672285928553823090574392812722950285866303550343460646007632734003153051034773256331220422070633332080471627539057625356926312633546062527531343926413957262668620559393665700324282756533027327707697711034205642211610923644053002105274031081232650663566762307229362432067334302640040030413455276866032263773327066559652140406626097460077436680424037756007003775459552453757159277123443230642442452863343926260508434363543735441121533052636903623724456255726054253156421162203677520459723445405220617628365230457474612863293143214400710453550344457604090422260752095337035440685857412058615622102574762507444342430742450955755454591233746410665221282374752312303454502870540908617755653640577145590028055654380703436939416034257129433612606944102468690560032875330630377130453436036067254143300075546007263265312654746928542872690366076130073744320923235032602420710812093239112764654121106807700764115708230452732361576133105025575033530827264275114376391050695307231263580803065824011264426570772924641172242826566321423307106024297165050806265256673020372211242363634308127558403505732243282324523029702260767650672858303823057252502909635775726522522058 \ No newline at end of file diff --git a/examples/Scenario4Bundle.json b/examples/Scenario4Bundle.json new file mode 100644 index 00000000..53ca44cd --- /dev/null +++ b/examples/Scenario4Bundle.json @@ -0,0 +1,76 @@ +{ + "resourceType": "Bundle", + "type": "collection", + "entry": [ + { + "fullUrl": "resource:0", + "resource": { + "resourceType": "Patient", + "name": [ + { + "family": "Youngster", + "given": [ + "Janet", + "B." + ] + } + ], + "birthDate": "2016-03-20" + } + }, + { + "fullUrl": "resource:1", + "resource": { + "resourceType": "Immunization", + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/cvx", + "code": "94" + } + ] + }, + "patient": { + "reference": "resource:0" + }, + "occurrenceDateTime": "2017-05-10", + "performer": [ + { + "actor": { + "display": "ABC General Hospital" + } + } + ], + "lotNumber": "0000001" + } + }, + { + "fullUrl": "resource:2", + "resource": { + "resourceType": "Immunization", + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/cvx", + "code": "94" + } + ] + }, + "patient": { + "reference": "resource:0" + }, + "occurrenceDateTime": "2021-01-29", + "performer": [ + { + "actor": { + "display": "ABC General Hospital" + } + } + ], + "lotNumber": "0000007" + } + } + ] +} \ No newline at end of file diff --git a/examples/generate-examples.rb b/examples/generate-examples.rb index b0d97e83..4c48548f 100644 --- a/examples/generate-examples.rb +++ b/examples/generate-examples.rb @@ -3,7 +3,6 @@ module HealthCards class COVIDHealthCardCustom < HealthCards::COVIDHealthCard - additional_types 'https://smarthealth.cards#labresult' allow type: FHIR::Observation, attributes: %w[status code subject effectiveDateTime performer referenceRange valueString valueQuantity valueCodeableConcept labCode patient] end end @@ -14,14 +13,39 @@ def private_key keyset.keys[0] end +examples_to_diseases = { + "Scenario1Bundle.json" => ["covid19"], + "Scenario2Bundle.json" => ["covid19"], + "Scenario3Bundle.json" => ["covid19"], + "Scenario4Bundle.json" => ["mmr", "varicella"], +} + @private_key = private_key @issuer = HealthCards::Issuer.new(key: @private_key, url: 'https://spec.smarthealth.cards/examples/issuer') Dir.glob('Scenario*Bundle.json') do |filename| puts filename + bundle = FHIR::Bundle.new(JSON.parse(File.read(filename))) + + fhir_types = Set.new(bundle.entry.map {|e| e.resource.resourceType}) + fhir_types_to_vc_types = { + "Observation" => "https://smarthealth.cards#laboratory", + "Immunization" => "https://smarthealth.cards#immunization" + } + + additional_vc_types = (Set.new(fhir_types.map {|t| fhir_types_to_vc_types[t]}) - [nil]).to_a + additional_vc_types += examples_to_diseases[filename].map {|d| "https://smarthealth.cards#" + d} + + corrected_types = Class.new(HealthCards::COVIDHealthCardCustom) do + fhir_version '4.0.1' + + additional_vc_types.each {|t| additional_types t} + end + + outputPrefix = File.basename(filename, File.extname(filename)) - jws = @issuer.issue_jws(bundle, type: HealthCards::COVIDHealthCardCustom) + jws = @issuer.issue_jws(bundle, type: corrected_types) payload = HealthCards::HealthCard.decompress_payload(jws.payload) smarthealthcard = HealthCards::Exporter.download([jws]) qr_codes = HealthCards::Exporter.qr_codes(jws)