Skip to main content

History Resource Instance

The FHIR history operation allows you to retrieve the change history for a specific resource instance. This is done using an HTTP GET request to the history endpoint for the resource.

Retrieve the history of a Patient resource using the Haste Health CLI:

haste-health api history-instance Patient 12345 "_count=10"

This command retrieves the last 10 versions of the Patient resource with ID 12345.

You can also retrieve history without parameters:

haste-health api history-instance Patient 12345

Replace [tenant] with your tenant name and [project] with your project ID.

Error Handling

If the resource is not found, the server will respond with a 404 Not Found status code and include an OperationOutcome resource in the response body.

HTTP/1.1 404 Not Found
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "not-found",
"diagnostics": "Resource Patient/12345 not found"
}
]
}