How to enable SMART on FHIR on Patient Access API
This guide explains how SMART App launch (1.0.0 & 2.0.0) can be enabled
Prerequisites
Docker and Docker Compose
You should have Docker and Docker Compose installed before go further. To get it installed follow the instructions.
Aidbox license
To get the Aidbox License:
Go the Aidbox user portal https://aidbox.app
Login to the portal
Create new self-hosted Aidbox License or use the license that you already have
Expose Aidbox port to the Internet
In this guide we are using ngrok
to make Aidbox accessible from the Internet. Aidbox will be listening the 8888 port.
To launch ngrok run the command below.
When ngrok starts it shows the domain name which is linked to the 8888 port. The forwarding domain name is used to defined AIDBOX_BASE_URL
env value.
Create Aidbox project
Aidbox is configured by the Aidbox Configuration Projects. To create sample project run command below
See more details related the running Aidbox locally
Apply the license and AIDBOX_BASE_URL
Populate the .env
file with the Aidbox License.
Enable SMART on FHIR
To enable hierarchical access control (multi-tenancy on Organization resources) add necessary imports to the zrc/main.edn
file.
Add
aidbox.auth
,aidbox.oauth2
andaidbox.patient-api.v1
to the import section.Add
grant-lookup-method
definition
Start Aidbox with Docker Compose
To start Aidbox run the command in the aidbox-project
directory.
When Aidbox starts, navigate to the http://localhost:8888 and sign in to the Aidbox UI using the credentials admin
/ password
.
Register OAuth & SMART on FHIR scopes
Load Scope resources for SMART App launch 1 & 2
Use Aidbox UI Rest Console to load Scope resources.
Create AccessPolicy resources
Use Aidbox UI Rest Console to create AccessPoliciy resources.
Create Patient and User resources
Use Aidbox UI Rest Console to create the Patient and User resources.
Create Client resource
To make Client support SMART App launch 1.0.0 and SMART App launch 2.0.0 add scopes for both versions.
Run Inferno test session
Create Inferno test session by following the link https://inferno.healthit.gov/onc-certification-g10-test-kit.
1 Standalone Patient App - Full Access
Click the
Standalone Patient App
link in the left sidebarClick the
Run tests
buttonProvide require parameters for tests
FHIR Endpoint:
[AIDBOX_BASE_URL]/patient/fhir
Standalone Client ID:
smart-app
Standalone Client Secret:
secret
Click the
Submit
button
Once you run tests, follow the Inferno instructions.
Use my-user
as a login and password
as a password to enter, if Aidbox asks to provide user credentials during the SMART App launch.
2 Standalone Patient App - Limited Access
This test depends on the Standalone Patient App
test. Pass the first sequence then continue that one
Click the
2 Limited Access App
link in the left sidebarClick the
Run tests
buttonClick the
Submit
button
Once you run tests, follow the Inferno instructions.
By default the test expects to not get access to all the resources but Patient
, Condition
, Observation
.
To pass the test you should:
Uncheck all the resources but those ones on the Consent screen
Keep following check boxes checked
Launch Patient
,Open ID
,FHIR User
andOffline Access
Last updated