CDS Hooks Sandbox
JavaScript Other
Switch branches/tags
Nothing to show
Latest commit 98e3e20 Jul 17, 2017 @kpshek kpshek committed on GitHub Merge pull request #46 from cerner/patient-list
Replace patient entry popup with bootstrap modal to enter a patient ID or select from a list of sample patients if running against the SMART Health IT FHIR Sandbox. Fixes #18
Permalink
Failed to load latest commit information.
api-server docker updates Mar 11, 2016
build Replace patient entry popup with bootstrap modal to enter a patient I… Jul 17, 2017
docker/scripts Working docker-compose with external fhir server Nov 17, 2016
mock-cds-backend Working docker-compose with external fhir server Nov 17, 2016
src Replace patient entry popup with bootstrap modal to enter a patient I… Jul 17, 2017
vendor
.dockerignore Dockerized stack with docker-compose Dec 31, 2015
.editorconfig Drug search through RxNorm pills Sep 3, 2015
.gitignore Added mock backend Sep 10, 2015
.jshintrc
.travis.yml Add travis yml config file to coordinate automatic deploy to gh-pages… Jul 13, 2017
.yo-rc.json Drug search through RxNorm pills Sep 3, 2015
Dockerfile
Makefile
README.md Update README.md with new the new FHIR URL endpoint, appropriate link… Jul 14, 2017
docker-compose-dev.yml Working docker-compose with external fhir server Nov 17, 2016
docker-compose.yml Working docker-compose with external fhir server Nov 17, 2016
extract-data-from-rxnorm.ipynb Highlight changes; add rxnorm extractor Sep 6, 2015
extract-price-data-from-rxnorm.ipynb Begin extracting pricing service data Sep 12, 2015
gulpfile.js fixed deploy script Sep 5, 2015
package-lock.json Replace patient entry popup with bootstrap modal to enter a patient I… Jul 17, 2017
package.json
preprocessor.js Drug search through RxNorm pills Sep 3, 2015
webpack.dev.config.js
webpack.prod.config.js

README.md

Try it out

Live demo at http://cds-hooks.org/sandbox

Develop it

Dev environment with docker

  1. Install latest (1.9+) docker-engine (see https://docs.docker.com/engine/installation/ubuntulinux/)

  2. Install latest (1.5.2+) docker-compose (see https://docs.docker.com/compose/install/)

For me, on Ubuntu 15.10, this meant running:

echo "deb https://apt.dockerproject.org/repo ubuntu-wily main" |  sudo tee --append /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-get update
sudo apt-get install docker-engine pip
sudo pip install docker-compose

Local dev environment

git clone https://github.com/cds-hooks/sandbox.git
cd sandbox
sudo docker-compose -f docker-compose-dev.yml  up

From here, once the server builds and comes online you can edit files in src and see changes automatically reloaded at http://localhost:8080

Configuration:

  • To talk to a FHIR server other than https://sb-fhir-dstu2.smarthealthit.org/api/smartdstu2/open, you can pass a query variable to the HTML page, as in http://localhost:8080?fhirServiceUrl=http://my-fhir-server

Bring up the whole stack including API server, assuming you're on a host called morel:

CDS_HOOKS_URL="http://morel:9001" \
FHIR_URL="http://morel:9002/data" \
docker-compose -f docker-compose-dev.yml up

Dev environment sans docker

You can also develop on and run this project locally without Docker by following the steps below.

Setup

Install nodejs 6.11+ and npm 5.0+ on your machine and then install the project and its dependencies locally:

git clone https://github.com/cds-hooks/sandbox.git
cd sandbox
npm install

Run it

To load the webpage, run the following command:

npm run dev-frontend

To run the mock CDS services that accompany this tool, run the following command:

npm run dev-services

Now, you can navigate to http://localhost:8080 to view the application. Any changes made to the code locally should be picked up automatically by the webpack-dev-server, and you should see the changes reflect accordingly.

In production

No current support is provided for hosting a production copy of this demo, but briefly:

  • npm run-script prod generates static files in build that can be hosted with any web server

  • TODO: provide a way to configure the frontend server to talk to a different "mock services" server (current values are hard-coded)