Giter Site home page Giter Site logo

sofpoc's Introduction

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

sofpoc's People

Contributors

hrparty avatar

Stargazers

Kristleifur Daðason avatar

Watchers

Kristleifur Daðason avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.