Skip to content

Commit d15a300

Browse files
authored
Merge pull request #2174 from jamesagnew/feature/2172-update-tag-docs
Feature/2172 update tag docs
2 parents 1db0944 + 1048df4 commit d15a300

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_plain/rest_operations.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ Tags have very specific semantics, which may not be obvious simply by using the
389389

390390
## Accessing Tags in a Read / VRead / Search Method
391391

392-
Tags are stored within a resource object, in the Resource.meta element.
392+
Tags are stored within a resource object, in the Resource.meta element. It is important to note that changing a resource's tags will not cause a version update to that resource.
393393

394394
In a server implementation, you may populate your tags into the returned resource(s) and HAPI will automatically place these tags into the response headers (for read/vread) or the bundle category tags (for search). The following example illustrates how to return tags from a server method. This example shows how to supply tags in a read method, but the same approach applies to vread and search operations as well.
395395

@@ -409,12 +409,17 @@ Within a [Type Create](#type_create) or [Instance Update](#instance_update) meth
409409

410410
Note that FHIR specifies that in an update method, any tags supplied by the client are copied to the newly saved version, as well as any tags the existing version had.
411411

412-
To work with tags in a create/update method, the pattern used in the read examples above is simply revered. In a server, the resource which is passed in will be populated with any tags that the client supplied:
412+
To work with tags in a create/update method, the pattern used in the read examples above is simply reversed. In a server, the resource which is passed in will be populated with any tags that the client supplied:
413413

414414
```java
415415
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java|createTags}}
416416
```
417417

418+
## Removing Tags
419+
420+
In order to remove a tag, it does not suffice to remove it from the resource. Tags can be removed using the [Resource Operation Meta Delete](https://www.hl7.org/fhir/resource-operation-meta-delete.html), which takes a Parameter
421+
definining which tags to delete.
422+
418423
# Handling _summary and _elements
419424

420425
The `_summary` and `_elements` parameters are automatically handled by the server, so no coding is required to make this work.

0 commit comments

Comments
 (0)