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: jupyterhealth-exchange/apis.md
+13-15
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ title: Working with APIs
8
8
- The Patient authorization code is generated by the server and then shared out-of-band as a secret link with the user.
9
9
- OAuth is configured from the Django Admin page (See Getting Started above).
10
10
- Endpoints and configuration details can be discovered from the OIDC metadata endpoint:
11
-
`/o/.well-known/openid-configuration`
11
+
`/o/.well-known/openid-configuration`
12
12
- The returned Access Token should be included in the `Authorization` header for all API requests with the prefix `Bearer `.
13
13
- Because the Patient authorization code is generated by the server, the PKCE code challenge and code verifier must be static values and set by the env vars (example below). The client then sends this `code_verifier` along with the authorization code to obtain tokens.
- The `FHIR Patient` endpoint returns a list of Patients as a FHIR Bundle for a given Study ID passed as query parameter`_has:Group:member:_id` or alternatively a single Patient matching the query parameter `identifier=<system>|<value>`
| `patient._has:Group:member:_id` | `30001` | Filter by Patients that are in the Study with ID 30001 |
197
-
| `patient` | `40001` | Filter by single Patient with ID 40001 |
198
-
| `patient.identifier` | `http://ehr.example.com|abc123` | Filter by single Patient with Identifier System `http://ehr.example.com` and Value `abc123` |
199
-
| `code` | `https://w3id.org/openmhealth|omh:blood-pressure:4.0` | Filter by Type/Scope with System `https://w3id.org/openmhealth` and Code `omh:blood-pressure:4.0` |
Copy file name to clipboardExpand all lines: jupyterhealth-exchange/architecture.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ Django is a mature and well-supported web framework but was specifically chosen
14
14
### DRF Serializers and Pydantic
15
15
16
16
- The Django Rest Framework uses the concept of Serializers to validate schemas, whereas the FHIR validator uses Pydantic.
17
+
17
18
- It is not reasonable to re-write the entire validation in the Serializer, so instead a combination of the two are used:
19
+
18
20
- Top-level fields (most importantly the `id` of a record) are managed by the Serializer.
19
21
- Nested fields (for example `code{}.coding[].system` above) are configured as a JSON field in the Serializer (so the top level field is this example is `code`) and then Pydantic is used to validate the whole schema including nested JSON.
1. Use the PKCE verifier to generate the [PKCE code challenge](https://tonyxu-io.github.io/pkce-generator).
51
53
1. Return to the `.env` file
52
-
- Update `OIDC_CLIENT_ID` with the newly created app Client ID
53
-
- Update the `OIDC_RSA_PRIVATE_KEY` with the newly created Private Key
54
-
- Update `PATIENT_AUTHORIZATION_CODE_CHALLENGE` and `PATIENT_AUTHORIZATION_CODE_VERIFIER` with PKCE static values generated above
55
-
- Restart the python environment and Django server
54
+
- Update `OIDC_CLIENT_ID` with the newly created app Client ID
55
+
- Update the `OIDC_RSA_PRIVATE_KEY` with the newly created Private Key
56
+
- Update `PATIENT_AUTHORIZATION_CODE_CHALLENGE` and `PATIENT_AUTHORIZATION_CODE_VERIFIER` with PKCE static values generated above
57
+
- Restart the python environment and Django server
56
58
1. Browse to http://localhost:8000/ and log in with the credentials `[email protected]``Jhe1234!`and you should be directed to the `/portal/organizations` path with some example Organizations is the dropdown.
57
59
58
60
```{note} Static PKCE Values
@@ -69,19 +71,21 @@ It is understood this runs against best practices; however, this is only used fo
69
71
After logging in on Windows, users are redirected to the portal, but a blank screen persists. This issue seems related to the `oidc-client-ts` library but is actually due to incorrectly set environment variables on Windows.
70
72
71
73
#### Cause
74
+
72
75
On Windows systems (particularly when running Django via Visual Studio Code or Git Bash), the environment variables related to OIDC in `settings.py` may become incorrectly formatted. This causes URLs to be malformed, preventing proper authentication.
The solution is to explicitly hardcode the correct values to OIDC variables in your `settings.py`. This will prevent incorrect path injections and ensure proper URL formation, resolving the blank screen issue after login on Windows machines.
Copy file name to clipboardExpand all lines: jupyterhealth-exchange/overview.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,10 @@ JupyterHealth Exchange is a Django web application that facilitates the sharing
7
7
In the context of JupyterHealth, data producers are typically study participants (FHIR *Patients*) using the [CommonHealth Android App](https://play.google.com/store/apps/details?id=org.thecommonsproject.android.phr) linked to personal devices (e.g., Glucose Monitors), and data consumers are typically researchers (FHIR *Practitioners*).
@@ -20,4 +22,4 @@ In the context of JupyterHealth, data producers are typically study participants
20
22
21
23
## Status
22
24
23
-
This project is currently in a Proof of Concept stage. You can monitor progress in our [GitHub Project](https://github.com/orgs/the-commons-project/projects/8).
25
+
This project is currently in a Proof of Concept stage. You can monitor progress in our [GitHub Project](https://github.com/orgs/the-commons-project/projects/8).
0 commit comments