Skip to content

Commit c0240db

Browse files
authored
fixes 157 - remove prefetch's response.status
Remove the response status object from the prefetch information supplied in the CDS Request, per #157.
1 parent 6f6e09a commit c0240db

File tree

1 file changed

+26
-41
lines changed

1 file changed

+26
-41
lines changed

docs/specification/1.0.md

Lines changed: 26 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,11 @@ curl
149149
},
150150
"prefetch" : {
151151
"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
162157
}
163158
}
164159
}
@@ -169,7 +164,7 @@ curl
169164

170165
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.
171166

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.
173168

174169
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.
175170

@@ -196,7 +191,7 @@ Regardless of how the EHR satisfies the prefetched templates (if at all), the pr
196191

197192
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).
198193

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.
200195

201196
#### Example prefetch request
202197

@@ -225,37 +220,27 @@ goal is to know, at call time:
225220
{
226221
"prefetch": {
227222
"p":{
228-
"response": {
229-
"status": "200 OK"
230-
},
231-
"resource": {
232-
"resourceType": "Patient",
233-
"gender": "male",
234-
"birthDate": "1974-12-25",
235-
"...": "<snipped for brevity>"
236-
}
223+
"resourceType": "Patient",
224+
"gender": "male",
225+
"birthDate": "1974-12-25",
226+
"...": "<snipped for brevity>"
237227
},
238228
"a1c": {
239-
"response": {
240-
"status": "200 OK"
241-
},
242-
"resource":{
243-
"resourceType": "Bundle",
244-
"type": "searchset",
245-
"entry": [{
246-
"resource": {
247-
"resourceType": "Observation",
248-
"code": {
249-
"coding": [{
250-
"system": "http://loinc.org",
251-
"code": "4548-4",
252-
"display": "Hemoglobin A1c"
253-
}]
254-
},
255-
"...": "<snipped for brevity>"
256-
}
257-
}]
258-
}
229+
"resourceType": "Bundle",
230+
"type": "searchset",
231+
"entry": [{
232+
"resource": {
233+
"resourceType": "Observation",
234+
"code": {
235+
"coding": [{
236+
"system": "http://loinc.org",
237+
"code": "4548-4",
238+
"display": "Hemoglobin A1c"
239+
}]
240+
},
241+
"...": "<snipped for brevity>"
242+
}
243+
}]
259244
}
260245
}
261246
}

0 commit comments

Comments
 (0)