Launch Contexts
The SMART on FHIR Patient Chart uses launch context parameters to determine what data to retrieve and how to configure the session. These parameters help ensure that the correct patient and clinical context are passed into the viewer at the time of launch.
Supported Context Parameters
When launching the viewer, include one or more of the following parameters in your SMART launch request:
patient: The FHIR ID of the patient whose chart should be displayed. This is the most commonly required parameter and enables the viewer to retrieve patient-scoped resources.encounter: The FHIR ID of the active encounter, if launching from within a specific visit or hospitalization. This may be used to prioritize display of recent records.practitioner: The FHIR ID of the current user or clinician. This can influence access control ifuser/*.*scopes are used.location: The FHIR ID of the facility or department. Optional but useful for audit logging or context-specific filtering.
Launch Behavior
- If a
patientparameter is not provided, the viewer will not launch. A valid FHIR ID is required. - If
encounteris provided, the viewer may highlight relevant sections, such as vitals or notes from the current encounter. - The
practitionerparameter is used in conjunction with thefhirUserscope to enforce role-based access controls or personalize views.
Use Cases
You can use launch contexts to:
- Open the chart to a specific patient record during an EHR encounter.
- Pass encounter or admission IDs to frame recent care activity.
- Apply user-level access policies based on who is launching the viewer.
- Track where the launch originated from for auditing and analytics.