You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cookbook/ml_model_deployment.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ No FHIR parsing code needed—define the mapping once, use it everywhere.
230
230
231
231
!!! tip "Explore Interactively"
232
232
233
-
Step through the full flow in [notebooks/fhir_ml_workflow.ipynb](../../notebooks/fhir_ml_workflow.ipynb): FHIR bundle → Dataset → DataFrame → inference → RiskAssessment.
233
+
Step through the full flow in [notebooks/fhir_ml_workflow.ipynb](https://github.com/dotimplement/HealthChain/blob/main/notebooks/fhir_ml_workflow.ipynb): FHIR bundle → Dataset → DataFrame → inference → RiskAssessment.
234
234
235
235
Now let's see how this pipeline plugs into each deployment pattern.
Where `/CN=myapp` is the subject name (e.g., your app name). The subject name doesn't have functional impact but is required for creating an X.509 certificate.
48
48
49
-
#### Upload Public Key
49
+
#### Register Public Key via JWKS URL
50
50
51
-
1. In your Epic app configuration, upload the `publickey509.pem` file
52
-
2. Click **Save**
53
-
3. Note down your **Non-Production Client ID**
51
+
Epic now requires registering your public key via a **JWKS (JSON Web Key Set) URL** instead of direct file upload. For quick and dirty development/testing purposes, you can use ngrok to expose your JWKS server publicly.
52
+
53
+
1.**Set up a JWKS server**:
54
+
```bash
55
+
# Ensure your .env has the private key path
56
+
# EPIC_CLIENT_SECRET_PATH=path/to/privatekey.pem
57
+
# EPIC_KEY_ID=healthchain-demo-key
58
+
59
+
python scripts/serve_jwks.py
60
+
```
61
+
62
+
2.**Get a free static domain from ngrok**:
63
+
- Sign up at [ngrok.com](https://ngrok.com)
64
+
- Claim your free static domain from the dashboard
65
+
- Example: `your-app.ngrok-free.app`
66
+
67
+
3.**Expose your JWKS server**:
68
+
```bash
69
+
ngrok http 9999 --domain=your-app.ngrok-free.app
70
+
```
71
+
72
+
4.**Register in Epic App Orchard**:
73
+
74
+
- In your Epic app configuration, locate the **Non-Production JWK Set URL** field
EPIC_KEY_ID=healthchain-demo-key # Must match the kid in your JWKS
76
107
```
77
108
109
+
**Important**: The `EPIC_KEY_ID` must match the Key ID (`kid`) you used when creating your JWKS. This allows Epic to identify which key to use for JWT verification.
110
+
78
111
### Using Epic Sandbox in Code
79
112
80
113
```python
@@ -91,6 +124,20 @@ gateway = FHIRGateway()
91
124
gateway.add_source("epic", EPIC_URL)
92
125
```
93
126
127
+
### Testing Your Connection
128
+
129
+
After configuration:
130
+
131
+
```bash
132
+
python scripts/check_epic_connection.py
133
+
```
134
+
135
+
This script will:
136
+
1. Load your Epic configuration
137
+
2. Create a JWT assertion with the `kid` header
138
+
3. Request an access token from Epic
139
+
4. Test a FHIR endpoint query
140
+
94
141
### Available Test Patients
95
142
96
143
Epic provides [sample test patients](https://fhir.epic.com/Documentation?docId=testpatients) including:
@@ -99,6 +146,18 @@ Epic provides [sample test patients](https://fhir.epic.com/Documentation?docId=t
0 commit comments