Method: fhir.Resource-validate

Full name: projects.locations.datasets.fhirStores.fhir.Resource-validate

Validates an input FHIR resource's conformance to its profiles and the profiles configured on the FHIR store.

Implements the FHIR extended operation $validate (DSTU2, STU3, or R4).

The request body must contain a JSON-encoded FHIR resource, and the request headers must contain Content-Type: application/fhir+json. The Parameters input syntax is not supported.

The profile query parameter can be used to request that the resource only be validated against a specific profile. If a profile with the given URL cannot be found in the FHIR store then an error is returned.

Errors generated by validation contain a JSON-encoded OperationOutcome resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.

HTTP request

POST https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*/fhirStores/*}/fhir/{type}/$validate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the FHIR store that holds the profiles being used for validation.

Authorization requires the following IAM permission on the specified resource parent:

  • healthcare.fhirResources.get
type

string

Required. The FHIR resource type of the resource being validated. For a complete list, see the FHIR Resource Index (DSTU2, STU3, or R4). Must match the resource type in the provided content.

Query parameters

Parameters
profile

string

Required. The canonical URL of a profile that this resource should be validated against. For example, to validate a Patient resource against the US Core Patient profile this parameter would be http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient. A StructureDefinition with this canonical URL must exist in the FHIR store.

Request body

The request body contains an instance of HttpBody.

Response body

If successful, the response is a generic HTTP response whose format is defined by the method.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-healthcare
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.