{
  "resourceType": "StructureDefinition",
  "id": "aorta-AuditEvent",
  "language": "nl-NL",
  "url": "http://vzvz.nl/fhir/StructureDefinition/aorta-AuditEvent",
  "version": "2.0.0-beta.2",
  "name": "AortaAuditEvent",
  "status": "active",
  "date": "2025-01-15",
  "publisher": "VZVZ",
  "contact": [
    {
      "name": "VZVZ",
      "telecom": [
        {
          "system": "email",
          "value": "standaardisatie@vzvz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Profile to exchange information on log entries.",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NL",
          "system": "urn:iso:std:iso:3166",
          "display": "Netherlands"
        }
      ]
    }
  ],
  "copyright": "VZVZ",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AuditEvent",
  "baseDefinition": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-AuditEvent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AuditEvent.extension",
        "path": "AuditEvent.extension",
        "min": 2
      },
      {
        "id": "AuditEvent.extension:requestId",
        "path": "AuditEvent.extension",
        "sliceName": "requestId",
        "max": "0"
      },
      {
        "id": "AuditEvent.extension:traceId",
        "path": "AuditEvent.extension",
        "sliceName": "traceId",
        "max": "0"
      },
      {
        "id": "AuditEvent.extension:aorta-requestId",
        "path": "AuditEvent.extension",
        "sliceName": "aorta-requestId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/aorta-request-id"
            ]
          }
        ]
      },
      {
        "id": "AuditEvent.extension:aorta-traceId",
        "path": "AuditEvent.extension",
        "sliceName": "aorta-traceId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/aorta-trace-id"
            ]
          }
        ]
      },
      {
        "id": "AuditEvent.type",
        "path": "AuditEvent.type",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://vzvz.nl/fhir/ValueSet/audit-event-type"
        }
      },
      {
        "id": "AuditEvent.purposeOfEvent",
        "path": "AuditEvent.purposeOfEvent",
        "definition": "The purposeOfUse (reason) that was used during the event being recorded. This could be an AORTA context code, an AORTA gegevenssoort, an AORTA bouwsteentype or a MedMij gegevensdienst.",
        "min": 1,
        "example": [
          {
            "label": "Aorta context code",
            "valueCodeableConcept": {
              "coding": [
                {
                  "code": "MEDGEG",
                  "system": "urn:oid:2.16.840.1.113883.2.4.3.111.15.1",
                  "display": "Medicatieproces medicatiegegevens"
                }
              ]
            }
          },
          {
            "label": "Aorta gegevenssoort",
            "valueCodeableConcept": {
              "coding": [
                {
                  "code": "460320",
                  "system": "urn:oid:2.16.840.1.113883.2.4.15.4",
                  "display": "Huisarts Care Provision"
                }
              ]
            }
          },
          {
            "label": "Bouwsteentype",
            "valueCodeableConcept": {
              "coding": [
                {
                  "code": "MEDAFSPRAAK",
                  "system": "urn:oid:2.16.840.1.113883.2.4.3.111.15.3",
                  "display": "Medicatieafspraak"
                }
              ]
            }
          },
          {
            "label": "MedMij gegevensdienst",
            "valueCodeableConcept": {
              "coding": [
                {
                  "code": "49",
                  "system": "http://afsprakenstelsel.medmij.nl/catalogus",
                  "display": "Huisartsgegevens"
                }
              ]
            }
          }
        ],
        "binding": {
          "strength": "extensible",
          "valueSet": "http://vzvz.nl/fhir/ValueSet/aorta-Code"
        }
      },
      {
        "id": "AuditEvent.entity",
        "path": "AuditEvent.entity",
        "min": 1
      },
      {
        "id": "AuditEvent.entity.type",
        "path": "AuditEvent.entity.type",
        "comment": "- FHIR based: Resourcetype as defined in the Valueset\r\n- V3 based: not used",
        "example": [
          {
            "label": "FHIR based",
            "valueCoding": {
              "code": "MedicationDispense",
              "system": "http://hl7.org/fhir/resource-types"
            }
          }
        ]
      },
      {
        "id": "AuditEvent.entity.query",
        "path": "AuditEvent.entity.query",
        "comment": "- FHIR based: always add full address, regardless of the type of action\r\n    - base-url if available\r\n    - resource\r\n    - parameters, if applicable\r\n- V3 based: add SoapAction from v3-log"
      },
      {
        "id": "AuditEvent.entity.detail",
        "path": "AuditEvent.entity.detail",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AuditEvent.entity.detail:AortaInteraction",
        "path": "AuditEvent.entity.detail",
        "sliceName": "AortaInteraction",
        "short": "Additional Information about the AORTA interaction ID",
        "definition": "Detailed description of the AoF interaction used",
        "min": 0,
        "max": "*"
      },
      {
        "id": "AuditEvent.entity.detail:AortaInteraction.type",
        "path": "AuditEvent.entity.detail.type",
        "short": "Code system of InteractionIDs",
        "definition": "Code system of the AORTA interactionIDs",
        "fixedString": "urn:oid:2.16.840.1.113883.1.6"
      },
      {
        "id": "AuditEvent.entity.detail:AortaInteraction.value[x]",
        "path": "AuditEvent.entity.detail.value[x]",
        "short": "InteractionID",
        "definition": "The v3 or FHIR interactionID",
        "comment": "The content of this element is a value from the CodeSystem with ID 2.16.840.1.113883.1.6, which is the AORTA-interactionIDs",
        "type": [
          {
            "code": "string"
          }
        ],
        "example": [
          {
            "label": "v3 interactionID",
            "valueString": "QUMA_IN991203NL04"
          },
          {
            "label": "FHIR interactionID",
            "valueString": "create:mp-MedicationAgreement:1"
          }
        ]
      }
    ]
  }
}