Skip to content

Commit 6748177

Browse files
author
brettmarquard
committed
adding new quickstart page
1 parent ab97443 commit 6748177

7 files changed

+182
-0
lines changed
142 KB
Loading
2.07 KB
Loading

docs/images/demo_quick_add1.png

9.65 KB
Loading
135 KB
Loading
40 KB
Loading

docs/quickstart.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# Quick Start
2+
This quick start tutorial defines each of the actors and provide details for implementing the `patient-view` hook.
3+
4+
A CDS hooks scenario typically includes two main actors: EHR Service, and a CDS Service. Below is an example interaction for the patient-view hook.
5+
6+
![Patient View Hooks Overview](images/patient-view-hook-launch_spec.png)
7+
8+
## Building a CDS Service
9+
A CDS service is an external service that responds to EHR requests through cards. There are several steps to setting up a CDS service:
10+
11+
1. Create an endpoint for discovery
12+
1. Develop a service
13+
1. Test service with a [sandbox](http://sandbox.cds-hooks.org/)
14+
1. Create a SMART app (or [borrowed](https://apps.smarthealthit.org/apps/pricing/open-source))
15+
1. Test service + SMART app with an EHR
16+
17+
This tutorial recommends implementing the [security](specification/#security) after succesful open access testing.
18+
19+
### Endpoint for discovery
20+
The CDS service must provide a stable endpoint for the EHR to discover the available services. A system must expose their services at `{baseUrl}/cds-services`. A service endpoint that supports the `patient-view` hook may return:
21+
22+
{
23+
"services": [
24+
{
25+
"hook": "patient-view",
26+
"name": "Static CDS Service Example",
27+
"description": "An example of a CDS service that returns a card with SMART app recommendations.",
28+
"id": "static-patient-view",
29+
"prefetch": {
30+
"patientToGreet": "Patient/{{Patient.id}}"
31+
}
32+
}
33+
]
34+
}
35+
36+
The attributes available to describe a CDS services is documented in the [CDS hooks specification](specification/#discovery).
37+
38+
<!-- After you have created your open end point, make sure to publish in the [participant matrix](https://github.com/argonautproject/cds-hooks/wiki/Participants) -->
39+
40+
### Develop a service
41+
With a stable open end point available it's time to complete development of a service. A CDS service could provide **information**, a **suggestion**, or a **SMART app** link. The focus of the Argonaut CDS hooks effort is a `patient-view` hook launching a SMART app so this guide will focus on the SMART app link.
42+
43+
A CDS `patient-view` hook could return the following card:
44+
45+
{
46+
"cards": [
47+
{
48+
"summary": "SMART App Success Card",
49+
"indicator": "success",
50+
"detail": "This is an example SMART App success card.",
51+
"source": {
52+
"label": "Static CDS Service Example",
53+
"url": "https://example.com"
54+
},
55+
"links": [
56+
{
57+
"label": "SMART Example App",
58+
"url": "https://smart.example.com/launch",
59+
"type": "smart"
60+
}
61+
]
62+
}
63+
]
64+
}
65+
66+
### Create a SMART App
67+
You may already have created a SMART app prior to this step, but just in case this is a reminder. The SMART app is launched from the link returned in your service. If you want to borrow a SMART app, check out the [app gallery](https://apps.smarthealthit.org/apps/pricing/open-source).
68+
69+
### Test service with a sandbox
70+
The CDS hooks initiative provides a publicly available [sandbox](http://sandbox.cds-hooks.org/) to test your service.
71+
72+
Select the configure hooks:<br>
73+
![Demo Configuration](images/demo_configure_hooks1.png)
74+
75+
Delete the existing hooks, and then do a quick add with a reference to your CDS service:<br>
76+
![Patient View Hooks Launch from Sandbox](images/demo_quick_add1.png)
77+
78+
After testing with the sandbox, you are ready to connect with an EHR service.
79+
80+
## Building an EHR Service
81+
Build out following sections:
82+
83+
1. Calls discovery endpoint
84+
1. Invoke service on patient-view
85+
1. Support for FHIR resources on request (context or pre-fetch)
86+
1. Exposed non-secured FHIR server
87+
1. Render card
88+
1. Launch SMART app
89+
1. Tested with external CDS service
90+
91+
This tutorial recommends implementing the [security](specification/#security) after succesful open access testing.
92+
93+
### Calls discovery endpoint
94+
The CDS discovery endpoint provides the list of services a CDS provider supports, and the hooks a service should be invoked on. An EHR may configure their system to support a set of hooks at a certain location in their users work flow, or build a dynamic capability to interact with a CDS Service provider within a work flow. For the best end-user experience, this guide recommends a business analyst configure which hooks an EHR will support.
95+
96+
Below is an example work flow where a business analyst accesses this list of available services by calling
97+
98+
`GET https://example.com/cds-services`
99+
100+
and then configures them in the system.
101+
102+
![business analyst configuration](images/analyst-configuration_spec.png)
103+
104+
This image captures a business analyst reviewing services from one CDS provider. A business analyst may review services from multiple providers and configure appropriate services per user profiles.
105+
106+
### Invoke service on patient-view hook
107+
The patient-view hook is invoked when a patient chart is opened. It's one of the most basic since the logic doesn't have any prior workflow dependencies. The service called on the patient-view hook could be dependent on patient characteristics, for example: sex, problems in problems list, active medications, etc. The current version of the CDS Hooks specification allows the EHR to decide which characteristics to consider.
108+
109+
### Support for FHIR resources on request or prefetch
110+
Often a CDS service will require additional information from the EHR to perform the decision support logic, or determine the appropriate SMART app to return. Prefetch provides the EHR the capability to pass a resource when invoking a service. For example, with a patient resource included a service could do a geography search for potential environmental risk factors. Below is an example request invoked on patient-view with a patient included: (***fix server, not working for me)
111+
112+
{
113+
"hookInstance" : "23f1a303-991f-4118-86c5-11d99a39222e",
114+
"fhirServer" : "http://hooks.smarthealthit.org:9080",
115+
"hook" : "patient-view",
116+
"redirect" : "http://hooks2.smarthealthit.org/service-done.html",
117+
"user" : "Practitioner/example",
118+
"context" : [],
119+
"patient" : "1288992",
120+
"prefetch" : {
121+
"patientToGreet" : {
122+
"response" : {
123+
"status" : "200 OK"
124+
},
125+
"resource" : {
126+
"resourceType" : "Patient",
127+
"gender" : "male",
128+
"birthDate" : "1925-12-23",
129+
"id" : "1288992",
130+
"active" : true
131+
}
132+
}
133+
}
134+
}
135+
136+
137+
In some cases, additional information beyond what is included in the prefetch maybe required. The CDS service can request additional information using the FHIR REST APIs:
138+
139+
`GET [base]/AllergyIntolerance?patient=[id]`
140+
141+
It is recommended FHIR servers implement, CDS Services follow, the guidance in the [Argonaut Data Query Guide (DSTU2)](http://www.fhir.org/guides/argonaut/r2/) or [HL7 US Core (STU3)](http://hl7.org/fhir/us/core/index.html) implementation guides when retrieving additional resources. Each profile page within these implementation guides includes queries FHIR servers are required to support.
142+
143+
### Exposed non-secured FHIR server
144+
A non secured FHIR server is important to support testing with a CDS service. When the EHR moves a hook so to production the system to is expected to follow the guidelines in the [security](specification/#security) requirements.
145+
146+
### Render card
147+
The CDS service will provide a response in the form a of a 'card'. Your EHR needs to be able to display the card.
148+
149+
Example card JSON:
150+
151+
{
152+
"cards": [
153+
{
154+
"summary": "Premier Inc: Based on new culture information and facility antibiogram, the following anti-infectives has the highest likelihood (% susceptibility) of effectively treating the infections ",
155+
"indicator": "info",
156+
"detail": "<Table><tr><td><strong>Anti-infective Medications </strong><span style=\"color: #00ccff;\">(% Susceptable)</span></td></tr><TR><TD>Ampicillin-Sulbactam( 93%) </TD></TR><TR><TD>Levofloxacin( 88%) </TD></TR><TR><TD>Cefazolin(79%) </TD></TR><TR><TD>SMX-TMP(76%) </TD></TR><TR><TD>Gentamicin(73%) </TD></TR></Table>",
157+
"source": {
158+
"name": "Premier Inc",
159+
"url": null
160+
},
161+
"links": [
162+
{
163+
"label": "Launch Premier TheraDoc for more details",
164+
"url": "http://premiercdsapps-env.us-east-1.elasticbeanstalk.com/CDS_Hooks/antibiogramlink?hookinstance=9ae4bc55-2ccd-469b-b5cc-33e23d983998",
165+
"type": "absolute"
166+
}
167+
]
168+
}
169+
]
170+
}
171+
172+
Example card rendered: ![Card with SMART App link](images/premier_SMART-App_Card.png)
173+
174+
### Launch SMART app
175+
176+
For some CDS services the end step will just display the card. For the patient-view hook discussed here, we are focused on launching a SMART app. The CDS hooks guide places no additional constraints for launching a SMART app beyond those from [SMART on FHIR](http://docs.smarthealthit.org/authorization/).
177+
178+
## Test with an external CDS service
179+
180+
No development is complete without testing with a CDS service provider. Find a member in the [community](community) and test away.
181+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pages:
1414
- Overview: 'index.md'
1515
- Specification: 'specification.md'
1616
- Hooks: 'hooks.md'
17+
- Quick Start: 'quickstart.md'
1718
- Examples: 'examples.md'
1819
- Community: 'community.md'
1920

0 commit comments

Comments
 (0)