Skip to content

Commit ef32060

Browse files
spicyfalafelclaude
andcommitted
README: split Architecture (components) from a new Flow section
Architecture goes back to a component flowchart (now with the Payer and plain-language edge labels); the step-by-step sequence moves to its own Flow section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1488765 commit ef32060

1 file changed

Lines changed: 33 additions & 15 deletions

File tree

aidbox-integrations/smart-health-link/README.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ The link carries a key because there is no logged-in user to protect the data, a
2424

2525
```mermaid
2626
flowchart LR
27-
Client[Prospective member<br/>client app]
28-
Aidbox[Aidbox<br/>FHIR Server]
29-
App[SHL App<br/>Bun + TypeScript]
30-
31-
Client -->|1. POST $kickoff| Aidbox
32-
Aidbox -->|operation| App
33-
App -->|shlink: + key| Client
34-
App -.->|async: produce + encrypt result| Aidbox
35-
Client -->|2. POST manifest no-auth| Aidbox
36-
Aidbox -->|operation| App
37-
App -->|status + encrypted file| Client
38-
39-
style Aidbox fill:#e1f5fe
40-
style App fill:#f3e5f5
41-
style Client fill:#e8f5e8
27+
C["Client (browser)<br/>prospective member"]
28+
A["Aidbox (FHIR server)<br/>routes operations, stores the SHLink"]
29+
S["SHL App (Bun backend)<br/>SHL logic + eligibility job"]
30+
P["Payer<br/>eligibility source (simulated)"]
31+
32+
C <-->|"HTTP: kickoff / manifest / file"| A
33+
A -->|"proxies operations"| S
34+
S -->|"stores the encrypted SHLink"| A
35+
S -->|"checks eligibility (RTE)"| P
4236
```
4337

4438
**Components:**
@@ -47,6 +41,30 @@ flowchart LR
4741

4842
**Output:** the content shared through the link is a FHIR `CoverageEligibilityResponse`, encrypted as a JWE (`alg: dir`, `enc: A256GCM`) under the SHL key.
4943

44+
## Flow
45+
46+
```mermaid
47+
sequenceDiagram
48+
actor C as Client (browser)
49+
participant A as Aidbox (FHIR server)
50+
participant S as SHL App (Bun backend)
51+
participant P as Payer
52+
53+
C->>A: POST $kickoff (member details)
54+
A->>S: Aidbox routes the call to the backend
55+
S-->>C: shlink: + key (returned right away)
56+
57+
Note over S,P: background job (the payer call is simulated here)
58+
S->>P: check eligibility (RTE)
59+
P-->>S: eligibility result
60+
S->>A: encrypt the result, store it on the SHLink
61+
62+
C->>A: POST manifest (poll, no auth)
63+
A->>S: Aidbox routes the call to the backend
64+
S-->>C: status; once ready, the encrypted file
65+
Note over C: decrypt locally with the key from the link
66+
```
67+
5068
## Aidbox resources
5169

5270
The [init bundle](init-bundle/bundle.json) provisions four resources at startup. The flow creates two more at runtime.

0 commit comments

Comments
 (0)