This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

1.10.6 Resource Resource - Operations

This resource has 4 operations associated with it. For more information about operations, including how they are invoked, see Operations.

1.10.6.1 Validate a resource

The validate interaction checks whether the attached content would be acceptable either generally, or as a create, or an update or delete to an existing resource.

The action the server takes depends on the mode parameter:

Modes update and delete can only be used when the operation is invoked at the resource level.

The return from this operation is an OperationOutcome

Formal Definition (as a OperationDefinition).

URL: [base]/Resource/$validate

URL: [base]/Resource/[id]/$validate

In Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
resource0..1Resource

Must be present unles the mode is "delete"

mode0..1string

Default is 'no action; (e.g. general validation)

profile0..1uri

If this is nominated, then the resource is validated against this specific profile. If a profile is nominated, and the server cannot validate agsinst the nominated profile, it SHALL return an error

Out Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
return1..1OperationOutcome

If the operation outcome does not list any errors, and a mode was specified, then this is an indication that the operation would be expected to succeed (excepting for transactional integrity issues, see below)

Note: as this the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource

This operation may be used during design and development to validate application design. It can also be used at run-time. One possible use might be that a client asks the server whether a proposed update is valid as the user is editing a dialog, and displays an updated error to the user. The operation can be used as part of a light-weight two phase commit protocol but there is no expectation that the server will hold the content of the resource after this operation is used, or that the server guarantees to succesfully perform an actual create, update or delete after the validation operation completes.

1.10.6.2 Access a list of profiles, tags, and security labels

This operation retrieves a summary of the profiles, tags, and security labels for the given scope. E.g. for each scope:

Also, as a special case, this operation (and other meta operations) can be performed on a historical version of a resource)

Formal Definition (as a OperationDefinition).

URL: [base]/$meta

URL: [base]/Resource/$meta

URL: [base]/Resource/[id]/$meta

Out Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
return1..1Meta

The meta returned by the operation

At the system and type levels, the $meta operation is used to get a summary of all the labels that are in use across the system. The principle use for this operation is to support search e.g. what tags can be searched for. At these levels, the meta will not contain versionId, lastUpdated etc. Systems are not obligated to implement the operation at this level (and should return a 4xx error if they don't)

At the resource and historical entry level, the $meta operation returns the same meta as would be returned by accessing the resource directly. This can be used to allow a system to get access to the meta-information for the resource without accessing the resource itself, e.g. for security reasons

1.10.6.3 Add profiles, tags, and security labels to a resource

This operation takes a meta, and either adds the profiles, tags, and security labels found in it to the nominated resource.

This operation can also be used on historical entries - to update them without creating a different historical version

Formal Definition (as a OperationDefinition).

URL: [base]/Resource/[id]/$meta-add

In Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
meta1..1Meta

Profiles, tags, and security labels to add to the existing resource. Note that profiles, tags, and security labels are sets, and duplicates are not created.

The identity of a tag or security label is the system+code. When matching existing tags during adding, version and display are ignored. For profiles matching is based on the full URL

Out Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
return1..1Meta

Resulting meta for the resource

This operation is special in that executing this operation does not cause a new version of the resource to be created. The meta is updated directly. This is because the content in meta does not affect the meaning of the resource, and the security labels (in particular) are used to apply access rules to existing versions of resources

1.10.6.4 Delete profiles, tags, and security labels for a resource

This operation takes a meta, and either deletes the profiles, tags, and security labels found in it from the nominated resource.

This operation can also be used on historical entries

Formal Definition (as a OperationDefinition).

URL: [base]/Resource/[id]/$meta-delete

In Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
meta1..1Meta

Profiles, tags, and security labels to add delete from the existing resource. It is not an error if these tags, profiles, and labels do not exist.

The identity of a tag or security label is the system+code. When matching existing tags during deletion, version and display are ignored. For profiles matching is based on the full URL

Out Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
return1..1Meta

Resulting meta for the resource

This operation is special in that executing this operation does not cause a new version of the resource to be created. The meta is updated directly. This is because the content in meta does not affect the meaning of the resource, and the security labels (in particular) are used to apply access rules to existing versions of resources