Purge history operation

$purge-history is an operation that allows you to delete the history of a single Fast Healthcare Interoperability Resources (FHIR®) resource. This operation isn't defined in the FHIR specification, but it's useful for history management in large FHIR service instances.

Overview of purge history

The $purge-history operation was created to help with the management of resource history in FHIR service. It's uncommon to need to purge resource history. However, it's needed in cases when the system level or resource level versioning policy changes, and you want to clean up existing resource history.

Since $purge-history is a resource level operation (versus a type level or system level operation) you need to run the operation for every resource from which you want to remove the history.

Examples of purge history

To use $purge-history, you must add /$purge-history to the end of a standard delete request. The template of the request is:

DELETE <FHIR-Service-Url>/<Resource-Type>/<Resource-Id>/$purge-history

For example:

DELETE https://workspace-fhir.fhir.azurehealthcareapis.com/Observation/123/$purge-history

Versioning policy and history management

Supported FHIR features

REST API capabilities in the FHIR service in Azure Health Data Services

Note

FHIR® is a registered trademark of HL7 and is used with the permission of HL7.