Skip to content

Commit c8af871

Browse files
authored
improve example of missing prefetch data
Fixes [FHIR-28672](https://jira.hl7.org/browse/FHIR-28672)
1 parent 0565f48 commit c8af871

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

docs/specification/current.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ Only the `encounterId` field in this example is eligible to be a prefetch token
350350
"prefetch": {
351351
"patient": "Patient/{{context.patientId}}",
352352
"hemoglobin-a1c": "Observation?patient={{context.patientId}}&code=4548-4&_count=1&sort:desc=date",
353-
"user": "{{context.userId}}"
353+
"diabetes-type2": "Condition?patient={{context.patientId}}&code=44054006&category=problem-list-item&status=active",
354+
"user": "{{userPractitionerRoleId}}"
354355
}
355356
}
356357
```
@@ -362,14 +363,15 @@ goal is to know, at call time:
362363
| --- | ----------- |
363364
| `patient` | Patient demographics. |
364365
| `hemoglobin-a1c` | Most recent Hemoglobin A1c reading for this patient. |
366+
| `diabetes-type2` | If the patient has an active condition of diabetes mellitus on their problem list. |
365367
| `user` | Information on the current user.
366368

367369
#### Example prefetch data
368370

369371
```json
370372
{
371373
"prefetch": {
372-
"patient":{
374+
"patient": {
373375
"resourceType": "Patient",
374376
"gender": "male",
375377
"birthDate": "1974-12-25",
@@ -378,28 +380,33 @@ goal is to know, at call time:
378380
"hemoglobin-a1c": {
379381
"resourceType": "Bundle",
380382
"type": "searchset",
381-
"entry": [{
382-
"resource": {
383-
"resourceType": "Observation",
384-
"code": {
385-
"coding": [{
386-
"system": "http://loinc.org",
387-
"code": "4548-4",
388-
"display": "Hemoglobin A1c"
389-
}]
390-
},
391-
"...": "<snipped for brevity>"
383+
"entry": [
384+
{
385+
"resource": {
386+
"resourceType": "Observation",
387+
"code": {
388+
"coding": [
389+
{
390+
"system": "http://loinc.org",
391+
"code": "4548-4",
392+
"display": "Hemoglobin A1c"
393+
}
394+
]
395+
},
396+
"...": "<snipped for brevity>"
397+
}
392398
}
393-
}]
394-
}
399+
]
400+
},
401+
"user": "123"
395402
}
396403
}
397404
```
398405

399406
The CDS Hooks request is augmented to include two prefetch values, where the dictionary
400407
keys match the request keys (`patient` and `hemoglobin-a1c` in this case).
401408

402-
Note that the missing `user` key indicates that either the CDS Client has decided not to satisfy this particular prefetch template or it was not able to retrieve this prefetched data. The CDS Service is responsible for retrieving the FHIR resource representing the user from the FHIR server (if required).
409+
Note that the missing `diabetes-type2` key indicates that either the CDS Client has decided not to satisfy this particular prefetch template or it was not able to retrieve this prefetched data. The CDS Service is responsible for retrieving the FHIR resource representing the user from the FHIR server (if required).
403410

404411
### FHIR Resource Access
405412

0 commit comments

Comments
 (0)