A minimal, standalone SMART-on-FHIR app for reading and writing FHIR resources in JSON format
-
Install prerequisites
-
Clone this repository and install dependencies
git clone [github path]/smart-playground cd smart-playground npm i
-
Start the development server
npm run dev
You can open the app's url in multiple windows or tabs to connect to different FHIR servers. Closing a tab or window closes the connection.
Connection parameters can be passed in the URL querystring to pre-populate the SMART connection form in the app. Additionally, an array of objects with any of these parameters and a name
parameter can be listed in a CORS accessible json file and passed in through a connections
querystring parameter to populate the "connections" dropdown list in the app (example).
name | description |
---|---|
endpoint | server FHIR endpoint |
isOpen | set to true to skip SMART authorization for open servers |
patientId | patient id to inject into {{patientId}} template variable (open servers only) |
client_id | the client_id for this app on the FHIR endpoint's auth server |
scope | a comma or space delimited set of scopes being requested |
FHIR request parameters can also be passed in the URL querystring to pre-populate the request form in the app. Additionally, an array of objects with these parameters and a name
parameter can be listed in a CORS accessible json file and passed in through a snippets
querystring parameter to populate the "snippets" dropdown list in the app (example).
name | description |
---|---|
method | http method - get , put , post or delete |
url | FHIR url relative to the server endpoint |
body | FHIR resource in json format for put and post requests |
dataurl | path to a CORS accessible FHIR resource in json format to populate the body in put and post requests (will be ignored if included in a snippet file) |
URLs and resources bodies may include a {{patientId}}
template variable which will be replaced with the id from a patient launch context returned by the server at launch when the request is submitted.