Package | ca.infoway.io.halo |
Resource Type | OperationDefinition |
Id | set-context |
FHIR Version | R4 |
Source | https://simplifier.net/resolve?scope=ca.infoway.io.halo@1.0.0-dft-preballot&canonical=http://fhir.infoway-inforoute.ca/io/HALO/OperationDefinition/set-context |
URL | http://fhir.infoway-inforoute.ca/io/HALO/OperationDefinition/set-context |
Version | 1.0.0 |
Status | active |
Name | SetContext |
Title | Set Context |
Description | Sets the SMART Launch context parameters within the SoFA with support for creating resources if needed. |
Type | false |
Kind | operation |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
The $set-context operation is a FHIR operation within the Health Application Lightweight Protocol (HALO) framework, enabling Point of Care (PoC) systems without native FHIR servers or Identity Providers (IdPs) to establish clinical context for a SMART on FHIR Accelerator (SoFA) launch. This operation allows the PoC system to transmit FHIR resources—such as Patient, Encounter, and related context—to the SoFA, where these resources are stored on a centralized jurisdictional FHIR server.
Upon execution, $set-context returns an opaque launchID, which the PoC system includes as a launch parameter in the SMART on FHIR launch URL. The SMART application then uses this launch parameter in its authorization request, enabling the Identity Provider to reference the stored context resources and populate the necessary SMART launch context parameters in the token response.
The context is sent in the form of resource references and miscellaneous parameter values, following the SMART on FHIR launch context parameter structure. Optionally, the PoC system can include actual resource instances within a Bundle in the resources parameter, allowing the SoFA to create and store these resources if needed. This supports scenarios where context resources either exist on the centralized server or are created on-demand, accommodating diverse jurisdictional requirements.
{ "resourceType": "OperationDefinition", "id": "set-context", "text": { "status": "additional", "div": "<!-- snip (see above) -->" }, "url": "http://fhir.infoway-inforoute.ca/io/HALO/OperationDefinition/set-context", "version": "1.0.0", "name": "SetContext", "title": "Set Context", "status": "active", "kind": "operation", "experimental": false, "description": "Sets the SMART Launch context parameters within the SoFA with support for creating resources if needed.", "code": "set-context", "system": true, "type": false, "instance": false, "inputProfile": "http://fhir.infoway-inforoute.ca/io/HALO/StructureDefinition/set-context-input-parameters", "outputProfile": "http://fhir.infoway-inforoute.ca/io/HALO/StructureDefinition/set-context-output-parameters", "parameter": [ { "name": "appID", "use": "in", "min": 0, "max": "1", "documentation": "The ID of the SMART App for which the context is being set. This SHALL be the app's ID as listed within the jurisdictional App Catalog. This parameter is optional for the current release of HALO; however, jurisdictions may choose to require its presence. In such cases, the requirement of this parameter will be communicated to PoC vendors out of band.", "type": "string" }, { "name": "patient", "use": "in", "min": 0, "max": "1", "documentation": "A reference to the current Patient in context. This SHALL be a reference to a resource contained within the `resources` Bundle parameter, or a resource that already exists within the SoFA (depending on the Jurisdictional implementation).", "type": "Reference" }, { "name": "encounter", "use": "in", "min": 0, "max": "1", "documentation": "A reference to the current Encounter in context. This SHALL be a reference to a resource contained within the `resources` Bundle parameter, or a resource that already exists within the SoFA (depending on the Jurisdictional implementation).", "type": "Reference" }, { "name": "fhirContext", "use": "in", "min": 0, "max": "*", "documentation": "References to other resources that are related to the current context. These SHALL be references to resources contained within the `resources` Bundle parameter, or resources that already exists within the SoFA (depending on the Jurisdictional implementation).", "type": "Reference" }, { "name": "fhirUser", "use": "in", "min": 0, "max": "1", "documentation": "A reference to the user (i.e., PractitionerRole) who is initiating the launch. This will be communicated to the SMART App via the fhirUser claim within the ID Token when the `openid` or `fhirUser` scope is requested. This SHALL be a reference to a resource contained within the `resources` Bundle parameter, or a resource that already exists within the SoFA (depending on the Jurisdictional implementation).", "type": "Reference" }, { "name": "need_patient_banner", "use": "in", "min": 0, "max": "1", "documentation": "The SMART on FHIR need_patient_banner launch context parameter.", "type": "boolean" }, { "name": "intent", "use": "in", "min": 0, "max": "1", "documentation": "The SMART on FHIR intent launch context parameter.", "type": "string" }, { "name": "smart_style_url", "use": "in", "min": 0, "max": "1", "documentation": "The SMART on FHIR smart_style_url launch context parameter.", "type": "string" }, { "name": "tenant", "use": "in", "min": 0, "max": "1", "documentation": "The SMART on FHIR tenant launch context parameter.", "type": "string" }, { "name": "resources", "use": "in", "min": 0, "max": "1", "documentation": "A [SetContextTransactionBundle](https://simplifier.net/halo/setcontexttransactionbundle) capturing the resources to be populated within the SoFA as a result of the $set-context operation. The bundle type is `transaction` and SHALL only contain resources which are covered by and conform to the profiles defined in [CA Core+](https://simplifier.net/ca-core).", "type": "Bundle" }, { "name": "launchID", "use": "out", "min": 0, "max": "1", "documentation": "An opaque identifier generated for this operation, representing the context set, such as patient or user session information. The launchID SHALL always be populated for a successful $set-context operation.", "type": "string" }, { "name": "resourcesResponse", "use": "out", "min": 0, "max": "1", "documentation": "A [SetContextTransactionResponseBundle](https://simplifier.net/halo/setcontexttransactionresponsebundle) which communicates the outcome of the create interaction on the SoFA for each resource included in the input transaction Bundle of the $set-context operation. The bundle type is `transaction-response` and SHALL be present if there was a corresponding Bundle provided in the input and the resulting transaction was successful. If present, the output Bundle SHALL contain one entry per entry in the corresponding input `transaction` Bundle. This parameter is required if the `resources` parameter was provided in the input.", "type": "Bundle" }, { "name": "outcome", "use": "out", "min": 1, "max": "*", "documentation": "An OperationOutcome resource detailing the outcome (e.g., success, failure) of the operation.", "type": "OperationOutcome" } ] }