FHIR Chat · launching app from hook · cds hooks

Stream: cds hooks

Topic: launching app from hook


view this post on Zulip Johnny Bender (Feb 01 2018 at 16:47):

Hello! Will a CDS Hook ever be able to launch a SMART app directly from a hook (medication-prescribe)? The only use case I've seen is a link to a SMART on FHIR app. Thank you!

view this post on Zulip Kevin Olbrich (Feb 01 2018 at 17:18):

What would you expect to happen when more than one vendor tried to immediately launch a SMART app for the same hook?

view this post on Zulip Johnny Bender (Feb 01 2018 at 17:33):

I would expect all the SMART apps to open simultaneously. I suppose that would cause a bit of a workflow interruption. We're building an opioid addiction risk stratification tool that requires supplemental survey data. Would the recommended approach be to provide a SMART app link in a card and prompt the user, "Please provide additional data for the addiction risk stratification tool"?

view this post on Zulip Kevin Shekleton (Feb 01 2018 at 17:38):

Hi @John Bender. Are you asking if when a card returns a link to the SMART app, the EHR automatically opens that SMART app (rather than requiring the user to click the link)?

view this post on Zulip Kevin Olbrich (Feb 01 2018 at 17:39):

Probably, and I think I saw a mention that if you set the severity of the card to 'hard-stop' that would signal the EHR that they should not allow the workflow to proceed. Perhaps we could modify that slightly for SMART apps so that the workflow can't proceed until the app is launched and returns.

view this post on Zulip Kevin Shekleton (Feb 01 2018 at 17:45):

Ultimately, I think it is an organizational concern here. That is, the hospital should decide when/if they want to automatically open the link(s) from cards rather than the CDS Service determine this.

view this post on Zulip Kevin Olbrich (Feb 01 2018 at 17:47):

We are probably going to need some consistent way to give the EHR hints about what needs to happen next and then they can build configurations in about how to handle them.

view this post on Zulip Johnny Bender (Feb 01 2018 at 18:32):

Thanks Kevin S, yes that was the use case I was pursuing. Thanks for the advice, Kevin O, I'll check out the 'hard-stop' signal.

view this post on Zulip Kevin Shekleton (Feb 01 2018 at 19:25):

The problem with hard-stop is that the intention is for critical CDS. If the SMART app is to be used in that scenario then this makes sense but all of the use cases I've heard are more about saving a user a click (which is a totally valid endeavor).

Also, hard-stop cards may have links which are just informational and the EHR would probably not want to auto-follow that link.

view this post on Zulip Meir Snyder (Sep 25 2020 at 20:09):

I'm trying to develop a CDS hook that can launch our SMART app within an EPIC EHR. We have the card showing as expected but the launch functionality seems to not be passing in the launch url, how would we do pass the ISS and launch url from the card?

view this post on Zulip Carl Anderson (Sep 25 2020 at 20:15):

Hi Meir! Can you share the card definition you're using, or at least confirm that you're setting the type: smart attribute?

view this post on Zulip Meir Snyder (Sep 25 2020 at 20:22):

Thanks Carl, we are using the type: smart as mentioned in the documentation, not sure if there's additional fields we need to add, here's the card definition we're using with some placeholder values

response_cards = {
        "cards": [{
          "summary": "Summary text",
          "indicator": "warning",
          "detail": "",
          "source": {
            "label": "Label Text",
            "url": "",
            "icon": "",
          },
          "links": [
            {
              "label": "Label_Text",

              "url": "appUrl/launch?ClientID=123foo",
              "type": "smart",
              "appContext": "{\"calcID\":608}"
          },
          ]
        }]
      }

view this post on Zulip Carl Anderson (Sep 25 2020 at 20:30):

OK, and just checking - which scopes are you requesting in your launch endpoint when you invoke authorize?

view this post on Zulip Jonah Wilkof (Sep 25 2020 at 20:36):

Hi Carl! Chiming in from Meir's team: if I understand your question correctly, I believe the scope would be: "patient/FamilyMemberHistory.read patient/MedicationStatement.read patient/Encounter.read patient/Patient.read patient/Observation.read patient/Condition.read launch online_access openid profile"

Just to add a little clarification: it seems as though the parameters required for the EHR launch sequence ("iss" and "launch" -- http://hl7.org/fhir/smart-app-launch/index.html) are not being appended by Epic when the SMART app is launched from the CDS Card link in Storyboard. I believe we can grab the "iss", but where would the launch parameter ("opaque identifier for this specific launch") be generated in this scenario?

view this post on Zulip Carl Anderson (Sep 28 2020 at 19:10):

I'm not sure. Nothing jumps out at me as wrong, but I'm not familiar with the Epic particulars. @Isaac Vetter - any insights here?

view this post on Zulip Isaac Vetter (Sep 28 2020 at 23:13):

Hey Guys, if you're in App Orchard, your App Orchard TS are best able to help. The client Id of the app returned on a card must be in an allowlist in some epic configuration. That would be something for the health system to check.

view this post on Zulip Jonah Wilkof (Sep 29 2020 at 13:56):

Thanks for the suggestion Isaac! We'll pursue that path next.


Last updated: Apr 12 2022 at 19:14 UTC