Skip to content

Commit f9da324

Browse files
authored
Merge pull request #310453 from evachen96/evachjan14releasenotes
Update release notes and metahistory documentation
2 parents c56f405 + 97e1e3d commit f9da324

4 files changed

Lines changed: 93 additions & 5 deletions

File tree

articles/healthcare-apis/fhir/fhir-versioning-policy-and-history-management.md

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ Changing the versioning policy, either at a system level or resource level, won'
7171
> The query parameter _summary=count and _count=0 can be added to _history endpoint to get a count of all versioned resources. This count includes soft deleted resources.
7272
7373
## Metadata-only updates and versioning
74-
If the versioning policy is set to either `versioned` or `version-update`, metadata-only updates (changes to FHIR resources that only affect the metadata) increment the resource version, create a new version, and save the old version as a historical record. If you are making metadata-only changes using PUT updates, you can use the query parameter _meta-history for PUT updates to configure whether or not the old version is saved as a historical record.
74+
If the versioning policy is set to either `versioned` or `version-update`, metadata-only updates (changes to FHIR resources that only affect the metadata) increment the resource version, create a new version, and save the old version as a historical record. If you are making metadata-only changes using PUT or PATCH updates, you can use the query parameter _meta-history for PUT and PATCH updates to configure whether or not the old version is saved as a historical record.
7575
- `_meta-history=true` is set by default. By default, the resource version is incremented, a new version is created, and the old version is saved as a historical record. The lastUpdated timestamp is updated to reflect the change.
7676
- `_meta-history=false` The `_meta-history` parameter can be configured to `false`. This means that the resource version is incremented, a new version is created, but the old version is not saved as a historical record. The lastUpdated timestamp is also still updated to reflect the change. This configuration can be used to help reduce data storage when making metadata-only updates.
7777

7878

79-
### Example with `_meta-history=false`
80-
To demonstrate the use of the `_meta-history` parameter, follow this example:
79+
### Example of `_meta-history=false` with PUT
80+
To demonstrate the use of the `_meta-history` parameter with PUT, follow this example:
8181
1. Create a resource:
8282
`PUT <fhir server>/Patient/test-patient`
8383
```
@@ -127,10 +127,85 @@ To demonstrate the use of the `_meta-history` parameter, follow this example:
127127
]
128128
}
129129
```
130-
5. This will increment resource version and create a new version 3, but the old version 2 will not be saved as a historical record. To see this, run: `GET <fhir server>/Patient/test-patient/_history`. Two versions should be returned, versions 1 and 3. Please note that `_meta-history=false` query parameter only affects metadata-only changes made using PUT. Using the query parameter to make metadata updates along with other non-metadata field value changes will increment the resource version and save the old version as a historical record.
130+
5. This will increment resource version and create a new version 3, but the old version 2 will not be saved as a historical record. To see this, run: `GET <fhir server>/Patient/test-patient/_history`. Two versions should be returned, versions 1 and 3. Please note that `_meta-history=false` query parameter only affects metadata-only changes made using PUT or PATCH. Using the query parameter to make metadata updates along with other non-metadata field value changes will increment the resource version and save the old version as a historical record.
131131

132132

133+
### Example of `_meta-history=false` with PATCH
134+
To demonstrate the use of the `_meta-history` parameter with PATCH, follow this example:
133135

136+
1. Create a resource:
137+
`PUT <fhir server>/Patient/test-patient`
138+
```
139+
{
140+
"id": "test-patient",
141+
"resourceType": "Patient",
142+
"name": [
143+
{
144+
"family": "Doe",
145+
"given": [ "John" ]
146+
}
147+
]
148+
}
149+
```
150+
2. Create a new version of the resource with `PUT <fhir server>/Patient/test-patient`. This will have version 2.
151+
```
152+
{
153+
"id": "test-patient",
154+
"resourceType": "Patient",
155+
"meta": {
156+
"tag": [
157+
{
158+
"system": "test",
159+
"code": "test"
160+
}
161+
]
162+
},
163+
"name": [
164+
{
165+
"family": "Doe",
166+
"given": [ "Jane" ]
167+
}
168+
]
169+
}
170+
```
171+
3. Run: `GET <fhir server>/Patient/test-patient/_history`. Two versions should be returned, versions 1 and 2.
172+
4. Use PATCH to make a metadata-only update with `_meta-history=false` query parameter. The example uses PATCH to update only the Patient.meta.tag.system value. More information about PATCH [here](rest-api-capabilities.md#patch-and-conditional-patch).
173+
174+
Using PATCH with FHIRPath patch:
175+
`PATCH <fhir server>/Patient/test-patient?_meta-history=false`
176+
`Content-type: application/fhir+json`
177+
178+
179+
```
180+
181+
{
182+
"resourceType": "Parameters",
183+
"parameter": [
184+
{
185+
"name": "operation",
186+
"part": [
187+
{ "name": "type", "valueCode": "replace" },
188+
{ "name": "path", "valueString": "Patient.meta.tag[0].system" },
189+
{ "name": "value", "valueUri": "test2" }
190+
]
191+
}
192+
]
193+
}
194+
```
195+
196+
Using PATCH with JSON Patch:
197+
`PATCH <fhir server>/Patient/test-patient?_meta-history=false`
198+
`Content-type: application/json-patch+json`
199+
```
200+
[
201+
{
202+
"op": "replace",
203+
"path": "/meta/tag/0/system",
204+
"value": "test2"
205+
}
206+
]
207+
```
208+
5. This will increment resource version and create a new version 3, but the old version 2 will not be saved as a historical record. To see this, run: `GET <fhir server>/Patient/test-patient/_history`. Two versions should be returned, versions 1 and 3. Please note that `_meta-history=false` query parameter only affects metadata-only changes made using PUT or PATCH. Using the query parameter to make metadata updates along with other non-metadata field value changes will increment the resource version and save the old version as a historical record.
134209

135210
## Next steps
136211

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ For more information on history and version management visit [FHIR versioning po
9191
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).
9292
For 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).
9393

94+
95+
9496
> [!NOTE]
9597
> When using `PATCH` against STU3, and if you are requesting a History bundle, the patched resource's `Bundle.entry.request.method` is mapped to `PUT`. This is because STU3 doesn't contain a definition for the `PATCH` verb in the [HTTPVerb value set](http://hl7.org/fhir/STU3/valueset-http-verb.html).
9698
@@ -179,6 +181,13 @@ Content-Type: `application/json`
179181
}
180182
```
181183

184+
#### Patch with `_meta-history` parameter
185+
The FHIR service supports the `_meta-history` query parameter with both `PUT` and `PATCH` operations. This parameter allows you to control whether metadata-only changes to a resource create a new historical version of the resource or not. By default, any change to a resource, including metadata-only changes, creates a new version and saves the previous version as a historical record. When you set the `_meta-history` parameter to `false`, metadata-only changes do not create a new version, and the previous version is not saved as a historical record. This feature is useful for scenarios where frequent metadata updates are made, and you want to avoid cluttering the resource history with numerous versions that only differ in metadata. For more information and examples, see [FHIR versioning policy and history management](fhir-versioning-policy-and-history-management.md#metadata-only-updates-and-versioning).
186+
187+
`PATCH <fhir server>/Patient/test-patient?_meta-history=false`
188+
189+
190+
182191
## Troubleshooting
183192

184193
**Can I delete multiple patient observations or all patient resources in a single API call?**

articles/healthcare-apis/release-notes-2025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Release notes describe features, enhancements, and bug fixes released in 2025 fo
4545
SMART on FHIR v2.0.0 sample is available now on the Azure Health Data and AI Samples open source repo. For more information, visit [`SMART on FHIR`](./fhir/smart-on-fhir.md).
4646

4747

48-
**Metadata-only updates and versioning configuration**: Introduced new query parameter "_meta-history" for PUT updates when versioning policy is set to either "versioned" or "version-update" to configure whether or not the old version is saved as a historical record. "_meta-history = true" is the default. By default, the resource version is incremented, a new version is created, and the old version is saved as a historical record. "_meta-history=false" can be configured so that the resource version is incremented, a new version is created, but the old version is not saved as a historical record. For more information, visit [metadata-only updates and versioning](./fhir/fhir-versioning-policy-and-history-management.md#metadata-only-updates-and-versioning).
48+
**Metadata-only updates and versioning configuration with PUT**: Introduced new query parameter "_meta-history" for PUT updates when versioning policy is set to either "versioned" or "version-update" to configure whether or not the old version is saved as a historical record. "_meta-history = true" is the default. By default, the resource version is incremented, a new version is created, and the old version is saved as a historical record. "_meta-history=false" can be configured so that the resource version is incremented, a new version is created, but the old version is not saved as a historical record. For more information, visit [metadata-only updates and versioning](./fhir/fhir-versioning-policy-and-history-management.md#metadata-only-updates-and-versioning).
4949

5050
**Composite search parameter collation fix**:  Corrected inconsistent collation handling for Token-String composite search parameters.
5151

articles/healthcare-apis/release-notes-2026.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Release notes describe features, enhancements, and bug fixes released in 2026 fo
2020
## January 2026
2121
### FHIR service
2222

23+
**Hard delete now supported inside transaction bundles**: Hard deletes are now allowed inside transaction bundles. Previously, neither hard deletes nor conditional deletes were supported. Conditional deletes are still not allowed.
24+
25+
**Metadata-only updates and versioning configuration with PATCH**: Introduced new query parameter "_meta-history" for PATCH updates when versioning policy is set to either "versioned" or "version-update" to configure whether or not the old version is saved as a historical record. "_meta-history = true" is the default. By default, the resource version is incremented, a new version is created, and the old version is saved as a historical record. "_meta-history=false" can be configured so that the resource version is incremented, a new version is created, but the old version is not saved as a historical record. For more information, visit [metadata-only updates and versioning](./fhir/fhir-versioning-policy-and-history-management.md#metadata-only-updates-and-versioning).
26+
2327
**Updates to responses for update and deletion of FHIR spec-defined search parameters**: There are a few updates to the behaviors and responses for update and deletion of FHIR spec-defined search parameters:
2428
- Deletion of out-of-box FHIR spec-defined search parameters previously returned a "204 No Content" and the parameter was not deleted. The response is updated to correctly return "405 Method Not Allowed."
2529
- Update of out-of-box FHIR spec-defined search parameters previously returned "201 Created", which can cause unintended behavior. The response is updated to return "405 Method Not Allowed." If you wish to update an out-of-box FHIR spec-defined search parameter, please create a new custom search parameter with a different URL.

0 commit comments

Comments
 (0)