Skip to content

Commit 5f3b6fa

Browse files
authored
Include history search details
1 parent d03a751 commit 5f3b6fa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ 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 interaction are performed by 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+
GET https://{{FHIR_URL}}/_history`
79+
80+
The response is a Bundle with type set to history containing the specified version history, sorted with oldest versions last, and including deleted resources.
81+
82+
To search with history, following interactions can be used
83+
* _count : defines number of resources returned on single page.
84+
* _since : includes resource versions that were created at or after the given instant in time.
85+
* _before : includes resource versions that were created before the given instant in time.
86+
7287
## Patch and conditional patch
7388

7489
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)