PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch-atc@3.3.0
    http://fhir.ch/ig/ch-atc/StructureDefinition/DocumentAuditEvent
description: This profile defines the content of the document audit events which a community has to provide for a patients audit trail.
package_name: ch.fhir.ig.ch-atc
derivation: constraint
name: DocumentAuditEvent
type: AuditEvent
elements:
  type:
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/audit-event-type'}
    index: 0
  subtype:
    index: 1
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: 1
      slices:
        DocumentAuditEventType:
          match: {system: 'urn:oid:2.16.756.5.30.1.127.3.10.7'}
          schema:
            short: DocumentAuditEventType
            binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-atc/ValueSet/DocumentAuditEventType'}
            _required: true
            index: 2
            elements:
              system:
                pattern: {type: Uri, value: 'urn:oid:2.16.756.5.30.1.127.3.10.7'}
                index: 3
            required: [system]
  recorded: {index: 4}
  purposeOfEvent:
    binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-term/ValueSet/EprPurposeOfUse'}
    index: 5
  agent:
    short: Participants
    index: 6
    elements:
      role:
        binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-atc/ValueSet/EprParticipant'}
        index: 7
      who:
        index: 8
        elements:
          identifier: {type: Identifier, index: 9}
        required: [identifier]
      name: {index: 10}
      requestor: {index: 11}
    required: [role, name]
  entity:
    index: 12
    slicing:
      rules: open
      discriminator:
      - {path: type.code, type: value}
      - {path: role.code, type: value}
      min: null
      slices:
        Patient:
          match:
            type: {code: null}
            role: {code: null}
          schema:
            _required: true
            index: 13
            elements:
              what:
                elements:
                  identifier: {index: 14}
        Document:
          match:
            type: {code: '2'}
            role: {code: '3'}
          schema:
            short: Document
            index: 15
            elements:
              what:
                elements:
                  identifier: {type: Identifier, short: XDSDocumentEntry.uniqueId, index: 16}
                required: [identifier]
              type:
                index: 17
                elements:
                  code:
                    pattern: {type: Code, value: '2'}
                    index: 18
                required: [code]
              role:
                index: 19
                elements:
                  code:
                    pattern: {type: Code, value: '3'}
                    index: 20
                required: [code]
              detail:
                array: true
                min: 4
                index: 21
                slicing:
                  rules: open
                  discriminator:
                  - {path: type, type: value}
                  min: 4
                  slices:
                    repositoryUniqueId:
                      match: {type: Repository Unique Id}
                      schema:
                        short: repositoryUniqueId
                        _required: true
                        index: 22
                        elements:
                          type:
                            pattern: {type: String, value: Repository Unique Id}
                            index: 23
                          value: {type: base64Binary, index: 24}
                    homeCommunityID:
                      match: {type: homeCommunityID}
                      schema:
                        short: homeCommunityID
                        _required: true
                        index: 25
                        elements:
                          type:
                            pattern: {type: String, value: homeCommunityID}
                            index: 26
                          value: {type: base64Binary, index: 27}
                    EprDocumentTypeCode:
                      match: {type: EprDocumentTypeCode}
                      schema:
                        short: EprDocumentTypeCode
                        _required: true
                        index: 28
                        elements:
                          type:
                            pattern: {type: String, value: EprDocumentTypeCode}
                            index: 29
                          value: {type: base64Binary, index: 30}
                    title:
                      match: {type: title}
                      schema:
                        short: title
                        _required: true
                        index: 31
                        elements:
                          type:
                            pattern: {type: String, value: title}
                            index: 32
                          value: {type: base64Binary, index: 33}
            required: [role, type]
        Query:
          match:
            type: {code: '2'}
            role: {code: '24'}
          schema:
            short: Query
            index: 34
            elements:
              what:
                elements:
                  identifier: {type: Identifier, short: Query ID (UUID), index: 35}
                required: [identifier]
              type:
                index: 36
                elements:
                  code:
                    pattern: {type: Code, value: '2'}
                    index: 37
                required: [code]
              role:
                index: 38
                elements:
                  code:
                    pattern: {type: Code, value: '24'}
                    index: 39
                required: [code]
            required: [role, type]
package_version: 3.3.0
class: profile
kind: resource
url: http://fhir.ch/ig/ch-atc/StructureDefinition/DocumentAuditEvent
base: http://fhir.ch/ig/ch-epr-fhir/StructureDefinition/ch-epr-fhir-auditevent
version: 3.3.0
required: [subtype, purposeOfEvent]