CDS Services included in the CDS Hooks Sandbox
Switch branches/tags
Nothing to show
Clone or download
Latest commit dbac82b May 29, 2018
Permalink
Failed to load latest commit information.
discovery Fix prefetch template to read from context patientId property. Parse … Apr 30, 2018
lib Add CMS Price Check default CDS Service for invocation on medication … Feb 13, 2018
middleware Check passed in FHIR server if possible for any needed resources if p… Nov 17, 2017
services Fix prefetch parse for patient-greeting service to read the resource … May 16, 2018
tests Fix prefetch parse for patient-greeting service to read the resource … May 16, 2018
.eslintignore Check passed in FHIR server if possible for any needed resources if p… Nov 17, 2017
.eslintrc.json Set up Node.js server with patient greeting CDS service enabled. Conf… Nov 9, 2017
.gitignore Initial commit Nov 1, 2017
.travis.yml Add CMS Price Check default CDS Service for invocation on medication … Feb 13, 2018
LICENSE Set up Node.js server with patient greeting CDS service enabled. Conf… Nov 9, 2017
NOTICE Set up Node.js server with patient greeting CDS service enabled. Conf… Nov 9, 2017
README.md Add CMS Price Check default CDS Service for invocation on medication … Feb 13, 2018
app.yaml Set up Node.js server with patient greeting CDS service enabled. Conf… Nov 9, 2017
index.js Check passed in FHIR server if possible for any needed resources if p… Nov 17, 2017
package-lock.json Remove unused babel dependencies May 24, 2018
package.json Remove unused babel dependencies May 24, 2018
server.js Set up Node.js server with patient greeting CDS service enabled. Conf… Nov 9, 2017

README.md

Sandbox CDS Services

Build Coverage Code Climate Dependencies

This repository hosts the default CDS Services configured for the CDS Hooks Sandbox tool. These services are spun up by a Node.js application hosted on Google App Engine.

Getting Started

Once you clone the repository down to your machine, run the following command to install all necessary dependencies for the project.

npm install

Once the dependencies are installed locally, you can run the server on localhost.

npm run dev

You can test out this app from http://localhost:3000. Try hitting the discovery endpoint at http://localhost:3000/cds-services.

Testing and Linting

The JavaScript linter configured for this project is ESlint, which uses the Airbnb JavaScript style guide to correct and standardize JavaScript code.

To lint:

npm run lint

This project contains unit tests using the Jest library. Discovery and CDS Service endpoints are tested by each route and expected behavior.

To test:

npm run test

CDS Services

The following services are configured for this application:

patient-greeting: A CDS Service configured for the patient-view hook. The service prefetches the Patient resource of the patient in context of the EHR and returns a proper greeting that displays what patient is being seen by the current provider. cms-price-check: A CDS Service configured for the medication-prescribe hook. The service reads the context of a medication being authored and determines if a cheaper prescription alternative may be available to switch to based on historical pharmacy dispensing data. Prices will be displayed for chosen medication.

Adding a CDS Service

To add another default service for the CDS Hooks Sandbox:

  1. Add the service definition to the /discovery/service-definitions.json file (metadata for the services found at the discovery endpoint)
  2. Create the service endpoint route in a new file under the /services directory
  3. Add the route to the cds-services.js file inside the discovery directory that points to the new service endpoint
  4. Add a test file to test the service endpoint route under the /tests directory

License

Copyright 2017 Cerner Innovation, Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.