PackagesCanonicalsLogsProblems
    Packages
    ca.qc.sq.sgrdv@1.1.3
    http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-event
description: Profil unique d'AuditEvent pour les journaux d'audit affaire SGRDV. Porte la direction (extension dédiée), le type de transaction (find, lock, aggregate), les agents source et destination (références vers des SGRDVAuditAgent dans le même Bundle) et la référence au payload de la transaction.
package_name: ca.qc.sq.sgrdv
derivation: constraint
name: SGRDVAuditEvent
type: AuditEvent
elements:
  extension:
    array: true
    min: 3
    index: 0
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: 3
      slices:
        direction:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-direction-extension', index: 1}
          min: 1
          max: 1
        correlationId:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-correlation-id', index: 2}
          min: 1
          max: 1
        discussionId:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-discussion-id', index: 3}
          min: 1
          max: 1
  type:
    binding: {strength: required, valueSet: 'http://sante.quebec/fhir/ValueSet/sgrdv-audit-transaction-type-vs'}
    mustSupport: true
    index: 4
    elements:
      system:
        pattern: {type: Uri, value: 'http://sante.quebec/fhir/CodeSystem/sgrdv-audit-transaction-type'}
        mustSupport: true
        index: 5
      code: {mustSupport: true, index: 6}
    required: [system, code]
  action:
    pattern: {type: Code, value: E}
    mustSupport: true
    index: 7
  recorded: {mustSupport: true, index: 8}
  outcome: {mustSupport: true, index: 9}
  agent:
    mustSupport: true
    array: true
    min: 2
    index: 10
    slicing:
      rules: open
      discriminator:
      - {path: type, type: pattern}
      min: 2
      slices:
        source:
          match:
            type:
              coding:
              - {code: source, system: 'http://sante.quebec/fhir/CodeSystem/sgrdv-audit-agent-type'}
          schema:
            mustSupport: true
            _required: true
            index: 11
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: source, system: 'http://sante.quebec/fhir/CodeSystem/sgrdv-audit-agent-type'}
                index: 12
              who:
                type: Reference
                mustSupport: true
                refers: ['http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-agent']
                index: 13
                elements:
                  reference: {mustSupport: true, index: 14}
                required: [reference]
              requestor: {mustSupport: true, index: 15}
            required: [who, type]
        destination:
          match:
            type:
              coding:
              - {code: destination, system: 'http://sante.quebec/fhir/CodeSystem/sgrdv-audit-agent-type'}
          schema:
            mustSupport: true
            _required: true
            index: 16
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: destination, system: 'http://sante.quebec/fhir/CodeSystem/sgrdv-audit-agent-type'}
                index: 17
              who:
                type: Reference
                mustSupport: true
                refers: ['http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-agent']
                index: 18
                elements:
                  reference: {mustSupport: true, index: 19}
                required: [reference]
              requestor: {mustSupport: true, index: 20}
            required: [who, type]
  source:
    mustSupport: true
    index: 21
    elements:
      observer:
        type: Reference
        mustSupport: true
        refers: ['http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-agent']
        index: 22
        elements:
          reference: {mustSupport: true, index: 23}
        required: [reference]
  entity:
    mustSupport: true
    index: 24
    slicing:
      rules: open
      discriminator:
      - {path: type.code, type: value}
      min: 1
      slices:
        payload:
          match:
            type: {code: payload}
          schema:
            mustSupport: true
            _required: true
            index: 25
            elements:
              what:
                mustSupport: true
                index: 26
                elements:
                  reference: {mustSupport: true, index: 27}
                required: [reference]
              type:
                mustSupport: true
                index: 28
                elements:
                  code:
                    pattern: {type: Code, value: payload}
                    index: 29
                required: [code]
            required: [what, type]
package_version: 1.1.3
extensions:
  direction: {url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-direction-extension', min: 1, max: 1, type: Extension, mustSupport: true, index: 1}
  correlationId: {url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-correlation-id', min: 1, max: 1, type: Extension, mustSupport: true, index: 2}
  discussionId: {url: 'http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-discussion-id', min: 1, max: 1, type: Extension, mustSupport: true, index: 3}
class: profile
kind: resource
url: http://sante.quebec/fhir/StructureDefinition/sgrdv-audit-event
base: http://hl7.org/fhir/StructureDefinition/AuditEvent
version: 1.1.3
required: [action, entity]