Skip to content
Zach Plata edited this page Feb 8, 2018 · 8 revisions

Now that we know how to setup CDS Services in the discovery endpoint, and have seen how to add POST routes to our own CDS Services, you can try a few different exercises to either edit or add CDS Services.

Note: While your localhost server is still running, any changes made to the Express app will update the server automatically, so you don't need to restart the server every time you want to update the Express application.

Exercise 1

Include the birth date in the patient-view-example CDS Service response in the detail attribute of the card. See it render on the CDS Hooks Sandbox.

Hint: See how the detail attribute is included in a card here

Exercise 2

Add a SMART app link to the response of either CDS Service we have already created. You can add your own SMART app launch URL if you have one, or you can use this launch URL for the Cerner SMART on FHIR Tutorial App.

http://engineering.cerner.com/smart-on-fhir-tutorial/example-smart-app/launch.html

See the CDS Service Response section of the CDS Hooks documentation for a refresher on how to add links to cards.

Once you have modified the service response to include the SMART app links, try launching it in the sandbox.

Exercise 3

Create another CDS Service in index.js for the patient-view hook that only returns a card with a warning indicator if the patient has a condition of hypertension with the specific SNOMED code, 1201005. The summary property of the card should display the specific condition the patient has.

To test this functionality, you can use the default patient for the sandbox.

Hint: Use the Condition FHIR resource to grab conditions of the patient. Make sure to check that the system property in the code part of the Condition resource has the value of http://snomed.info/sct.

Next step: Next Steps