< Back

Launch the Chart

The Patient Chart Viewer is launched using the SMART on FHIR protocol, which allows an external application to securely open the chart in context for a specific patient. You initiate the launch by constructing a URL with the required parameters and redirecting the user’s browser to that URL.

You can embed the chart or launch it via redirect, using standard FHIR context parameters such as patient or encounter. Role-based access controls are enforced through OAuth scopes, user roles, and tenant-level configuration.

Prerequisites

Before launching the Patient Chart Viewer, verify that:

  • Your tenant has the Patient Chart Viewer feature enabled
  • The patient has a valid FHIR Patient ID in the Health Gorilla system
  • Your system supports SMART on FHIR authorization flows
  • You have a registered redirect URI in your client configuration

To launch the Patient Chart Viewer

  1. Construct the SMART launch URL with the required query parameters: iss, launch, and any applicable context parameters.
  2. Redirect the user’s browser to the constructed launch URL.
  3. Authenticate the user through the SMART on FHIR authorization flow.
  4. Capture the code parameter from the authorization server redirect.
  5. Exchange the authorization code for an access token by sending a POST request to the token endpoint.
  6. Store the access token securely for the duration of the viewer session.
  7. Use the access token to allow the embedded or redirected viewer to retrieve and display the patient’s clinical data.
  8. Monitor the session and terminate it when the user exits the viewer or the token expires.