{
  "resourceType": "StructureDefinition",
  "id": "DataStandardsWales-Consent",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Consent",
  "version": "0.0.2",
  "name": "DataStandardsWalesConsent",
  "title": "Data Standards Wales Consent",
  "status": "draft",
  "date": "2025-04-03",
  "publisher": "NHS Wales",
  "copyright": "2025 NHS Wales",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient"
            ]
          }
        ]
      },
      {
        "id": "Consent.performer",
        "path": "Consent.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-RelatedPerson",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization"
            ]
          }
        ]
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "type": [
          {
            "code": "Attachment"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Contract",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Consent",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-QuestionnaireResponse",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-DocumentReference"
            ]
          }
        ]
      },
      {
        "id": "Consent.verification.verifiedWith",
        "path": "Consent.verification.verifiedWith",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "Consent.provision.actor.reference",
        "path": "Consent.provision.actor.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Group",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Device",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-RelatedPerson",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PractitionerRole"
            ]
          }
        ]
      }
    ]
  }
}