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: aidbox-forms/aidbox-forms-renderer-offline-mode/README.md
+14-15Lines changed: 14 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,28 +80,27 @@ When the interceptor returns `null`, the renderer handles the request itself (us
80
80
- An Aidbox instance is running localy (e.g. at `http://localhost:8081`).
81
81
- FHIR resources (Patient, Questionnaires, and pre-created QuestionnaireResponses) are added to the Aidbox instance
82
82
- A JWT token with access to the FHIR and SDC APIs is created (see [Aidbox Client Credentials documentation](https://www.health-samurai.io/docs/aidbox/tutorials/security-access-control-tutorials/client-credentials-grant):
83
-
Go to /ui/console#/iam/sandbox/client.
84
-
Check the JWT checkbox.
85
-
Specify the Client ID and Client Secret.
86
-
In the sandbox console, execute the API requests by clicking Run for each call sequentially.
87
-
Copy the JWT from the Access token field.
83
+
-Go to /ui/console#/iam/sandbox/client.
84
+
-Check the JWT checkbox.
85
+
-Specify the client id and client secret. The default credentials are `client_id=basic`, `secret=secret` (you may replace them with any other valid values. Throughout the documentation, this pair is referred to as client:secret. Use the values you provided in the request)
86
+
-In the sandbox console, execute the API requests by clicking Run for each call sequentially.
87
+
-Copy the JWT from the Access token field.
88
88
- QuestionnaireResponses must be created upfront on the server with:
89
-
-`status: in-progress`
90
-
-`questionnaire` reference pointing to a Questionnaire canonical URL
91
-
-`subject` reference pointing to the patient (e.g. `Patient/pt-1`)
89
+
-`status: in-progress`
90
+
-`questionnaire` reference pointing to a Questionnaire canonical URL
91
+
-`subject` reference pointing to the patient (e.g. `Patient/pt-1`)
92
92
93
93
## Setup
94
94
95
95
1. Open `index.html` in a text editor
96
-
2. Set `AIDBOX_BASE_URL` to your Aidbox instance URL (e.g. `http://localhost:8081`)
96
+
2. Set `AIDBOX_BASE_URL` to your Aidbox instance URL (e.g. `http://localhost:8081`) and adjust `renderer-webcomponent.js` link on line 9 (example: `http://localhost:8081/static/aidbox-forms-renderer-webcomponent.js`)
97
97
3. Set `AIDBOX_TOKEN` to a valid JWT token
98
98
4. Set `PATIENT_ID` to the patient whose assigned forms should be loaded
99
-
5. Replace `[AIDBOX_BASE_URL]` with your Aidbox instance URL in link to `renderer-webcomponent.js` (example: `http://localhost:8081/static/aidbox-forms-renderer-webcomponent.js`)
7. Serve `index.html` via any HTTP server (e.g. `npx serve .`) and open generated link in a browser (e.g. `http://localhost:3000`)
103
+
6. Serve `index.html` via any HTTP server (e.g. `npx serve .`) and open generated link in a browser (e.g. `http://localhost:3000`)
105
104
106
105
## Usage
107
106
@@ -144,8 +143,8 @@ See the [Aidbox Forms documentation](https://docs.aidbox.app/modules/aidbox-form
144
143
- Make sure you opened the page online at least once before going offline.
145
144
- Open the browser devtools and check that cached resources exist in localStorage.
146
145
- Submission requires connectivity; go back online and click Submit again (or wait for auto-sync).
147
-
3. The ./fixtures/load-fixtures.sh http://localhost:8081basic:secret command stalls
148
-
- Verify the client_id and the client secret in basic:secret are correct.
146
+
3. The ./fixtures/load-fixtures.sh http://localhost:8081client:secret command stalls
147
+
- Verify the client_id and the client secret in client:secret are correct.
149
148
- Verify the Aidbox base URL is correct and reachable (e.g. `http://localhost:8081`).
150
149
- Ensure you run the script from the correct working directory — the one that contains `index.html` (so relative paths used by the script resolve correctly).
0 commit comments