What is a launch context?
...
If an external system has an access token to the Reference API server (received as part of the SMART on FHIR launch flow), the external system can also follow a similar process as the HSPC Sandbox Manager uses to launch an app. The following flow is a simplified variant of the launch registration process, using the CDS Hooks sandbox as an example external system. The ISS Server is the a tenant on the HSPC Reference API (FHIR) server that launches the CDS Hooks sandbox. In this flow, the example SMART app should be registered with the HSPC Sandbox instance prior to attempting to launch the app from the CDS Hooks sandbox.
Protocol Details
...
Code Block | ||
---|---|---|
| ||
{"client_id":"bilirubin_chart","parameters":{"patient":"BILIBABY","need_patient_banner":false}} |
...
Step 2: Registering the launch context
The launch context is registered with the HSPC Reference API server by sending an HTTP POST to the /_services/smart/Launch endpoint. The request must contain an access token for the HSPC Reference API server. The launching system should obtain this token as part of the preconditions, for example, through a SMART on FHIR launch flow.
Code Block | ||
---|---|---|
| ||
HTTP POST Authorization:Bearer ... Payload: {"client_id":"bilirubin_chart","parameters":{"patient":"BILIBABY","need_patient_banner":false}} |
Step 3: Launch context is synchronized
The launch context is enriched with a launch_id that is the key to the launch context given to the downstream app. The launch context must be synchronized between the HSPC Reference API server and the HSPC Reference Auth server. This synchronization allows both servers to check the launch context for various APIs. For example, the HSPC Reference Auth server can determine if a patient context has been established when issueing a patient-scope access token, and the HSPC Reference API server can remove results from a query that are not for the patient in context.
Step 4: Launch context is returned
Code Block | ||
---|---|---|
| ||
{"launch_id":"GNpcsR","created_at":"Mon Nov 06 23:31:53 UTC 2017","created_by":"...","parameters":{"patient":"BILIBABY","need_patient_banner":false},"username":"none"} |
...