Skip to content

CDS Services included in the CDS Hooks Sandbox

License

Notifications You must be signed in to change notification settings

cds-hooks/sandbox-cds-services

Repository files navigation

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 order-select 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.

About

CDS Services included in the CDS Hooks Sandbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published