{
  "resourceType": "StructureDefinition",
  "id": "6161b1f6-5be6-4f5a-9924-bedc58f957cc",
  "meta": {
    "lastUpdated": "2021-05-31T13:50:46.779+00:00"
  },
  "url": "http://helict.de/fhir/StructureDefinition/BasisConsent",
  "name": "BasisConsent",
  "status": "draft",
  "date": "2021-05-11T12:01:39.1808903+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.scope.coding",
        "path": "Consent.scope.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.scope.coding.system",
        "path": "Consent.scope.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/consentscope"
      },
      {
        "id": "Consent.scope.coding.code",
        "path": "Consent.scope.coding.code",
        "min": 1,
        "fixedCode": "patient-privacy"
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "max": "1"
      },
      {
        "id": "Consent.category.coding",
        "path": "Consent.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Consent.category.coding.code",
        "path": "Consent.category.coding.code",
        "min": 1,
        "fixedCode": "59284-0"
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "min": 1
      },
      {
        "id": "Consent.patient.identifier",
        "path": "Consent.patient.identifier",
        "min": 1
      },
      {
        "id": "Consent.patient.identifier.type",
        "path": "Consent.patient.identifier.type",
        "min": 1
      },
      {
        "id": "Consent.patient.identifier.type.coding",
        "path": "Consent.patient.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.patient.identifier.type.coding.system",
        "path": "Consent.patient.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Consent.patient.identifier.type.coding.code",
        "path": "Consent.patient.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "MR"
      },
      {
        "id": "Consent.patient.identifier.system",
        "path": "Consent.patient.identifier.system",
        "min": 1,
        "fixedUri": "urn:oid:1.2.276.0.76.3.1.449"
      },
      {
        "id": "Consent.patient.identifier.value",
        "path": "Consent.patient.identifier.value",
        "min": 1
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "identifier.system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Consent.organization:OrganizationIKNR",
        "path": "Consent.organization",
        "sliceName": "OrganizationIKNR",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.organization:OrganizationIKNR.identifier",
        "path": "Consent.organization.identifier",
        "min": 1
      },
      {
        "id": "Consent.organization:OrganizationIKNR.identifier.type.coding",
        "path": "Consent.organization.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.organization:OrganizationIKNR.identifier.type.coding.system",
        "path": "Consent.organization.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Consent.organization:OrganizationIKNR.identifier.type.coding.code",
        "path": "Consent.organization.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "XX"
      },
      {
        "id": "Consent.organization:OrganizationIKNR.identifier.system",
        "path": "Consent.organization.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.de/sid/arge-ik/iknr"
      },
      {
        "id": "Consent.organization:OrganizationIKNR.display",
        "path": "Consent.organization.display",
        "min": 1
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Consent"
            ]
          }
        ]
      },
      {
        "id": "Consent.source[x].identifier",
        "path": "Consent.source[x].identifier",
        "min": 1
      },
      {
        "id": "Consent.source[x].identifier.type.coding",
        "path": "Consent.source[x].identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.source[x].identifier.type.coding.system",
        "path": "Consent.source[x].identifier.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Consent.source[x].identifier.type.coding.code",
        "path": "Consent.source[x].identifier.type.coding.code",
        "fixedCode": "RI"
      },
      {
        "id": "Consent.source[x].identifier.system",
        "path": "Consent.source[x].identifier.system",
        "min": 1
      },
      {
        "id": "Consent.source[x].identifier.value",
        "path": "Consent.source[x].identifier.value",
        "min": 1
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "min": 1
      },
      {
        "id": "Consent.policy.uri",
        "path": "Consent.policy.uri",
        "min": 1
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "min": 1
      },
      {
        "id": "Consent.policyRule.coding",
        "path": "Consent.policyRule.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.policyRule.coding:OptIn",
        "path": "Consent.policyRule.coding",
        "sliceName": "OptIn",
        "max": "1"
      },
      {
        "id": "Consent.policyRule.coding:OptIn.system",
        "path": "Consent.policyRule.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
      },
      {
        "id": "Consent.policyRule.coding:OptIn.code",
        "path": "Consent.policyRule.coding.code",
        "min": 1,
        "fixedCode": "OPTIN"
      },
      {
        "id": "Consent.policyRule.coding:OptOut",
        "path": "Consent.policyRule.coding",
        "sliceName": "OptOut",
        "max": "1"
      },
      {
        "id": "Consent.policyRule.coding:OptOut.system",
        "path": "Consent.policyRule.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
      },
      {
        "id": "Consent.policyRule.coding:OptOut.code",
        "path": "Consent.policyRule.coding.code",
        "min": 1,
        "fixedCode": "OPTOUT"
      },
      {
        "id": "Consent.provision.actor",
        "path": "Consent.provision.actor",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "role.coding.system"
            },
            {
              "type": "value",
              "path": "role.coding.code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.provision.actor:ActorCustodian",
        "path": "Consent.provision.actor",
        "sliceName": "ActorCustodian",
        "max": "1"
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.role.coding",
        "path": "Consent.provision.actor.role.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.role.coding:RoleCustodian",
        "path": "Consent.provision.actor.role.coding",
        "sliceName": "RoleCustodian"
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.role.coding:RoleCustodian.system",
        "path": "Consent.provision.actor.role.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.role.coding:RoleCustodian.code",
        "path": "Consent.provision.actor.role.coding.code",
        "fixedCode": "CST"
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.reference.identifier",
        "path": "Consent.provision.actor.reference.identifier",
        "min": 1
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.reference.identifier.system",
        "path": "Consent.provision.actor.reference.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.de/sid/arge-ik/iknr"
      },
      {
        "id": "Consent.provision.actor:ActorCustodian.reference.identifier.value",
        "path": "Consent.provision.actor.reference.identifier.value",
        "min": 1
      }
    ]
  }
}