FHIR Chat · IPS · smart/health-cards

Stream: smart/health-cards

Topic: IPS


view this post on Zulip Grahame Grieve (Sep 13 2021 at 22:01):

If you'd like to convert an IPS to a SHC, you can do this:

bingo, you have yourself an SHC generated from the IPS.

view this post on Zulip Grahame Grieve (Sep 13 2021 at 22:01):

qr.png

view this post on Zulip Grahame Grieve (Sep 13 2021 at 22:02):

That was generated from @Peter Jordan's sample IPS. It's necessary that the IPS has immunizations coded with one of the valid SHC coding systems, or it will be ignored.

view this post on Zulip Grahame Grieve (Sep 13 2021 at 22:03):

There's a piece of functionality that IPS has that SHC doesn't, and maybe it should. In IPS, you can say, 'the patient hasn't had this type of vaccination'. It seems to me like that would be an edge case for covid certs

view this post on Zulip Daniel Lee (Sep 14 2021 at 13:17):

The payload below is what I get when I scan the QR code. It looks like it is missing the shc:/ header in the payload.

56762959532654603460292540772804336028702865676754222809286237253760287028647167452228092862676756640775452733594526440840395570532363315424440541063307566255713324083245655533382608634305290341261266314211605736010841353153717074243574414406734158062960381252755236356224593774032473582003427131374511262236630420060310040630532733280565082055557255065627326227662109390503322837745370713842542541543776623009741071537071301204712237644410585971715305673361416139454321293021125843200828103935761068655752000822743376254445225433571023125460617443375027633405246505045609733207670604732558063640342636602735456658725568350639544028366830036900601112285254654153703028607671611234296756444575750934066621230825115271052136653069654560370460636023267645242227032865405765105561564010392512076223365620003252031109375209624220695977556677663840086625596105706155074256032333746929052477423462653435502574295204056405063455736233580665345068655936567337762111116857562159122465415068703226221160446231283606560539107522337131540368385054402704327138565964236872343930263440674555123052537337223538356875452050335977722254286261606172613643314300637168386236767024303353743461033856675737347068450306343362387353275854554455725856107364094464622543504075236900640336657573092576642864662807773539122120013640353324066836417245085630285374357774583227762063215065392358312635271211773921672108066223247441325011405945312744260420631070113554766571773054645372536058663359127474

view this post on Zulip Daniel Lee (Sep 14 2021 at 13:19):

When I do manually add the header though it becomes valid and I'm able to decode the bundle.

view this post on Zulip Grahame Grieve (Sep 14 2021 at 15:16):

mine? oh?

view this post on Zulip Paul Denning (Sep 14 2021 at 15:25):

I got the same (no "shc:/") when scanned using the IOS shortcut that Josh pointed out in https://chat.fhir.org/#narrow/stream/284830-smart.2Fhealth-cards/topic/iPhone.20camera.20No.20Usable.20Data/near/239810439

view this post on Zulip Grahame Grieve (Sep 14 2021 at 15:28):

weird. my code is definitely feeding shc:/ in at the start

view this post on Zulip Grahame Grieve (Sep 14 2021 at 15:58):

ok, so this is something that actually confused me. The spec says:

When embedding a JWS string in QR codes, the JWS string SHALL be encoded as Numerical Mode QR codes consisting of the digits 0-9

So I turned numeric mode on the QRCode library I'm using (ZXing). Which means that it ignores "shc:/" since they're not numeric.

So I don't have a clue what I'm supposed to do here....

view this post on Zulip Reece Adamson (Sep 14 2021 at 16:04):

The JWS segment is Numeric encoded, but theshc:/ segment is byte encoded. You need to use a library that supports mixed mode qr codes (e.g. see this Javascript QR Code Library).

This can also be seen in action in the specification example generation code here.

view this post on Zulip Neelima Karipineni (Sep 14 2021 at 16:05):

Should be a multi-segment code with the shc:/ portion being bytes and the rest numeric. We have a js example at https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb and C# example at https://github.com/StateOfCalifornia/DigitalCovid19VaccineRecord-API/blob/a98b914440968cc98dd123dbc74886694a8f2a68/Infrastructure/QrCodeApi/QrApiService.cs.

view this post on Zulip Josh Mandel (Sep 14 2021 at 16:06):

https://github.com/smart-on-fhir/health-cards/wiki/Libraries-for-SMART-Health-Cards has a set of QR generation libraries that are known to support >1 segment with different encodings

view this post on Zulip Grahame Grieve (Sep 14 2021 at 16:06):

well, I don't get to use any of those, and I don't have access to a qrcode generator that does segments.

view this post on Zulip Josh Mandel (Sep 14 2021 at 16:07):

What does "get to" mean?

view this post on Zulip Josh Mandel (Sep 14 2021 at 16:07):

https://github.com/nayuki/QR-Code-generator has c bindings as a common denomniator

view this post on Zulip Grahame Grieve (Sep 14 2021 at 16:07):

yes just saw that. Guess I'm going that path

view this post on Zulip Josh Mandel (Sep 14 2021 at 16:08):

(this is what the EU covid cert spec defines base45 encoding to avoid -- it's a good trick; if we wanted to use it with JWTs instead of CBOR, we'd have to introduce another compression step into the mix, to have binary data to pass into that encoding.)


Last updated: Apr 12 2022 at 19:14 UTC