{"id":21674160,"url":"https://github.com/aehrc/smart-ehr-launcher","last_synced_at":"2025-04-12T04:22:09.730Z","repository":{"id":161278952,"uuid":"635998849","full_name":"aehrc/SMART-EHR-Launcher","owner":"aehrc","description":"An EHR simulator dashboard testing tool to launch SMART on FHIR apps","archived":false,"fork":false,"pushed_at":"2025-03-28T04:08:05.000Z","size":411,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-28T05:19:44.367Z","etag":null,"topics":["ehr","fhir","react","typescript"],"latest_commit_sha":null,"homepage":"https://ehr.smartforms.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aehrc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T23:12:00.000Z","updated_at":"2025-03-20T00:32:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"461fd79e-f409-4aa8-befc-2774b613ba78","html_url":"https://github.com/aehrc/SMART-EHR-Launcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aehrc%2FSMART-EHR-Launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aehrc%2FSMART-EHR-Launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aehrc%2FSMART-EHR-Launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aehrc%2FSMART-EHR-Launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aehrc","download_url":"https://codeload.github.com/aehrc/SMART-EHR-Launcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514494,"owners_count":21116971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ehr","fhir","react","typescript"],"created_at":"2024-11-25T13:43:17.660Z","updated_at":"2025-04-12T04:22:09.703Z","avatar_url":"https://github.com/aehrc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMART-EHR-Launcher\n\nAn open-source EHR simulator dashboard testing tool to launch SMART on FHIR apps.\n\nIt is a single-page application (SPA) built in React and Typescript, and was bootstrapped with [Vite](https://vitejs.dev/).\n\n## Live Demos\n#### Smart Forms proxy server - https://ehr.smartforms.io\n\nThis instance uses the proxy service from https://github.com/aehrc/smart-launcher-v2 which enables SMART App Launch functionality on top of a vanilla FHIR server.\nThis instance is mainly used for demonstrating the pre-population of clinical data into the [Smart Forms](https://github.com/aehrc/smart-forms) Questionnaire renderer.\n\nSee the [Using the Smart App Launch Proxy service](#using-the-smart-app-launch-proxy-service) section for details on using the proxy service.\n\n#### Sparked AU Core reference server demo - https://sparked-au-core.d4zp11mxdi99k.amplifyapp.com\n\nThis instance is configured to work with the Sparked AU Core reference server and uses it's underlying SMART on FHIR authorisation capability provided by SMILE CDR.\n\nContact **Sean Fong** sean.fong@csiro.au or **Heath Frankel** \u003cheath@intervise.com.au\u003e to get test user credentials for login.\n\n\n## Features\n\n#### General features:\n- Provides a concise Patient summary with referenced Encounters, Conditions, MedicationRequests, AllergyIntolerances, Procedures, Immunisations, Observations\n- Easy switching of Patient, user (Practitioner) and Encounter launch context\n- Easy switching of pre-configured SMART apps or manual config of a new SMART app (requires app registration with underlying server)\n- Supports embedded SMART app view within EHR\n\n#### Smart Forms proxy server-specific features:\n- Support Questionnaire launch context in fhirContext. See https://confluence.hl7.org/display/FHIRI/fhirContext+Role+Registry\n\n#### Sparked AU Core reference server-specific features:\n- Performs OAuth2.0 authorisation with grant type `authorization_code`\n- Support background refresh for OAuth2.0 `refresh_token`\n\n## Environment Configuration\n#### Mandatory environment variables:\n```\nVITE_FHIR_SERVER_URL=\u003cSource FHIR API to connect to\u003e\nVITE_AUTH_REQUIRED=\u003cWhether your server requires authorisation\u003e\nVITE_LAUNCH_PARAM_CONFIG=\u003cdefault | proxy\u003e\n```\nSee [this section](#smart-app-launchs-launch-parameter-config) for `VITE_LAUNCH_PARAM_CONFIG` details.\n\n#### Optional environment variables:\n```\n# OAuth2.0 authorisation configuration, leave empty is your server is open\nVITE_OAUTH_GRANT_TYPE=\u003cOAuth2.0 grant type\u003e\nVITE_OAUTH_SCOPE=fhirUser offline_access openid profile launch/practitioner user/*.rs (fixed scopes)\nVITE_OAUTH_CLIENT_ID=\u003cClient ID of this app registered with your server\u003e\n\n# Questionnaire context configuration, leave empty or use default values if not using Questionnaire context\nVITE_FORMS_SERVER_URL=\u003cQuestionnaire repository server URL\u003e (Default: https://smartforms.csiro.au/api/fhir)\nVITE_FORMS_SERVER_TOKEN=\u003cQuestionnaire repository server access token\u003e\n```\n\nIt is safe to commit this .env file as it does not contain any sensitive information.\n\nYou are free to add your own environment variables to support your authorisation mechanism. If you are adding any sensitive information, please remove the `.env` file from the git repository and add it to the `.gitignore` file.\nSee the .env file for comments on the environment configuration.\n\n#### Below is the configuration for the Smart Forms proxy server:\n```\nVITE_FHIR_SERVER_URL=https://proxy.smartforms.io/v/r4/fhir\nVITE_AUTH_REQUIRED=false\nVITE_LAUNCH_PARAM_CONFIG=proxy\nVITE_FORMS_SERVER_URL=https://smartforms.csiro.au/api/fhir\n```\n\n#### Below is the configuration for the Sparked AU Core reference server:\n```\nVITE_FHIR_SERVER_URL=https://fhir.hl7.org.au/aucore/fhir/DEFAULT\nVITE_AUTH_REQUIRED=true\nVITE_LAUNCH_PARAM_CONFIG=default\nVITE_OAUTH_GRANT_TYPE=authorization_code\nVITE_OAUTH_SCOPE=fhirUser offline_access openid profile launch/practitioner user/*.rs\nVITE_OAUTH_CLIENT_ID=smartforms-ehr\nVITE_FORMS_SERVER_URL=https://smartforms.csiro.au/api/fhir\n```\n\n\n## SMART App Launch's launch parameter config\nDifferent servers might require different launch parameters to be passed to their `/authorize` endpoint. This is mainly due to the different scopes and launch context required by the server.\nThis app supports two types of launch parameter configurations: `default` and `proxy`. \n\n#### Default\nThis is a minimal configuration which contains the `patient`, `practitioner` and `encounter` IDs in a base64-encoded JSON object.\nThe Sparked AU Core reference server uses this configuration. It is recommended to use `default` in `VITE_LAUNCH_PARAM_CONFIG` if you are setting up your own server.\n\nExample:\nDecoded JSON\n```\n{\n  \"patient\": \"howe-deangelo\",\n  \"practitioner\": \"samuels-wyatt\",\n  \"encounter\": \"nailwound\"\n}\n```\n\nBase64-encoded\n```eyJwYXRpZW50IjoiaG93ZS1kZWFuZ2VsbyIsInByYWN0aXRpb25lciI6InNhbXVlbHMtd3lhdHQiLCJlbmNvdW50ZXIiOiJuYWlsd291bmQifQ```\n\nLaunch URL\n```https://smartforms.csiro.au/launch?iss=https%3A%2F%2Ffhir.hl7.org.au%2Faucore%2Ffhir%2FDEFAULT\u0026launch=eyJwYXRpZW50IjoiaG93ZS1kZWFuZ2VsbyIsInByYWN0aXRpb25lciI6InNhbXVlbHMtd3lhdHQiLCJlbmNvdW50ZXIiOiJuYWlsd291bmQifQ```\n\n#### Proxy\nThe Smart App Launch Proxy service define its own fairly comprehensive launch parameter configuration as a base64-encoded JSON array.\nThe Smart Forms proxy server uses this configuration. If you are planning to use this proxy service, you need to use set `VITE_LAUNCH_PARAM_CONFIG` as `proxy`.\n\nVisit https://ehr.smartforms.io and copy the app launch link to view an example of this configuration.\n\n\n## Using the Smart App Launch Proxy service\n\nThe Smart App Launch Proxy service (https://github.com/aehrc/smart-launcher-v2) enables the SMART App Launch functionality on top of a vanilla FHIR server.\nSkip this section if you are not planning to use this service.\n\nTo use the proxy service, you can use the built docker image:\n```\ndocker run -p 8080:80 -e FHIR_SERVER_R4=\u003cInsert FHIR server base URL\u003e aehrc/smart-launcher-v2:latest\n```\nVisit `http:localhost:8080/v/r4/fhir` to see your proxied FHIR server.\n\nIt is recommended to use this [environment configuration](#below-is-the-configuration-for-the-smart-forms-proxy-server) when using the proxy service.\nRemember to set `VITE_FHIR_SERVER_URL` to the proxy server's base URL, not the source FHIR server's!\n\nNote: This proxy service is only tested on open servers so far, and it is not guaranteed to work with servers that require authorisation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faehrc%2Fsmart-ehr-launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faehrc%2Fsmart-ehr-launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faehrc%2Fsmart-ehr-launcher/lists"}