{
  "resourceType": "StructureDefinition",
  "id": "AuditEventAccesslogSe",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Security"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "not-classified"
    }
  ],
  "url": "https://fhir.cambio.se/StructureDefinition/AuditEventALSe/v1",
  "version": "1.0.0",
  "name": "AuditEventALSe",
  "status": "active",
  "description": "Profile to represent a accesslog events and shared with log service",
  "purpose": "To enable creating access event logs and exchange of already stored event logs",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "dicom",
      "uri": "http://nema.org/dicom",
      "name": "DICOM Tag Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "w3c.prov",
      "uri": "http://www.w3.org/ns/prov",
      "name": "W3C PROV"
    },
    {
      "identity": "fhirprovenance",
      "uri": "http://hl7.org/fhir/provenance",
      "name": "FHIR Provenance Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "AuditEvent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AuditEvent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AuditEvent.subtype",
        "path": "AuditEvent.subtype",
        "min": 0,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://example.org/ValueSet/ActivityTypes"
        }
      },
      {
        "id": "AuditEvent.purposeOfEvent",
        "path": "AuditEvent.purposeOfEvent",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://example.org/ValueSet/ActivityPurpose"
        }
      },
      {
        "id": "AuditEvent.agent.type",
        "path": "AuditEvent.agent.type",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "SOURCE",
              "system": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes",
              "display": "Source"
            }
          ]
        }
      },
      {
        "id": "AuditEvent.agent.who",
        "path": "AuditEvent.agent.who",
        "min": 1
      },
      {
        "id": "AuditEvent.agent.altId",
        "path": "AuditEvent.agent.altId",
        "max": "0"
      },
      {
        "id": "AuditEvent.agent.name",
        "path": "AuditEvent.agent.name",
        "max": "0"
      },
      {
        "id": "AuditEvent.agent.location",
        "path": "AuditEvent.agent.location",
        "max": "0"
      },
      {
        "id": "AuditEvent.agent.policy",
        "path": "AuditEvent.agent.policy",
        "max": "0"
      },
      {
        "id": "AuditEvent.agent.media",
        "path": "AuditEvent.agent.media",
        "max": "0"
      },
      {
        "id": "AuditEvent.agent.network",
        "path": "AuditEvent.agent.network",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity",
        "path": "AuditEvent.entity",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "AuditEvent.entity:patient",
        "path": "AuditEvent.entity",
        "sliceName": "patient",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AuditEvent.entity:patient.what",
        "path": "AuditEvent.entity.what",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "AuditEvent.entity:patient.type",
        "path": "AuditEvent.entity.type",
        "patternCoding": {
          "code": "1",
          "system": "http://terminology.hl7.org/CodeSystem/audit-entity-type",
          "display": "Person"
        }
      },
      {
        "id": "AuditEvent.entity:patient.role",
        "path": "AuditEvent.entity.role",
        "patternCoding": {
          "code": "1",
          "system": "http://terminology.hl7.org/CodeSystem/object-role",
          "display": "Patient"
        }
      },
      {
        "id": "AuditEvent.entity:patient.lifecycle",
        "path": "AuditEvent.entity.lifecycle",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:patient.securityLabel",
        "path": "AuditEvent.entity.securityLabel",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:patient.name",
        "path": "AuditEvent.entity.name",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:patient.query",
        "path": "AuditEvent.entity.query",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:patient.detail",
        "path": "AuditEvent.entity.detail",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:data",
        "path": "AuditEvent.entity",
        "sliceName": "data",
        "min": 1,
        "max": "*"
      },
      {
        "id": "AuditEvent.entity:data.what",
        "path": "AuditEvent.entity.what",
        "min": 1
      },
      {
        "id": "AuditEvent.entity:data.type",
        "path": "AuditEvent.entity.type",
        "patternCoding": {
          "code": "2",
          "system": "http://terminology.hl7.org/CodeSystem/audit-entity-type",
          "display": "System Object"
        }
      },
      {
        "id": "AuditEvent.entity:data.role",
        "path": "AuditEvent.entity.role",
        "patternCoding": {
          "code": "4",
          "system": "http://terminology.hl7.org/CodeSystem/object-role",
          "display": "Domain Resource"
        }
      },
      {
        "id": "AuditEvent.entity:data.lifecycle",
        "path": "AuditEvent.entity.lifecycle",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:data.securityLabel",
        "path": "AuditEvent.entity.securityLabel",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:data.name",
        "path": "AuditEvent.entity.name",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:data.query",
        "path": "AuditEvent.entity.query",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:data.detail",
        "path": "AuditEvent.entity.detail",
        "max": "0"
      }
    ]
  }
}