Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SMART

Indexable

[key: string]: any

Index

Properties

Methods

  • Starts the SMART Launch Sequence.

    IMPORTANT: authorize() will end up redirecting you to the authorization server. This means that you should not add anything to the returned promise chain. Any code written directly after the authorize() call might not be executed due to that redirect!

    The options that you would typically pass for an EHR launch are just clientId and scope. For standalone launch you should also provide the iss option.

    Parameters

    Returns Promise<string | void>

  • This function can be used when you want to handle everything in one page (no launch endpoint needed).

    1. It will only work if your launch_uri is the same as your redirect_uri. While this should be valid, we can't promise that every EHR will allow you to register client with such settings.
    2. Internally, init() will be called twice. First it will redirect to the EHR, then the EHR will redirect back to the page where init() will be called again to complete the authorization. This is generally fine, because the returned promise will only be resolved once, after the second execution, but please also consider the following:
    • You should wrap all your app's code in a function that is only executed after init() resolves!
    • Since the page will be loaded twice, you must be careful if your code has global side effects that can persist between page reloads (for example writing to localStorage).

    Parameters

    Returns Promise<default>

  • This should be called on your redirect_uri. Returns a Promise that will eventually be resolved with a Client instance that you can use to query the fhir server.

    Parameters

    Returns Promise<default>

Generated using TypeDoc