Skip to content

Commit e11d6a8

Browse files
Merge pull request #277794 from EXPEkesheth/patch-171
Include history search details
2 parents cd19c28 + 364d2cb commit e11d6a8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/healthcare-apis/fhir/rest-api-capabilities.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ After you find the record to restore, use the `PUT` operation to recreate the re
6969
7070
[!INCLUDE [Bundle details](../includes/rest-api-bundle-common.md)]
7171

72+
## History
73+
The history interaction retrieves the history of either a particular resource, all resources of a given type, or all resources supported by the system. History interactions are performed by the HTTP GET command.
74+
75+
For example:
76+
`GET https://{{FHIR_URL}}/{resource type}/{resource id}/_history
77+
GET https://{{FHIR_URL}}/{resource type})/_history`
78+
79+
The response is a bundle with type set to the specified version history, sorted with oldest versions last, and including deleted resources.
80+
81+
To search with history, use these interactions:```
82+
* _count : defines the number of resources returned on single page.
83+
* _since : includes resource versions created at or after the given instant in time.
84+
* _before : includes resource versions that were created before the given instant in time.
85+
86+
For more information on history and version management, please visit [FHIR versioning policy and history management](fhir-versioning-policy-and-history-management.md).
87+
7288
## Patch and conditional patch
7389

7490
Patch is a valuable RESTful operation when you need to update only a portion of the FHIR resource. Using patch allows you to specify the element that you want to update in the resource without having to update the entire record. FHIR defines three ways to patch resources: JSON Patch, XML Patch, and FHIRPath Patch. The FHIR service supports JSON Patch and FHIRPath Patch, along with Conditional JSON Patch and Conditional FHIRPath Patch (which allows you to patch a resource based on a search criteria instead of a resource ID). For some examples, refer to the [FHIRPath Patch REST file](https://github.com/microsoft/fhir-server/blob/main/docs/rest/FhirPatchRequests.http) and the [JSON Patch REST file](https://github.com/microsoft/fhir-server/blob/main/docs/rest/JsonPatchRequests.http). For more information, see [HL7 documentation for patch operations with FHIR](https://www.hl7.org/fhir/http.html#patch).

0 commit comments

Comments
 (0)