Summary parameter
This tutorial designed for summary parameter demonstration purposes

How to

The client can request the server to return only summary elements of the resources by using the parameter _summary
1
GET /Patient?_summary=true
Copied!
There is boolean isSummary attribute in Attribute definition. Which exact elements will be returned for a specific resource as _summary can be inspected using the following request to the Attribute :
1
GET /Attribute?entity=Patient&.isSummary=true&_elements=id,isSummary&_sort=_id
2
​
3
# resp
4
​
5
resourceType: Bundle
6
type: searchset
7
entry:
8
- resource: {id: Patient.active, isSummary: true, resourceType: Attribute}
9
fullUrl: /Attribute/Patient.active
10
- resource: {id: Patient.address, isSummary: true, resourceType: Attribute}
11
fullUrl: /Attribute/Patient.address
12
- resource: {id: Patient.animal, isSummary: true, resourceType: Attribute}
13
fullUrl: /Attribute/Patient.animal
14
- resource: {id: Patient.animal.breed, isSummary: true, resourceType: Attribute}
15
fullUrl: /Attribute/Patient.animal.breed
16
.....
Copied!

Values table

Value
Description
​true​
Return a limited subset of elements from the resource. This subset SHOULD consist solely of all supported elements that are marked as "summary" in the base definition of the resource(s) (see ElementDefinition.isSummary)
​text​
Return only the "text" element, the 'id' element, the 'meta' element, and only top-level mandatory elements
​data​
Remove the text element
​count​
Search only: just return a count of the matching resources, without returning the actual matches
​false​
Return all parts of the resource(s)

Summary purpose

The intent of the _summary parameter is to reduce the total processing load on server, client, and resources between them such as the network. It is most useful for resources that are large, particularly ones that include images or elements that may repeat many times.
The purpose of the summary form is to allow a client to quickly retrieve a large set of resources, and let a user pick the appropriate one. The summary for an element is defined to allow a user to quickly sort and filter the resources, and typically omit important content on the basis that the entire resource will be retrieved when the user selects a resource.

Limitations

You can't expect only a summary response as requested. There is limited number of summary forms defined for resources in order to allow servers to store the summarized form(s) in advance. Servers SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not accidentally used to overwrite a complete resource.
_include and _revincludecannot be mixed with _summary=text.
Implementation Note: There is some question about the inclusion of extensions in the summary. Additional rules may be made around this in the future.
Last modified 1mo ago