$validate
Introduction
The tool introduced by FHIR to provide a separate validation mechanism for 2-steps commit workflow or for development needs. It works for create, update and delete operations, is called using ?mode=
query parameter with values create
, update
, delete
but changes won't be committed. Instead a requester will get an OperationOutcome
with information about validation results. See http://hl7.org/fhir/resource-operation-validate.html for the official documentation.
Such requests check the resource structure, internal business rules and return a list of problems if some exist.
200
OK — those requests always return status 200
Success and failure of a validation request is determined by id
of OperationOutcome
resource. allok
and validationfail
are self-descriptive.
$validate supports two ways to pass arguments:
Parameter
Description
resourceType
Required. Type of the resource which needs validation
id
Optional for mode
=create
. Can either be passed in the resource body or be specified in the route params
resource
Optional for mode
=delete
, required otherwise. Resource to be validated
mode
Optional. Default is create
. Possible values are create, update, delete, patch
profile
mode
Description
create
Ignores errors about attributesid
& lastUpdated
being required
update
Validates without ignoring errors about attributesid
& lastUpdated
delete
Checks if resource with such id
exists in Aidbox
patch
Merges the existing resource to the received resource and then validates as update
.
merge-patch
json-patch
Examples
Validation Success
Validation Failure
Last updated
Was this helpful?