This commit is contained in:
Tadgh 2020-11-13 15:27:58 -05:00
parent bf9e02bc16
commit 16003162fd
1 changed files with 6 additions and 1 deletions

View File

@ -389,7 +389,7 @@ Tags have very specific semantics, which may not be obvious simply by using the
## Accessing Tags in a Read / VRead / Search Method
Tags are stored within a resource object, in the Resource.meta element.
Tags are stored within a resource object, in the Resource.meta element. It is important to note that changing a resources tags will not cause a version update to that resource.
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.
@ -415,6 +415,11 @@ To work with tags in a create/update method, the pattern used in the read exampl
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/RestfulPatientResourceProviderMore.java|createTags}}
```
## Removing Tags
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
definining which tags to delete.
# Handling _summary and _elements
The `_summary` and `_elements` parameters are automatically handled by the server, so no coding is required to make this work.