Release 4B Snapshot #1

This page is part of the FHIR Specification (v4.3.0-snapshot1: Release 4B Snapshot #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

Operation-resource-validate.ttl

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Not linked to any defined compartments

Raw Turtle (+ also see Turtle/RDF Format Specification)

Operation Definition

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:OperationDefinition;
  fhir:Resource.id [ fhir:value "Resource-validate"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "extensions" ]
  ];
  fhir:DomainResource.extension [
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm" ];
     fhir:Extension.value [ fhir:value "5" ]
  ], [
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ];
     fhir:Extension.value [ fhir:value "normative" ]
  ];
  fhir:CanonicalResource.url [ fhir:value "http://hl7.org/fhir/OperationDefinition/Resource-validate"];
  fhir:CanonicalResource.version [ fhir:value "4.3.0-snapshot1"];
  fhir:CanonicalResource.name [ fhir:value "validate"];
  fhir:CanonicalResource.title [ fhir:value "Validate a resource"];
  fhir:CanonicalResource.status [ fhir:value "active"];
  fhir:CanonicalResource.date [ fhir:value "2021-12-20T14:08:35+11:00"];
  fhir:CanonicalResource.publisher [ fhir:value "HL7 (FHIR Project)"];
  fhir:CanonicalResource.contact [
     fhir:ContactDetail.telecom [
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
     ], [
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
     ]
  ];
  fhir:CanonicalResource.description [ fhir:value "The validate operation checks whether the attached content would be acceptable either generally, as a create, an update or as a delete to an existing resource.  The action the server takes depends on the mode parameter:  \n\n* [mode not provided]: The server checks the content of the resource against any schema, constraint rules, and other general terminology rules \n* create: The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints) \n* update: The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate) \n* delete: The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules)  \n\nModes update and delete can only be used when the operation is invoked at the resource instance level.   The return from this operation is an [OperationOutcome](operationoutcome.html)\n\nNote that this operation is not the only way to validate resources - see [Validating Resources](validation.html) for further information."];
  fhir:OperationDefinition.url [ fhir:value "http://hl7.org/fhir/OperationDefinition/Resource-validate"];
  fhir:OperationDefinition.version [ fhir:value "4.3.0-snapshot1"];
  fhir:OperationDefinition.name [ fhir:value "validate"];
  fhir:OperationDefinition.title [ fhir:value "Validate a resource"];
  fhir:OperationDefinition.status [ fhir:value "active"];
  fhir:OperationDefinition.kind [ fhir:value "operation"];
  fhir:OperationDefinition.date [ fhir:value "2021-12-20T14:08:35+11:00"];
  fhir:OperationDefinition.publisher [ fhir:value "HL7 (FHIR Project)"];
  fhir:OperationDefinition.contact [
     fhir:ContactDetail.telecom [
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
     ], [
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
     ]
  ];
  fhir:OperationDefinition.description [ fhir:value "The validate operation checks whether the attached content would be acceptable either generally, as a create, an update or as a delete to an existing resource.  The action the server takes depends on the mode parameter:  \n\n* [mode not provided]: The server checks the content of the resource against any schema, constraint rules, and other general terminology rules \n* create: The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints) \n* update: The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate) \n* delete: The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules)  \n\nModes update and delete can only be used when the operation is invoked at the resource instance level.   The return from this operation is an [OperationOutcome](operationoutcome.html)\n\nNote that this operation is not the only way to validate resources - see [Validating Resources](validation.html) for further information."];
  fhir:OperationDefinition.affectsState [ fhir:value "false"];
  fhir:OperationDefinition.code [ fhir:value "validate"];
  fhir:OperationDefinition.comment [ fhir:value "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 successfully perform an actual create, update or delete after the validation operation completes.\n\nThis operation returns a 200 OK whether or not the resource is valid. A 4xx or 5xx error means that the validation itself could not be performed, and it is unknown whether the resource is valid or not.\n\nNote: the correct behaviour of validation with regard to language (especially for Coding.display) is currently undefined, and further development and testing may lead to specific requirements or recommendations in subsequent releases\n\nFuture versions of this specifcation may add additional validation parameters. A candidate list is maintained with the [FHIR Validator Documentation](https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator)"];
  fhir:OperationDefinition.resource [ fhir:value "Resource"];
  fhir:OperationDefinition.system [ fhir:value "false"];
  fhir:OperationDefinition.type [ fhir:value "true"];
  fhir:OperationDefinition.instance [ fhir:value "true"];
  fhir:OperationDefinition.parameter [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "resource" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "in" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "0" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "Must be present unless the mode is \"delete\"" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "Resource" ]
  ], [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "mode" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "in" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "0" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "Default is 'no action'; (e.g. general validation)" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "code" ];
     fhir:OperationDefinitionParameterComponent.binding [
       fhir:Element.extension [
         fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ];
         fhir:Extension.value [ fhir:value "ResourceValidationMode" ]
       ];
       fhir:OperationDefinitionParameterBindingComponent.strength [ fhir:value "required" ];
       fhir:OperationDefinitionParameterBindingComponent.valueSet [ fhir:value "http://hl7.org/fhir/ValueSet/resource-validation-mode|4.3.0-snapshot1" ]
     ]
  ], [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "profile" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "in" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "0" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "If this is nominated, then the resource is validated against this specific profile. If a profile is nominated, and the server cannot validate against the nominated profile, it SHALL return an error" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "canonical" ]
  ], [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "return" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "out" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "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)" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "OperationOutcome" ]
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.