Add SMART Health Links eligibility example#36
Open
aleksandrkislitsyn wants to merge 2 commits into
Open
Conversation
Adds an Aidbox-integrated SMART Health Links (SHL) example built on Bun + TypeScript. It shares the result of an async real-time eligibility (RTE) check with an unauthenticated client: kick off the check, receive a shlink: carrying the encryption key, poll the manifest until finalized, then decrypt the CoverageEligibilityResponse client-side. Includes a self-contained browser viewer (src/viewer.html) that resolves and decrypts links with WebCrypto, with a step-by-step view of each HTTP call. The viewer renders the minted link as a scannable QR code via an inline, dependency-free QR encoder (no CDN, satisfying the strict CSP). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Aidbox-integrated SMART Health Links (SHL) example built on Bun + TypeScript. It securely shares the result of a long-running real-time eligibility (RTE) check with an unauthenticated client:
shlink:carrying an encryption keycan-change→finalized) while the async job runsalg: dir/enc: A256GCM) and decrypts it client-sideThe SHL key is the only secret — the server stores only ciphertext.
What's included
Bun.serve, no build step. Mints links, runs the async RTE job, manages manifest lifecycle, delivers the encrypted file.SHLinkcustom resource and anshl-appApp routing$kickoff(authenticated),manifest/{shlId}, andfile/{fileId}(public).src/viewer.html, served atGET /) — resolves ashlink:and decrypts it with WebCrypto, with a step-by-step view of each HTTP call behind the flow.Output
A FHIR
CoverageEligibilityResponse, encrypted as a JWE.Verification
bunx tsc --noEmitpasses.docker compose up --build(Aidbox + app); kickoff mints links and the viewer decrypts the result.🤖 Generated with Claude Code