Skip to content

Commit b6d1111

Browse files
Merge pull request #196647 from SteveWohl/versioning-policy-feature-docs
Added fhir-versioning-policy-history-management MD file and PNG files
2 parents 560bb70 + b72330f commit b6d1111

11 files changed

+199
-25
lines changed

articles/healthcare-apis/azure-api-for-fhir/fhir-features-supported.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: mikaelweave
66
ms.service: healthcare-apis
77
ms.subservice: fhir
88
ms.topic: reference
9-
ms.date: 03/21/2022
9+
ms.date: 05/05/2022
1010
ms.author: mikaelw
1111
---
1212

@@ -58,7 +58,7 @@ All the operations that are supported that extend the REST API.
5858
| [$validate](validation-against-profiles.md) | Yes | Yes | |
5959
| [$member-match](tutorial-member-match.md) | Yes | Yes | |
6060
| [$patient-everything](patient-everything.md) | Yes | Yes | |
61-
| $purge-history | Yes | Yes | |
61+
| [$purge-history](purge-history.md) | Yes | Yes | |
6262

6363
## Persistence
6464

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Purge history operation for Azure API for FHIR
3+
description: This article describes the $purge-history operation for Azure API for FHIR.
4+
author: stevewohl
5+
ms.service: healthcare-apis
6+
ms.subservice: fhir
7+
ms.topic: conceptual
8+
ms.date: 05/05/2022
9+
ms.author: mikaelw
10+
---
11+
12+
# Purge history operation for Azure API for FHIR
13+
14+
`$purge-history` is an operation that allows you to delete the history of a single FHIR resource. This operation isn't defined in the FHIR specification.
15+
16+
## Overview of purge history
17+
18+
The `$purge-history` operation was created to help with the management of resource history in Azure API for FHIR. 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.
19+
20+
Since `$purge-history` is a resource level operation versus a type level or system level operation, you'll need to run the operation for every resource that you want remove the history from.
21+
22+
## Examples of purge history
23+
24+
To use `$purge-history`, you must add `/$purge-history` to the end of a standard delete request. The template of the request is:
25+
26+
```http
27+
DELETE <FHIR-Service-Url>/<Resource-Type>/<Resource-Id>/$purge-history
28+
```
29+
30+
For example:
31+
32+
```http
33+
DELETE https://workspace-fhir.fhir.azurehealthcareapis.com/Observation/123/$purge-history
34+
```
35+
36+
## Next steps
37+
38+
In this article, you learned how to purge the history for resources in Azure API for FHIR. For more information about Azure API for FHIR, see
39+
40+
>[!div class="nextstepaction"]
41+
>[Supported FHIR features](fhir-features-supported.md)
42+
43+
>[!div class="nextstepaction"]
44+
>[FHIR REST API capabilities for Azure API for FHIR](fhir-rest-api-capabilities.md)

articles/healthcare-apis/azure-api-for-fhir/toc.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,6 @@ items:
122122
- name: FHIR operations
123123
expanded: false
124124
items:
125-
- name: $validate
126-
expanded: false
127-
items:
128-
- name: Store profiles
129-
href: store-profiles-in-fhir.md
130-
- name: Use $validate
131-
href: validation-against-profiles.md
132125
- name: $export
133126
expanded: false
134127
items:
@@ -138,10 +131,19 @@ items:
138131
href: export-data.md
139132
- name: De-identified export
140133
href: de-identified-export.md
141-
- name: Patient/$everything
142-
href: patient-everything.md
143134
- name: $member-match
144135
href: tutorial-member-match.md
136+
- name: Patient/$everything
137+
href: patient-everything.md
138+
- name: $purge-history operation
139+
href: purge-history.md
140+
- name: $validate
141+
expanded: false
142+
items:
143+
- name: Store profiles
144+
href: store-profiles-in-fhir.md
145+
- name: Use $validate
146+
href: validation-against-profiles.md
145147
- name: How to convert data to FHIR
146148
href: convert-data.md
147149
- name: Copy data to Synapse

articles/healthcare-apis/fhir/fhir-features-supported.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: mikaelweave
66
ms.service: healthcare-apis
77
ms.subservice: fhir
88
ms.topic: reference
9-
ms.date: 03/01/2022
9+
ms.date: 05/05/2022
1010
ms.author: mikaelw
1111
---
1212

@@ -55,7 +55,7 @@ All the operations that are supported that extend the REST API.
5555
| [$validate](validation-against-profiles.md) | Yes | Yes | |
5656
| [$member-match](tutorial-member-match.md) | Yes | Yes | |
5757
| [$patient-everything](patient-everything.md) | Yes | Yes | |
58-
| $purge-history | Yes | Yes | |
58+
| [$purge-history](purge-history.md) | Yes | Yes | |
5959

6060
## Role-based access control
6161

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Versioning policy and history management for Azure Health Data Services FHIR service
3+
description: This article describes the concepts of versioning policy and history management for Azure Health Data Services FHIR service.
4+
author: stevewohl
5+
ms.service: healthcare-apis
6+
ms.subservice: fhir
7+
ms.topic: conceptual
8+
ms.date: 05/05/2022
9+
ms.author: mikaelw
10+
---
11+
12+
# Versioning policy and history management
13+
14+
The versioning policy in the Azure Health Data Services FHIR service is a configuration, which determines how history is stored for every resource type with the option for resource specific configuration. This policy is directly related to the concept of managing history for FHIR resources.
15+
16+
## History in FHIR
17+
18+
History in FHIR gives you the ability to see all previous versions of a resource. History in FHIR can be queried at the resource level, type level, or system level. The HL7 FHIR documentation has more information about the [history interaction](https://www.hl7.org/fhir/http.html#history). History is useful in scenarios where you want to see the evolution of a resource in FHIR or if you want to see the information of a resource at a specific point in time.
19+
20+
All past versions of a resource are considered obsolete and the current version of a resource should be used for normal business workflow operations. However, it can be useful to see the state of a resource as a point in time when a past decision was made.
21+
22+
## Versioning policy
23+
24+
Versioning policy in the FHIR service lets you decide how history is stored either at a FHIR service level or at a specific resource level.
25+
26+
There are three different levels for versioning policy:
27+
28+
- `versioned`: History is stored for operation on resources. Resource version is incremented. This is the default.
29+
- `version-update`: History is stored for operation on resources. Resource version is incremented. Updates require a valid `If-Match` header. For more information, see [VersionedUpdateExample.http](https://github.com/microsoft/fhir-server/blob/main/docs/rest/VersionedUpdateExample.http).
30+
- `no-version`: History isn't created for resources. Resource version is incremented.
31+
32+
Versioning policy available to configure at as a system-wide setting and also to override at a resource level. The system-wide setting is used for all resources in your FHIR service, unless a specific resource level versioning policy has been added.
33+
34+
### Versioning policy comparison
35+
36+
| Policy Value | History Behavior | `meta.versionId` Update Behavior | Default |
37+
| ---------------- | --------------------- | -------------------------- | ------- |
38+
| `versioned` | History is stored | If-Match not required | Yes |
39+
| `version-update` | History is stored | If-Match required | No |
40+
| `no-version` | History isn't stored | If-Match not required | No |
41+
42+
> [!NOTE]
43+
> Changing the versioning policy to `no-version` has no effect on existing resource history. If history needs to be removed for resources, use the [$purge-history](purge-history.md) operation.
44+
45+
## Configuring versioning policy
46+
47+
To configure versioning policy, select the **Versioning Policy Configuration** blade inside your FHIR service.
48+
49+
[ ![Screenshot of the Azure portal Versioning Policy Configuration.](media/versioning-policy/fhir-service-versioning-policy-configuration.png) ](media/versioning-policy/fhir-service-versioning-policy-configuration.png#lightbox)
50+
51+
After you've browsed to Versioning Policy Configuration, you'll be able to configure the setting at both system level and the resource level (as an override of the system level). The system level configuration (annotated as 1) will apply to every resource in your FHIR service unless a resource specific override (annotated at 2) has been configured.
52+
53+
[ ![Screenshot of Azure portal versioning policy configuration showing system level vs resource level configuration.](media/versioning-policy/system-level-versus-resource-level.png) ](media/versioning-policy/system-level-versus-resource-level.png#lightbox)
54+
55+
When configuring resource level configuration, you'll be able to select the FHIR resource type (annotated as 1) and the specific versioning policy for this specific resource (annotated as 2). Make sure to select the **Add** button (annotated as 3) to queue up this setting for saving.
56+
57+
[ ![Screenshot of Azure portal versioning policy configuration showing resource level configuration.](media/versioning-policy/resource-versioning.jpg) ](media/versioning-policy/resource-versioning.jpg#lightbox)
58+
59+
60+
**Make sure** to select **Save** after you've completed your versioning policy configuration.
61+
62+
[ ![Screenshot of Azure portal versioning policy configuration configuration showing save button.](media/versioning-policy/save-button.jpg) ](media/versioning-policy/save-button.jpg#lightbox)
63+
64+
## History Management
65+
66+
History in FHIR is important for end users to see how a resource has changed over time. It's also useful in coordination with audit logs to see the state of a resource before and after a user modified it. In general, it's recommended to keep history for a resource unless you know that the history isn't needed. Frequent updates of resources can result in a large amount of data storage, which can be undesired in FHIR services with a large amount of data.
67+
68+
Changing the versioning policy either at a system level or resource level won't remove the existing history for any resources in your FHIR service. If you're looking to reduce the history data size in your FHIR service, you must use the [$purge-history](purge-history.md) operation.
69+
70+
## Next steps
71+
72+
In this article, you learned how to purge the history for resources in the FHIR service. For more information about how to disable history and some concepts about history management, see
73+
74+
>[!div class="nextstepaction"]
75+
>[Purge history operation](purge-history.md)
76+
77+
391 KB
Loading
82.9 KB
Loading
161 KB
Loading
253 KB
Loading
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Purge history operation for Azure Health Data Services FHIR service
3+
description: This article describes the $purge-history operation for the FHIR service.
4+
author: stevewohl
5+
ms.service: healthcare-apis
6+
ms.subservice: fhir
7+
ms.topic: conceptual
8+
ms.date: 05/05/2022
9+
ms.author: mikaelw
10+
---
11+
12+
# Purge history operation
13+
14+
`$purge-history` is an operation that allows you to delete the history of a single FHIR resource. This operation isn't defined in the FHIR specification, but it's useful for [history management](fhir-versioning-policy-and-history-management.md) in large FHIR service instances.
15+
16+
## Overview of purge history
17+
18+
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](fhir-versioning-policy-and-history-management.md) changes, and you want to clean up existing resource history.
19+
20+
Since `$purge-history` is a resource level operation versus a type level or system level operation, you'll need to run the operation for every resource that you want remove the history from.
21+
22+
## Examples of purge history
23+
24+
To use `$purge-history`, you must add `/$purge-history` to the end of a standard delete request. The template of the request is:
25+
26+
```http
27+
DELETE <FHIR-Service-Url>/<Resource-Type>/<Resource-Id>/$purge-history
28+
```
29+
30+
For example:
31+
32+
```http
33+
DELETE https://workspace-fhir.fhir.azurehealthcareapis.com/Observation/123/$purge-history
34+
```
35+
36+
## Next steps
37+
38+
In this article, you learned how to purge the history for resources in the FHIR service. For more information about how to disable history and some concepts about history management, see
39+
40+
>[!div class="nextstepaction"]
41+
>[Versioning policy and history management](fhir-versioning-policy-and-history-management.md)
42+
43+
>[!div class="nextstepaction"]
44+
>[Supported FHIR features](fhir-features-supported.md)
45+
46+
>[!div class="nextstepaction"]
47+
>[FHIR REST API capabilities for Azure Health Data Services FHIR service](fhir-rest-api-capabilities.md)

0 commit comments

Comments
 (0)