You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/1.0.md
+26-41Lines changed: 26 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -149,16 +149,11 @@ curl
149
149
},
150
150
"prefetch" : {
151
151
"patientToGreet" : {
152
-
"response" : {
153
-
"status" : "200 OK"
154
-
},
155
-
"resource" : {
156
-
"resourceType" : "Patient",
157
-
"gender" : "male",
158
-
"birthDate" : "1925-12-23",
159
-
"id" : "1288992",
160
-
"active" : true
161
-
}
152
+
"resourceType" : "Patient",
153
+
"gender" : "male",
154
+
"birthDate" : "1925-12-23",
155
+
"id" : "1288992",
156
+
"active" : true
162
157
}
163
158
}
164
159
}
@@ -169,7 +164,7 @@ curl
169
164
170
165
Each CDS Service will require specific FHIR resources in order to compute the recommendations the EHR requests. If real-world performance were no issue, an EHR could launch a CDS Service passing only context data, and the CDS Service could then request authorization for FHIR resources as they were needed, and then retrieve the resources from the EHR's FHIR server. However, CDS Services must respond quickly (on the order of 500 ms.), and so we provide performance enhancements that allow a CDS Service to request and obtain FHIR resources more efficiently. Regardless of the method used to provide FHIR resources to a CDS Service, the EHR must assure that clinical data provided to the CDS Service are the most current data available to the EHR user. Decisions based on stale clinical data pose a safety threat to the patient and must be avoided.
171
166
172
-
Two optional enhancements are provided. First, FHIR resources may be obtained by passing "prefetched" data from the EHR to the CDS Service in the service call. FHIR resources requested in the CDS Service desciption are passed as key-value pairs, with each key matching a key described in the CDS Service description, and each value being a FHIR Bundle.entry indicating a response status and returned resource. If data are to be prefetched, the CDS Service registers a set of "prefetch templates" with the EHR, as described in the [Prefetch Template](#prefetch-template) section below.
167
+
Two optional enhancements are provided. First, FHIR resources may be obtained by passing "prefetched" data from the EHR to the CDS Service in the service call. FHIR resources requested in the CDS Service desciption are passed as key-value pairs, with each key matching a key described in the CDS Service description, and each value being a FHIR Bundle.entry of the requested resource. If data are to be prefetched, the CDS Service registers a set of "prefetch templates" with the EHR, as described in the [Prefetch Template](#prefetch-template) section below.
173
168
174
169
The second enhancement enables the CDS Service to retrieve FHIR resources for itself, but to do so more efficiently than if it were required to request and obtain its own authorization. If the EHR decides to have the CDS Service fetch its own FHIR resources, the EHR obtains and passes directly to the CDS Service a bearer token issued for the CDS Service's use in executing FHIR API calls against the EHR FHIR server to obtain the required resources. Some EHRs may choose to pass prefetched data, along with a bearer token for the CDS Service to use if additional resources are required. Each EHR may decide which approach, or combination, is preferred, based on performance considerations and assessment of attendant security and safety risks. For more detail, see the [FHIR Resource Access](#fhir-resource-access) section below.
175
170
@@ -196,7 +191,7 @@ Regardless of how the EHR satisfies the prefetched templates (if at all), the pr
196
191
197
192
The resulting response, which MUST BE rendered in a single page — no "next page" links allowed — is passed along to the CDS Service using the `prefetch` parameter (see below for a complete example).
198
193
199
-
The CDS Service MUST NOT receive any prefetch template key that the EHR chooses not to satisfy. Additionally, if the EHR encounters an error while prefetching any data, the prefetch template key SHOULD NOT be sent to the CDS Service. It is the CDS Service's responsibility to check prefetched data against its template to determine what requests were satisfied (if any) and to manually retrieve any additional necessary data. If the CDS Service is unable to obtain required data because it cannot access the FHIR server and the request did not contain the necessary prefetch keys, the service SHALL respond with an HTTP 412 Precondition Failed status code.
194
+
The CDS Service MUST NOT receive any prefetch template key that the EHR chooses not to satisfy; in which case the prefetch template key SHOULD NOT be sent. Similarly, if the EHR encounters an error while prefetching any data, the prefetch template key SHOULD NOT be sent to the CDS Service. If the EHR has no data to populate a template prefetch key, the prefetch template key MUST have a value of __null__. It is the CDS Service's responsibility to check prefetched data against its template to determine what requests were satisfied (if any) and to manually retrieve any additional necessary data. If the CDS Service is unable to obtain required data because it cannot access the FHIR server and the request did not contain the necessary prefetch keys, the service SHALL respond with an HTTP 412 Precondition Failed status code.
200
195
201
196
#### Example prefetch request
202
197
@@ -225,37 +220,27 @@ goal is to know, at call time:
0 commit comments