{
  "resourceType": "StructureDefinition",
  "id": "sgrdv-audit-bundle",
  "url": "http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-bundle",
  "name": "SGRDVAuditBundle",
  "title": "Bundle d'audit SGRDV (4 entrées)",
  "status": "draft",
  "experimental": true,
  "description": "Bundle de type collection auto-portant représentant un audit affaire SGRDV. Contient exactement 4 entrées : (1) un AuditEvent, (2-3) deux Device acteurs (source + destination, profil SGRDVAuditAgent) et (4) le payload original de la transaction (Parameters, Bundle ou OperationOutcome — type libre). Le correlation-id est porté par Bundle.identifier (volontairement partagé par les 4 audits d'une même transaction). Voir ADR-016 (Bundle collection) et ADR-017 (profil unique avec direction en extension). Ingestion AHDS via POST /Bundle uniquement.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.identifier.value",
        "path": "Bundle.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "collection"
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 4,
        "max": "4",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:auditEvent",
        "path": "Bundle.entry",
        "sliceName": "auditEvent",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:auditEvent.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "AuditEvent",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-event"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:device",
        "path": "Bundle.entry",
        "sliceName": "device",
        "min": 2,
        "max": "2",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:device.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Device",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-agent"
            ]
          }
        ]
      }
    ]
  }
}