{
  "resourceType": "OperationDefinition",
  "url": "http://vonk.fire.ly/fhir/OperationDefinition/Resource-validate-system",
  "version": "1.0",
  "name": "Vonk - $validate system-level",
  "status": "active",
  "kind": "operation",
  "date": "2019-02-11",
  "publisher": "Firely",
  "contact": [
    {
      "name": "Firely",
      "telecom": [
        {
          "system": "email",
          "value": "vonk@fire.ly"
        }
      ]
    }
  ],
  "description": "The validate operation checks whether or not the provided content is a valid FHIR resource. The operation will additionally check if a provided FHIR resource is conformant to a set of profiles. The set of profiles consists of:\n- the FHIR core profile for the resourcetype of the resource\n- profiles declared in Resource.meta.profile (if any)\n- profile from the operation parameters (if any)\n\nThe operation returns HTTP 200 - OK irrespective of the outcome of the validation itself. A 4xx or 5xx error means that the validation could not be performed, and it is unknown whether or not the resource is valid.",
  "idempotent": true,
  "code": "validate",
  "comment": "Use $validate on a system-level to check whether or not the provided content is a valid FHIR resource regardless of the resource type. Calling $validate on a system-level with an HTTP GET request is not supported.",
  "system": true,
  "type": false,
  "instance": false,
  "parameter": [
    {
      "name": "resource",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "Content which shall be checked if it represents a valid FHIR resource.",
      "type": "Resource"
    },
    {
      "name": "profile",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "If a profile is provided, then the resource is validated against this specific profile - additional to the profiles declared in meta.profile. If a profile is provided and the server cannot validate against the nominated profile (e.g., because it cannot be resolved), the operation will return an error.",
      "type": "uri"
    },
    {
      "name": "return",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "Outcome of the validation operation. May include error, warning, and informational messages.",
      "type": "OperationOutcome"
    }
  ]
}