{
  "resourceType": "StructureDefinition",
  "url": "http://oda.fi/fhir/StructureDefinition/stu3/Consent",
  "name": "ODA Consent",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "short": "active | rejected",
        "definition": "Status values 'active' and 'rejected' are supported. Active consent means that the person has granted the valid consent. Rejected means that the consent has been canceled or rejected."
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "fixedUri": "http://oda.fi/fhir/CodeSystem/consent-category"
      },
      {
        "id": "Consent.period",
        "path": "Consent.period",
        "max": "0"
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "definition": "When this Consent was issued / created / indexed."
      },
      {
        "id": "Consent.consentingParty",
        "path": "Consent.consentingParty",
        "definition": "Reference to the organization, which has been granted access to the resource(s) identified by this consent.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          }
        ]
      },
      {
        "id": "Consent.actor",
        "path": "Consent.actor",
        "max": "0"
      },
      {
        "id": "Consent.action",
        "path": "Consent.action",
        "max": "0"
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "max": "0"
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "max": "0"
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "max": "0"
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "max": "0"
      },
      {
        "id": "Consent.securityLabel",
        "path": "Consent.securityLabel",
        "max": "0"
      },
      {
        "id": "Consent.purpose",
        "path": "Consent.purpose",
        "max": "0"
      },
      {
        "id": "Consent.dataPeriod",
        "path": "Consent.dataPeriod",
        "max": "0"
      },
      {
        "id": "Consent.data.meaning",
        "path": "Consent.data.meaning",
        "short": "related"
      },
      {
        "id": "Consent.data.reference",
        "path": "Consent.data.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Consent.except",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Except"
          }
        ],
        "path": "Consent.except",
        "max": "0"
      }
    ]
  }
}