PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch@atc-3.2.0-ballot
    http://fhir.ch/ig/ch-atc/StructureDefinition/PolicyAuditEvent
description: This profile defines the content of the policy audit events which a community has to provide for a patients audit trail.
package_name: ch.fhir.ig.ch
derivation: constraint
name: PolicyAuditEvent
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:
        PolicyAuditEventType:
          match: {system: 'urn:oid:2.16.756.5.30.1.127.3.10.7'}
          schema:
            short: PolicyAuditEventType
            binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-atc/ValueSet/PolicyAuditEventType'}
            _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}
  agent:
    short: Participants
    index: 5
    elements:
      role:
        binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-atc/ValueSet/EprParticipant'}
        index: 6
      who:
        elements:
          identifier: {type: Identifier, index: 7}
        required: [identifier]
      name: {index: 8}
      requestor: {index: 9}
    required: [role, name]
  entity:
    index: 10
    slicing:
      rules: open
      discriminator:
      - {path: type.code, type: value}
      min: null
      slices:
        Patient:
          match:
            type: {code: '1'}
          schema:
            short: Patient
            _required: true
            index: 11
            elements:
              what:
                elements:
                  identifier:
                    type: Identifier
                    short: Patient Id (EPR-SPID)
                    index: 12
                    elements:
                      system:
                        pattern: {type: Uri, value: 'urn:oid:2.16.756.5.30.1.127.3.10.3'}
                        index: 13
                    required: [system]
                required: [identifier]
              type:
                index: 14
                elements:
                  code:
                    pattern: {type: Code, value: '1'}
                    index: 15
                required: [code]
              role:
                index: 16
                elements:
                  code:
                    pattern: {type: Code, value: '1'}
                    index: 17
                required: [code]
            required: [role, type]
        Resource:
          match:
            type: {code: '2'}
          schema:
            short: Resource (HCP, Group, Representative of Patient)
            index: 18
            elements:
              what:
                elements:
                  identifier: {type: Identifier, short: 'Identifier: HCP (GLN), Group (OID)', index: 19}
              type:
                index: 20
                elements:
                  code:
                    pattern: {type: Code, value: '2'}
                    index: 21
                required: [code]
              role:
                binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-atc/ValueSet/EprParticipant'}
                index: 22
              name: {index: 23}
              detail:
                index: 24
                slicing:
                  rules: open
                  discriminator:
                  - {path: type, type: value}
                  min: null
                  slices:
                    AccessLevel:
                      match: {type: AccessLevel}
                      schema:
                        short: AccessLevel if subtype is Create or Update
                        index: 25
                        elements:
                          type:
                            short: The type of extra detail provided in the value
                            pattern: {type: String, value: AccessLevel}
                            index: 26
                          value: {type: base64Binary, short: 'one of urn:e-health-suisse:2015:policies:access-level: normal, restricted, delegation-and-restricted, delegation-and-normal or full', index: 27}
                    AccessLimitedToDate:
                      match: {type: AccessLimitedToDate}
                      schema:
                        short: AccessLimitedToDate if subtype is Create or Update
                        index: 28
                        elements:
                          type:
                            pattern: {type: String, value: AccessLimitedToDate}
                            index: 29
                          value: {type: base64Binary, short: Date in property value, index: 30}
                    ProvideLevel:
                      match: {type: ProvideLevel}
                      schema:
                        short: ProvideLevel if subtype is ATC_POL_DEF_CONFLEVEL
                        index: 31
                        elements:
                          type:
                            pattern: {type: String, value: ProvideLevel}
                            index: 32
                          value: {type: base64Binary, short: 'one of urn:e-health-suisse:2015:policies:provide-level: normal, restricted or secret', index: 33}
            required: [role, name, type]
package_version: atc-3.2.0-ballot
class: profile
kind: resource
url: http://fhir.ch/ig/ch-atc/StructureDefinition/PolicyAuditEvent
base: http://hl7.org/fhir/StructureDefinition/AuditEvent
version: 3.2.0-ballot
required: [subtype]