Skip to content

SMART on FHIR app proof of concept for WXNC

Notifications You must be signed in to change notification settings

wuxi-nextcode/sofpoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoFPoC

SMART on FHIR Proof of Concept (this name is deliberately awkward, so that we are compelled to find a proper name at some point).

This is a proof of concept of a SMART app that connects to CSA.

The reason this app is hosted on Github (as opposed to Bitbucket), is because we're utilizing the free hosting on github.io to make the "production" version of the app available on the internet, at a fixed url (https://nextcode-health.github.io/sofpoc).

Scripts

See package.json.

Current status

We can log in through Cerner (by launching the app from their code console), and fetch a patient resource from their FHIR API. Most of the code in here is boilerplate from create-react-app, only original code is in the src/components and src/styles folders.

How to run

In order to be able to talk to Cerner FHIR APIs the app needs to go through the SMART auth process. For that to happen you need to register a dev account with Cerner, register the app in their dev portal and then launch the app from there. See details on how that works in the Cerner getting started tutorial.

Working locally

You should be able to work locally on the app by just creating an app in the Cerner dev portal that points to localhost:3000 (the default when you run yarn start). You'll need to change the clientId in launch.html to match the id of the newly created app. This is a bit cumbersome currently, to always have to switch out client ids. See to do above about making the use of multiple client ids easier.

Next steps

  • Log in to CSA, using the Cerner user, without the user having to enter credentials. Possibly through a new auth service that does not exist yet.
  • Post some data that has been fetched from FHIR, to CSA.
  • Map out what we will use in the Cerner FHIR API and create a React components library to display those things
  • Figure out what this product should do

Bugfixes / To do

  • Fix an error when access token expires, seems like either FHIR.js or the SMART client js returns an error, can't find $ (jquery, which is supposed to be bundled with the lib) when trying to use refresh token to refresh access token.
  • Introduce a store, either MobX or Redux, prefer MobX.
  • Find a convenient way to work with different client ids in the app. Should be possible through the built in ENV variable support in create-react-app.

FHIR.js client lib

Observe that we're including two 3rd party libs, in src/vendor we've added the FHIR client Cerner additions plugin, as recommended by Cerner. Also, in public/vendor we're including the SMART on FHIR client lib with jQuery included (which is only used for network). We should at some point use the FHIR.js library directly via yarn, we just used this for quick prototyping. However, it has been minified, by running uglifyjs fhir-client-v0.1.11.js --compress -o fhir-client-v0.1.11.min.js on the command line. We then include that version in our pages. That was a 50% size reduction.

Resources

About

SMART on FHIR app proof of concept for WXNC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published