Sandbox CDS Services
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.
Once you clone the repository down to your machine, run the following command to install all necessary dependencies for the project.
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
Testing and Linting
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.
npm run test
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:
- Add the service definition to the
/discovery/service-definitions.jsonfile (metadata for the services found at the discovery endpoint)
- Create the service endpoint route in a new file under the
- Add the route to the
cds-services.jsfile inside the
discoverydirectory that points to the new service endpoint
- Add a test file to test the service endpoint route under the
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
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.