Skip to content

Commit ca9c548

Browse files
authored
Merge branch 'master' into link-to-hooks-correctly
2 parents 4b21415 + 59abe8a commit ca9c548

File tree

5 files changed

+39
-44
lines changed

5 files changed

+39
-44
lines changed

docs/hooks/index.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,7 @@ All fields defined by the hook's context MUST be defined in a table where each f
111111
- Type: The type of the field in the context JSON object, expressed as the JSON type, or the name of a FHIR Resource type. Valid types are *boolean*, *string*, *number*, *object*, *array*, or the name of a FHIR resource type. When a field can be of multiple types, type names MUST be separated by a *pipe* (`|`)
112112
- Description: A functional description of the context value. If this value can change according to the FHIR version in use, the description SHOULD describe the value for each supported FHIR version.
113113

114-
### FHIR resources in context
115-
116-
When potentially multiple FHIR resources value a single context field, these resources SHOULD be formatted as a FHIR Bundle. For example, multiple FHIR resources are necessary to describe all of the orders under review in the `order-review` hook's `orders` field. Hook definitions SHOULD prefer the use of FHIR Bundles over other bespoke data structures.
117-
118-
Often, context is populated with in-progress or in-memory data that may not yet be available from the FHIR server. For example, `medication-prescribe` and `order-review` define context fields containing FHIR resources that represent draft resources. In this case, the EHR should only provide these draft resources and not the full set of orders available from its FHIR server. The CDS service MAY pre-fetch or query for FHIR resources with other statuses.
119-
120-
All FHIR resources in context MUST be based on the same FHIR version.
114+
The below illustrates a sample table.
121115

122116
Field | Optionality | Prefetch Token | Type | Description
123117
----- | -------- | ---- | ---- | ----
@@ -127,6 +121,14 @@ Field | Optionality | Prefetch Token | Type | Description
127121
`moreObjects` | OPTIONAL | No | *array* | A clear description of the items in this array.
128122
`allFHIR` | OPTIONAL | No | *object* | A FHIR Bundle of the following FHIR resources using a specific version of FHIR.
129123

124+
### FHIR resources in context
125+
126+
When potentially multiple FHIR resources value a single context field, these resources SHOULD be formatted as a FHIR Bundle. For example, multiple FHIR resources are necessary to describe all of the orders under review in the `order-review` hook's `orders` field. Hook definitions SHOULD prefer the use of FHIR Bundles over other bespoke data structures.
127+
128+
Often, context is populated with in-progress or in-memory data that may not yet be available from the FHIR server. For example, `medication-prescribe` and `order-review` define context fields containing FHIR resources that represent draft resources. In this case, the EHR should only provide these draft resources and not the full set of orders available from its FHIR server. The CDS service MAY pre-fetch or query for FHIR resources with other statuses.
129+
130+
All FHIR resources in context MUST be based on the same FHIR version.
131+
130132
### Examples
131133

132134
Hook creators SHOULD include examples of the context.
@@ -167,15 +169,16 @@ To help ensure the stability of CDS Hooks implementations, once a hook has been
167169

168170
In particular, the semantics of a hook (i.e. the meaning of the hook from the perspective of the EHR) cannot be changed. EHRs that implement specific hooks are responsible for ensuring the hook is called from the appropriate point in the workflow.
169171

170-
Note that this means that the name of the hook carries major version semantics. That is not to say that the name must include the major version, that is left as a choice by users of the specification. Clean hook names increase usability. Ideally, an active hook name accurately defines the meaning and workflow of the hook in actual words.
172+
Note that this means that the name of the hook carries major version semantics. That is not to say that the name must include the major version, that is left as a choice to authors of the specification. For example, following version 1.x, the major version MAY be included in the name as "-2", "-3", etc. Eg: patient-view-2, patient-view-3, etc. Clean hook names increase usability. Ideally, an active hook name accurately defines the meaning and workflow of the hook in actual words.
171173

172174
The following types of changes are possible for a hook definition:
173175

174176
Change | Version Impact
175177
------ | ----
176178
Clarifications and corrections to documentation that do not impact functionality | Patch
177179
Change of prefetch token status of an existing context field | Patch
178-
Addition of a new field to the context | Minor
180+
Addition of a new, REQUIRED field to the context | Major
181+
Addition of a new, OPTIONAL field to the context | Minor
179182
Change of optionality of an existing context field | Major
180183
Change of type or cardinality of an existing context field | Major
181184
Removal of an existing context field | Major

docs/hooks/medication-prescribe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ The user is in the process of prescribing one or more new medications.
1111

1212
## Context
1313

14-
The set of medications proposed or in progress of being prescribed. All FHIR resources in this context MUST be based on the same FHIR version.
14+
The set of medications proposed or in progress of being prescribed. All FHIR resources in this context MUST be based on the same FHIR version. All FHIR resources in the medications object MUST have a status of _draft_.
1515

1616
Field | Optionality | Prefetch Token | Type | Description
1717
----- | -------- | ---- | ---- | ----
1818
`patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of the current patient in context
1919
`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the current encounter in context
20-
`medications` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of MedicationOrder resources <br/> STU3 - FHIR Bundle of MedicationOrder
20+
`medications` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of _draft_ MedicationOrder resources <br/> STU3 - FHIR Bundle of _draft_ MedicationRequest resources
2121

2222
### Example (DSTU2)
2323

docs/hooks/order-review.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ The user is in the process of reviewing a set of orders to sign.
1111

1212
## Context
1313

14-
The set of orders being reviewed for signature on-screen. All FHIR resources in this _context_ MUST be based on the same FHIR version.
14+
The set of orders being reviewed for signature on-screen. All FHIR resources in this _context_ MUST be based on the same FHIR version. All FHIR resources in the medications object MUST have a status of _draft_.
1515

1616
Field | Optionality | Prefetch Token | Type | Description
1717
----- | -------- | ---- | ---- | ----
1818
`patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of the current patient in context
1919
`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the current encounter in context
20-
`orders` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of MedicationOrder, DiagnosticOrder, DeviceUseRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription <br/> STU3 - FHIR Bundle of MedicationRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription
20+
`orders` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of MedicationOrder, DiagnosticOrder, DeviceUseRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription with _draft_ status <br/> STU3 - FHIR Bundle of MedicationRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription with _draft_ status
2121

2222
### Example (DSTU2)
2323

docs/quickstart.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ A CDS Hooks scenario typically includes two main actors: an EHR and a CDS Servic
66
![patient-view Hook Overview](images/patient-view-hook-launch_spec.png)
77

88
## 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:
9+
A CDS Service is an external service that responds to EHR requests through cards. A card can optionally link to a SMART app. There are several steps to setting up a CDS Service:
1010

1111
1. Create an endpoint for discovery
1212
2. Develop a service
1313
3. Test the service with the [sandbox](http://sandbox.cds-hooks.org/)
14-
4. Create a SMART app (or [borrow one](https://apps.smarthealthit.org/apps/pricing/open-source))
15-
5. Test the service and SMART app with an EHR
14+
4. If applicable, create a SMART app (or [borrow one](https://apps.smarthealthit.org/apps/pricing/open-source))
15+
5. Test the service (and, if applicable, SMART app) with an EHR
1616

1717
This tutorial recommends implementing the CDS Hooks [security model](specification/1.0/#security-and-safety) after successful open access testing.
1818

@@ -80,20 +80,20 @@ Delete the existing hooks, and then do a quick add with a reference to your CDS
8080

8181
After testing with the sandbox, you are ready to connect with an EHR service.
8282

83-
## Building an EHR Service
83+
## Integrating CDS Services into an EHR
8484
Build out following sections:
8585

86-
1. Calls discovery endpoint
86+
1. Call discovery endpoint
8787
2. Invoke service on patient-view
88-
3. Support for FHIR resources on request (context or pre-fetch)
89-
4. Exposed non-secured FHIR server
88+
3. Support FHIR resource on CDS requests (context or pre-fetch)
89+
4. Expose non-secured FHIR server for testing
9090
5. Render card
9191
6. Launch SMART app
92-
7. Tested with external CDS Service
92+
7. Test with external CDS Service
9393

9494
This tutorial recommends implementing the CDS Hooks [security model](specification/1.0/#security-and-safety) after successful open access testing.
9595

96-
### Calls discovery endpoint
96+
### Call discovery endpoint
9797
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.
9898

9999
Below is an example work flow where a business analyst accesses this list of available services by calling
@@ -109,7 +109,7 @@ This image captures a business analyst reviewing services from one CDS provider.
109109
### Invoke service on patient-view hook
110110
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.
111111

112-
### Support for FHIR resources on request or prefetch
112+
### Support FHIR resource on CDS requests (context or pre-fetch)
113113
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:
114114

115115
```json
@@ -140,8 +140,8 @@ In some cases, additional information beyond what is included in the prefetch ma
140140

141141
It is recommended FHIR servers implement, and CDS Services follow, locale specific implementation guides. In the US, the recommended implementation guides to follow are 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). Each profile page within these implementation guides includes queries FHIR servers are required to support.
142142

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 to production the system is expected to follow the guidelines in the [security](specification/1.0/#security-and-safety) requirements.
143+
### Expose non-secured FHIR server for testing
144+
A non-secured FHIR server is important to support testing with a CDS Service. When the EHR moves a hook to production the system is expected to follow the guidelines in the [security](specification/1.0/#security-and-safety) requirements.
145145

146146
### Render card
147147
The CDS Service will provide a response in the form a of a 'card'. Your EHR needs to be able to display the card.
@@ -174,7 +174,7 @@ Example card rendered: ![Card with SMART App link](images/Bilirubin_SMART_App_Ca
174174

175175
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/).
176176

177-
## Test with an external CDS Service
177+
## Test with external CDS Service
178178

179179
No development is complete without testing with a CDS Service provider. Find a member in the [community](community) and test away.
180180

0 commit comments

Comments
 (0)