FHIR Chat · App Launch Intent · smart

Stream: smart

Topic: App Launch Intent


view this post on Zulip James Dinsmore (Jan 31 2022 at 20:26):

We are planning on implementing "intent" (https://build.fhir.org/ig/HL7/smart-app-launch/scopes-and-launch-context.html#launch-intent) and are confused on how this is applied to both the standalone launch and EHR Launch.

For standalone launch is "intent" added as an additional parameter?

        https://ehr/authorize?
        response_type=code&
        client_id=app-client-id&
        redirect_uri=https%3A%2F%2Fapp%2Fafter-auth&
        launch=xyz123&
        scope=launch+patient%2FObservation.rs+patient%2FPatient.rs+openid+fhirUser&
        state=98wrghuwuogerg97&
        aud=https://ehr/fhir&
        intent=reconcile-medications

For EHR launch is "intent" added as an additional parameter?

       https://app/launch?iss=https%3A%2F%2Fehr%2Ffhir&launch=xyz123&intent=reconcile-medications

Or is neither of the above correct and we'd use "intent/reconcile-medications" along with the scopes?

view this post on Zulip Josh Mandel (Jan 31 2022 at 20:35):

For a standalone launch there's no real value in intent, since the point of intent is to give an app some hint about why the app is being launched (and in a standalone launch the app itself is responsible for the decision to launch, so it doesn't need a hint).

view this post on Zulip Josh Mandel (Jan 31 2022 at 20:36):

For EHR launch, intent is a context parameter passed to the app by the EHR as part of the access token response (sibling to patient, encounter, and access_token).

view this post on Zulip James Dinsmore (Feb 01 2022 at 01:55):

@Josh Mandel thank you for that explanation. So is "intent" just a key-value pair placed in the body of a token POST?

view this post on Zulip Josh Mandel (Feb 01 2022 at 02:16):

Almost -- it's a value (associated with the intent key) returned by the EHR in the JSON body of the response to a token POST.

view this post on Zulip James Dinsmore (Feb 01 2022 at 13:36):

@Josh Mandel
Based on the above my understanding is that when implementing "intent" it is on the EHR's authorization server to figure it out. So some implementers may choose to just use a separate call instead of ehr-launch (where in our situation we plan to use ehr-launch). If that's not accurate please let me know.

view this post on Zulip Josh Mandel (Feb 01 2022 at 14:14):

I'm not sure I understand. But to say it differently: intent is just a property that the EHR can pass to an app at the time of authorization to say something like "here's the thing the user was trying to accomplish in the EHR when we launched you" (e.g. so an app that might be relevant at several different places in the workflow of the EHR know which of its various functions to offer by default or perform first...)


Last updated: Apr 12 2022 at 19:14 UTC